C
C
codeschemer2017-01-13 05:00:31
Laravel
codeschemer, 2017-01-13 05:00:31

Laravel routing parameters naming convention?

I have a controller

public function edit(PlanBaseInfo $plan)
    {
        return view('plan.plan', compact('plan'));
    }

and route
Route::get('plan/{plan}/edit', '[email protected]');

The dump is a new PlanBaseInfo object that hooks attributes from the constructor.
I expected to get an object by id.
There are already about 100 routes in this project, and for the first time I encountered such a problem, I changed the names of the router parameters in others, it stops working. I did not find the relationship between the name and the model or controller. I didn't find it in the documentation either . Can you tell me where to look?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry, 2017-01-13
@codeschemer

Did you search well?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question