wi-adrema-plugin/routes.php

9 lines
363 B
PHP

<?php
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');