chemex/routes/api.php
2022-07-18 11:19:12 +08:00

36 lines
984 B
PHP
Executable File

<?php
/*
|--------------------------------------------------------------------------
| 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!
|
*/
use App\Http\Controllers\AssetController;
use App\Http\Controllers\AuthController;
use Illuminate\Support\Facades\Route;
/**
* 用户鉴权API
*/
Route::group([
'prefix' => 'auth'
], function () {
Route::post('login', [AuthController::class, 'login']);
Route::post('logout', [AuthController::class, 'logout']);
Route::post('me', [AuthController::class, 'me']);
});
/**
* 设备标签查询.
*/
Route::get('asset_card/device/{asset_number}', [AssetController::class, 'assetCardDevice'])
->name('asset_card.device');
Route::resource('assets', AssetController::class);