While trying to change the status of user i am facing this problem. in route:
Route::get('userstatus/{id}/{status}', 'UserController@changeStatus');
in controller:
public function changeStatus($id, $status, User $user)
{
$user->update(array('status' => $status), $id);
return redirect('users');
}
In database i am storing status like : "active" "banned" "hold" why am i getting this problem?is there any solution?