关于php的laravel框架,在mac的终端输入php artisan list报错,无法解决?

南巷以南 2017-10-20 09:58:58
输入之后会提示以下错误:
PHP Fatal error: Uncaught ReflectionException: Class config does not exist in /Users/abc/laravel/vendor/laravel/framework/src/Illuminate/Container/Container.php:752
Stack trace:
#0 /Users/abc/laravel/vendor/laravel/framework/src/Illuminate/Container/Container.php(752): ReflectionClass->__construct('config')
#1 /Users/abc/laravel/vendor/laravel/framework/src/Illuminate/Container/Container.php(631): Illuminate\Container\Container->build('config')
#2 /Users/abc/laravel/vendor/laravel/framework/src/Illuminate/Container/Container.php(586): Illuminate\Container\Container->resolve('config', Array)
#3 /Users/abc/laravel/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(721): Illuminate\Container\Container->make('config', Array)
#4 /Users/abc/laravel/vendor/laravel/framework/src/Illuminate/Container/Container.php(1195): Illuminate\Foundation\Application->make('config')
#5 /Users/abc/laravel/vendor/laravel/framework/src/Illuminate/Support/ServiceProvider.php(57): Illuminate\Container\Container->offsetGet('config')
#6 / in /Users/abc/laravel/vendor/laravel/framework/src/Illuminate/Container/Container.php on line 752

这是什么情况,大神们帮帮我!!不知道该怎么解决,初学laravel
...全文
729 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
南巷以南 2017-10-20
  • 打赏
  • 举报
回复
引用 1 楼 u010036886 的回复:
先用composer dump-autoload试试。如果不行就得把你在app\Console\Kernel.php里面所有注册命令文件看看。有一个文件有错误artisan执行都是失败的
我试了没效果呢,这是我的Kernel.php文件,麻烦您看看哪有问题呢? <?php namespace App\Console; use Illuminate\Console\Scheduling\Schedule; use Illuminate\Foundation\Console\Kernel as ConsoleKernel; class Kernel extends ConsoleKernel { /** * The Artisan commands provided by your application. * * @var array */ protected $commands = [ // ]; /** * Define the application's command schedule. * * @param \Illuminate\Console\Scheduling\Schedule $schedule * @return void */ protected function schedule(Schedule $schedule) { // $schedule->command('inspire') // ->hourly(); } /** * Register the commands for the application. * * @return void */ protected function commands() { $this->load(__DIR__.'/Commands'); require base_path('routes/console.php'); } }
闪闪放光芒 2017-10-20
  • 打赏
  • 举报
回复
先用composer dump-autoload试试。如果不行就得把你在app\Console\Kernel.php里面所有注册命令文件看看。有一个文件有错误artisan执行都是失败的

4,251

社区成员

发帖
与我相关
我的任务
社区描述
国内外优秀PHP框架讨论学习
社区管理员
  • Framework
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧