I am building this website and I want to pass url parameters
http://movies.com/people?genre=action
Should generate all the people listed with genre=action
This is my route
Route::resource(Str::slug(trans('main.people')), 'ActorController');
This is my ActorController
public function index($input)
{
if (isset($input['genre']) && $input['genre'] != 'all')
{
return $this->actor->where('genre', 'like', '$input');
return View::make('Actor.All')->withActors($actors);
}
else
{
return View::make('Actor.All')->withActors($actors);
}
}
I keep receiving this error ErrorException Missing argument 1 for ActorController::index()
http://laravel.com/docs/requests#basic-inputGETdata