12 lines
476 B
PHP
12 lines
476 B
PHP
<?php
|
|
|
|
use Silva\Adrema\Support\ClearCache;
|
|
use Silva\Adrema\Support\Proxy;
|
|
|
|
Route::get('/adrema-api/{route}', fn (string $route) => Response::json(app(Proxy::class)->run($route, 'get')))
|
|
->where('route', '[a-zA-Z0-9\-/]+')->middleware('api');
|
|
Route::post('/adrema-api/{route}', fn (string $route) => app(Proxy::class)->submit($route))
|
|
->where('route', '[a-zA-Z0-9\-/]+')->middleware('api');
|
|
|
|
Route::get('/adrema/clear-cache', fn () => app(ClearCache::class)->run());
|