💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、星火、月之暗面及文生图 广告
# laravel 9.x 测试的 ~~~ <?php use Illuminate\Support\Facades\Route; use Illuminate\Support\Facades\App; /* |-------------------------------------------------------------------------- | Web Routes |-------------------------------------------------------------------------- | | Here is where you can register web routes for your application. These | routes are loaded by the RouteServiceProvider within a group which | contains the "web" middleware group. Now create something great! | */ //演示:http://demo.laravel9.com/admin/home/index Route::any("/{directory_name}/{controller}/{action}",function ($directory_name,$controller , $action){ $class_file = "\App\Http\Controllers\\" .ucfirst($directory_name). "\\" .ucfirst($controller). "Controller"; if(class_exists($class_file)) { $controlClass = App::make($class_file); return App::call([$controlClass, $action]); }else{ abort("404","not found"); } })->name("home"); ~~~ ![](https://img.kancloud.cn/1f/bb/1fbbc0bbd07347820b6e567866312954_891x496.png)