I've got a resource route that I need to get to, but for some reason, when I POST to the route, my catch-all route is being triggered.
Here is my setup:
Routes.php
Route::group(array('prefix' => 'admin'), function() {
//THIS WORKS FINE
//Route::any('/facilities/{id}', 'FacilitiesController@update');
// I NEED THIS TO "CATCH" THE /facilities/{id} ROUTE
Route::resource('facilities', 'FacilitiesController');
});
App::before(function($request) {
Route::any( '/ADMIN/{path?}', function()
{
require '/ADMIN/index.php';
})->where('path', '.+');
});
In the code above, if I am using the "resource" method to define my routes, a POST to /facilities/{id} hits my catch-all at the bottom.
However, if I use the "any" method to define my route, I can POST to the route without issue.
Any ideas? I have a ton of routes to define and I would like to be able to define them as resources.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community