路由:
Route::get('url路径','控制器@[行为]');
Route::put('/posts','\app\http\Controllers\PostController@index');
<form action="/post" method="POST">
{{method_field("PUT")}}
</from>
路由参数绑定:
Route::get('/posts/{id}',...)
function index($id){
$id ==57
}
路由分组:
Route::grope(['prefix']=>'posts'],function(){
Route::put('/',...)
})
模型绑定在路由中:
Route::get('/posts/{post}',...) //post=>表:posts->主键:id
function show(\app\Post $post){
}
公开磁盘: