Terminal创建控制器的方法:php artisan make:controller XXXController
使用Tinker对数据模型的使用:
php artisan tinker
//增加数据
$post=new \App\Post();
$post->title="this is title";
$post->save();
//查询数据
\App\Post::find(1);
或者 \App\Post::where('title','this is title1')->first(); //条件查询
//修改参考添加数据流程