When u set a pattern, then this will apply to all routes that use {id}.
In your controller you can get the the parameter like:
public function edit($id) {
$user = Sentry::findUserById($id);
return View::make('backend.user.edit', compact('user'));
}
Does this not work? And did you try to pass parameters that are not numbers?
And did you try to pass parameters that are not numbers?
Yes, I was hoped check a parameters type in routes. Otherwise I will be have a lot of duplicated code.
I'm begginer in the Laravel and do not know how to better organize a common code to avoid duplications.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community