路由
use Illuminate\Support\Facades\Route; Route::get('/', function () { return view('welcome'); }); Route::get('phpinfo', function () { return phpinfo(); }); Route::prefix('test') ->namespace('Api') ->middleware(['before','after']) ->group(function () { Route::get('index', "TestController@index"); Route::get('insert', "TestController@insert"); });