29 lines
864 B
PHP
29 lines
864 B
PHP
<?php
|
|
|
|
use Illuminate\Http\Request;
|
|
// use Webpatser\Uuid\Uuid;
|
|
use Illuminate\Support\Str;
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| 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::post('/', function() {
|
|
return (string) Str::uuid();
|
|
});
|
|
|
|
Route::middleware('auth:api')->get('/user', function (Request $request) {
|
|
return $request->user();
|
|
});
|
|
|
|
Route::apiResources(['v1/client' => 'API\v1\ClientController']);
|
|
|
|
// Route::apiResources(['backup' => 'API\BackupController']);
|
|
Route::post('v1/backup/{client_id}/{schedule_name}', 'API\v1\BackupController@store'); |