常用語法

新增控制器

參考文件 => https://laravel.tw/docs/5.2/controllers#restful-resource-controllers

php artisan make:controller LabController

//以下這是laravel自己作的一種
php artisan make:controller DataController --resource
//搭配以下route使用
Route::resource('data', 'DataController');

新增資料表

php artisan make:model Employee -m

新增migrations

php artisan migrate

使用tinker工具程式

php artisan tinker

將form當作delete送出

將form當作put送出

Last updated

Was this helpful?