这个是DbDocServiceProvider对应的代码:
<?php
namespace JeffcottLu\DbDoc;
use Illuminate\Support\ServiceProvider;
use JeffcottLu\DbDoc\Console\Commands\SyncTablesCommand;
class DbDocServiceProvider extends ServiceProvider
{
/**
* Bootstrap services.
*
* @return void
*/
public function boot()
{
$this->loadMigrationsFrom(__DIR__ . '/../database/migrations');
$this->loadViewsFrom(__DIR__ . '/views/', 'DbDoc');
//不能不发布就直接使用静态资源,
$this->publishes([
__DIR__ . '/../public/' => public_path('vendor/db-doc')
], 'public');
$this->commands([SyncTablesCommand::class]);
if (!$this->app->routesAreCached()) {
require __DIR__ . '/web.php';
}
}
/**
* Register services.
*
* @return void
*/
public function register()
{
$this->app->bind('command.db:db-doc', SyncTablesCommand::class);
if ($this->app->runningInConsole()) {
$this->commands([
'command.db:db-doc'
]);
}
}
}
发布包,找不到对应的包;
没有这个包对应的命令行:
直接访问路由,报错
自己在写的一个包,一直是好的,但是不知道什么时候,开始报错;找不到注册的service provider,自己搞了一会,实在没有解决问题的思路,求助;
如果上面的报错信息不够详细的话,希望您可以在这里JeffcottLu/tools看一下对应的文件;谢谢;
是缓存的问题;
但是我清了无数次缓存还是不行,直到把项目删掉之后重新checkout之后才解决问题,这种情况怎么避免呢?
万千封印
婷婷同学_