I think, You should use
Route::get('user/{id}', 'UserController@profile')->where('id','[1-9][0-9]*');
Controller
public function profile($id){
if($user = User::findOrFail($id)){
....
}
else {
....
}
}
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community