![](/img/trans.png)
[英]FatalErrorException in routes.php line 22: Class 'Painting' not found
[英]FatalErrorException in routes.php line 51: Class 'app\Game' not found laravel 5.1
這是我的Game.php
模型類代碼,位於app
目錄中
namespace App;
use Illuminate\Database\Eloquent\Model;
class Game extends Model
{
}
在我的routes.php
<?php
use app\Game;
Route::get('game',function(){
$game = new app\Game;
$game->name = 'Assassins Creed';
$game->description = 'Assassins VS templars.';
$game->save();
});
您需要在App \\ Game中擁有Capital A嗎?
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.