You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

66 lines
4.0 KiB

<?php
use App\Http\Controllers\System\MultisysController;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Route;
/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServiceProvider and all of them will
| be assigned to the "api" middleware group. Make something great!
|
*/
// Route::middleware('auth:sanctum')->get('/user', function (Request $request) {
// return $request->user();
// });
Route::group(['middleware' => 'auth:api'], function () {
// 新報表(固定種類)
Route::get('statistics', [App\Http\Controllers\System\StatisticsController::class, 'getStatistics'])->name('api.global.statistics');
Route::post('statistics/export', [App\Http\Controllers\System\StatisticsController::class, 'getStatisticsExport'])->name('api.global.statistics.export');
Route::get('log', [App\Http\Controllers\system\LogController::class, 'getDataTable'])->name('api.setting.log');
Route::post('log/export', [App\Http\Controllers\system\LogController::class, 'getLogDataExport'])->name('api.system.log.export');
Route::get('ms/statistics', [MultisysController::class, 'getStatisticsTest'])->name('api.ms.getstatistics');
Route::get('dashboard', [App\Http\Controllers\System\SystemController::class, 'getDashboardData'])->name('api.dashboard');
Route::get('dashboard/pie', [App\Http\Controllers\System\SystemController::class, 'getDashboardPie'])->name('api.dashboard.pie');
Route::get('dashboard/bar', [App\Http\Controllers\System\SystemController::class, 'getDashboardBar'])->name('api.dashboard.bar');
#region 管理群組 restful api
Route::get('role', [App\Http\Controllers\System\Permissions\RoleController::class, 'index'])->name('api.role.index');
Route::put('role/{id}', [App\Http\Controllers\System\Permissions\RoleController::class, 'update'])->name('api.role.update');
Route::post('role/store', [App\Http\Controllers\System\Permissions\RoleController::class, 'store'])->name('api.role.store');
Route::delete('role/{id}', [App\Http\Controllers\System\Permissions\RoleController::class, 'destory'])->name('api.role.destory');
Route::get('role/{id}', [App\Http\Controllers\System\Permissions\RoleController::class, 'show'])->name('api.role.show');
#endregion
#region 使用者管理 restful api
// 匯出
Route::post('user/export', [App\Http\Controllers\System\Permissions\UserController::class, 'exportUserData'])->name('api.user.export');
Route::get('user', [App\Http\Controllers\System\Permissions\UserController::class, 'index'])->name('api.user.index');
Route::put('user/{id}', [App\Http\Controllers\System\Permissions\UserController::class, 'update'])->name('api.user.update');
Route::post('user/store', [App\Http\Controllers\System\Permissions\UserController::class, 'store'])->name('api.user.store');
Route::delete('user/{id}', [App\Http\Controllers\System\Permissions\UserController::class, 'destory'])->name('api.user.destory');
Route::get('user/{id}', [App\Http\Controllers\System\Permissions\UserController::class, 'show'])->name('api.user.show');
#endregion
// 新增單位 restful api
Route::get('device/unit', [App\Http\Controllers\System\ViolationParkingEquipmentController::class, 'indexUnit'])->name('api.vpk.unit.index');
Route::post('device/unit', [App\Http\Controllers\System\ViolationParkingEquipmentController::class, 'storeUnit'])->name('api.vpk.unit.store');
// 檔案管理 restful api
Route::get('file-index', [App\Http\Controllers\System\FileIndexController::class, 'api_index'])->name('api.fileindex.index');
#region Ping IP
Route::get('/get-ping-data/{status}', [App\Http\Controllers\system\Monitor\PingIpController::class, 'getDataTable'])->name("ping.getData");
Route::get('/get-ping-excel/{status}', [App\Http\Controllers\system\Monitor\PingIpController::class, 'ExportExcel'])->name("ping.dump");
#endregion
});