pipicar/routes/api.php

46 lines
1.8 KiB
PHP

<?php
use App\Http\Controllers\MobileApiController;
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!
|
*/
use App\Http\Controllers\Sync1cApiController;
use Illuminate\Support\Facades\Storage;
Route::prefix('1c')->group(function () {
Route::post('syncAutoData', [Sync1cApiController::class, 'syncAutoData']);
Route::post('syncOwners', [Sync1cApiController::class, 'syncOwners']);
Route::post('syncOwnerContracts', [Sync1cApiController::class, 'syncOwnerContracts']);
Route::post('syncCarCalendar', [Sync1cApiController::class, 'syncCarCalendar']);
});
Route::prefix('mobile')->group(function () {
Route::get('getMarks', [MobileApiController::class, 'getMarks']);
Route::get('getAvailableMarksList', [MobileApiController::class, 'getAvailableMarksList']);
Route::post('checkAvailableCar', [MobileApiController::class, 'checkAvailableCar']);
Route::post('sendApplication', [MobileApiController::class, 'sendApplication']);
Route::post('getApplications', [MobileApiController::class, 'getApplications']);
Route::post('getSum', [MobileApiController::class, 'getSum']);
Route::post('closeOrder', [MobileApiController::class, 'closeOrder']);
Route::post('login', [MobileApiController::class, 'login']);
});
Route::get('/', function (Request $request) {
dd(123);
});
Route::get('/files/{path}', function ($path) {
return Storage::response($path);
})->where('path', '.*');