oc-adrema-plugin/routes.php

9 lines
363 B
PHP
Raw Normal View History

2024-01-31 22:33:35 +01:00
<?php
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');