wi-adrema-plugin/routes.php

12 lines
476 B
PHP
Raw Normal View History

2024-01-31 22:33:35 +01:00
<?php
2024-06-10 00:13:43 +02:00
use Silva\Adrema\Support\ClearCache;
2024-02-03 22:36:56 +01:00
use Silva\Adrema\Support\Proxy;
2024-01-31 22:33:35 +01:00
2024-02-08 02:23:11 +01:00
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))
2024-02-03 22:36:56 +01:00
->where('route', '[a-zA-Z0-9\-/]+')->middleware('api');
2024-06-10 00:13:43 +02:00
Route::get('/adrema/clear-cache', fn () => app(ClearCache::class)->run());