Created
August 3, 2020 09:02
-
-
Save geoidesic/fbd4d4a14ffe7b689134a2f299567427 to your computer and use it in GitHub Desktop.
Routing for CrudJsonControllerTrait
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Router::prefix('api', function (RouteBuilder $routes) { | |
$routes->connect('/{controller}/{id}/relationships/{foreignTableName}', ['_method' => 'DELETE', 'action' => 'deleterelationships']); | |
$routes->connect('/{controller}/{id}/relationships/{foreignTableName}', ['_method' => 'PATCH', 'action' => 'updaterelationships']); | |
$routes->connect('/{controller}/{id}/relationships/{foreignTableName}', ['_method' => 'POST', 'action' => 'postrelationships']); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment