Файл: routes/api.php
Строк: 30
<?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!
|
*/
Route::prefix('v1')->middleware('auth:api')->group(function () {
Route::apiResource('stats', 'APIStatController', ['parameters' => [
'stats' => 'id'
], 'only' => ['show'], 'as' => 'api'])->middleware('api.guard');
Route::apiResource('websites', 'APIWebsiteController', ['parameters' => [
'websites' => 'id'
], 'as' => 'api'])->middleware('api.guard');
Route::apiResource('account', 'APIAccountController', ['only' => [
'index'
], 'as' => 'api'])->middleware('api.guard');
Route::fallback(function () {
return response()->json(['message' => __('Resource not found.'), 'status' => 404], 404);
});
});
Route::post('event', 'APIEventController@index')->name('event');