NotFoundHttpException when editing an object
Ad
I have tournament > category > setting, and I need to edit the settings.
For the creation ( http://laravel.dev:8000/tournaments/1/categories/5/settings/create ) , I have no problem, only updating is failing ( http://laravel.dev:8000/tournaments/1/categories/2/settings/5/edit )
I checked the params (1,2,5), and they are OK.
I use my route with resource()
Route::resource('tournaments/{tournamentId}/categories/{categoryId}/settings', 'CategorySettingsController');
When I type php artisan route:list, I get this route:
GET|HEAD | tournaments/{tournamentId}/categories/{categoryId}/settings/{settings}/edit | tournaments.{tournamentId}.categories.{categoryId}.settings.edit | App\Http\Controllers\[email protected] | auth,roles |
So, as for me, everything should be OK, I don't understand why I get a NotFoundHttpException
Any idea????
Ad
Answer
Ad
in RouteServiceProvider.php, I had binding defined:
$router->model('settings','App\Settings');
So General settings bindings was conflicting with Category Settings
Ad
source: stackoverflow.com
Related Questions
Ad
- → "failed to open stream" error when executing "migrate:make"
- → October CMS Plugin Routes.php not registering
- → OctoberCMS Migrate Table
- → OctoberCMS Rain User plugin not working or redirecting
- → October CMS Custom Mail Layout
- → October CMS - How to correctly route
- → October CMS create a multi select Form field
- → October CMS - Conditionally Load a Different Page
- → How to disable assets combining on development in OctoberCMS
- → October CMS - Radio Button Ajax Click Twice in a Row Causes Content to disappear
- → OctoberCms component: How to display all ID(items) instead of sorting only one ID?
- → In OctoberCMS how do you find the hint path?
- → How to register middlewares in OctoberCMS plugin?
Ad