💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、星火、月之暗面及文生图 广告
laravel的四种路由方式: ![](https://box.kancloud.cn/3b32cd2bda4e237a3272f09364604057_1266x629.png) 多数我们使用第一种方式,Http方法: ~~~ // Route::get('/', '[控制器]@[行为]'); Route::put('/posts', '\App\Http\Controllers\PostController@index'); ~~~ 刚下载的laravel的预设路由: ~~~ Route::get('/', function () { return view('welcome'); }); ~~~ 路由分组: ~~~ Route::group(['prefix' => 'posts'], function(){ Route::put('/', '\App\Http\Controllers\PostController@index'); Route::put('/crate', '\App\Http\Controllers\PostController@index'); }); // 等效 Route::put('/posts', '\App\Http\Controllers\PostController@index'); Route::put('/posts/crate', '\App\Http\Controllers\PostController@index'); ~~~