api.php 775 Bytes
<?php

use Illuminate\Support\Facades\Route;
use Illuminate\Routing\Router;

/*
|--------------------------------------------------------------------------
| 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::prefix('v1')->middleware('auth:sanctum')->group(function ($api){

Route::prefix('v1')->namespace('App\Http\Controllers\V1')->group(function (Router $api) {

    /**首页*/
    $api->apiResource('/home', 'HomeController');

    /** 临境 */
    $api->apiResource('/immersive', 'ImmerseController');


});