Laravel 4 Model class not found

后端 未结 2 546
无人共我
无人共我 2021-02-06 05:18

I just created a simple app in Laravel 4 and when I create a model, I get an exception that it\'s not found.

// /app/models/Worker.php:


        
2条回答
  •  你的背包
    2021-02-06 06:04

    I think there are two commands to get the autoload started:

    $ composer dump-autoload  
    

    and

    $ php artisan dump-autoload
    

    Seems composer dump-autoload is to let composer create autoloads as defined in the composer.json files. And php artisan dump-autoload glues all the composer dump-autoloads ( also from vendors and workbenches ) together.

提交回复
热议问题