I\'m new to Laravel. I have created a model, a resource controller, and a route for one of my tables, I have modified the model class to use a particular table name, but the
There is a naming convention on Route Model binding.
Try to change the action call to this:
public function show(Tree $category)
{
var_dump($category);
}
Update: I looked in the source and you can also change the parameters name in resource Route declaration:
Route::resource('categories', 'CategoryController', ['parameters'=>['categories'=>'tree']]);
And use the $tree variable in action call
public function show(Tree $tree)