forked from guyueyingmu/avbook
-
Notifications
You must be signed in to change notification settings - Fork 0
/
api.php
34 lines (25 loc) · 1015 Bytes
/
api.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<?php
use Illuminate\Http\Request;
/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| is assigned the "api" middleware group. Enjoy building your API!
|
*/
//Route::middleware('auth:api')->get('/user', function (Request $request) {
// return $request->user();
//});
//Route::get('/addgenre', 'API\MovieinfoController@addgenre');
//Route::get('/magnetlinks', 'API\MovieinfoController@magnetlinks');
//Route::any('/test/{action}', function ($action) {
// $class = App::make(\App\Http\Controllers\TestController::class);
// return $class->$action();
//});
Route::any('/{action}', function (Request $request,$action) {
$class = App::make(\App\Http\Controllers\API\MovieinfoController::class);
return $class->$action($request);
});