mdbpanel/routes/api.php

25 lines
844 B
PHP

<?php
use Illuminate\Http\Request;
use Illuminate\Support\Str;
use App\Backup;
/*
|--------------------------------------------------------------------------
| 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::apiResources(['v1/client' => 'API\v1\ClientController']);
Route::post('v1/backup/{client_id}/{schedule_name}', 'API\v1\BackupController@store');
// Route::get('v1/test', 'API\v1\BackupController@test');
Route::get('v1/schedule', 'API\v1\ScheduleController@index');