model = app(Test::class); $function = Str::camel($action); return $this->$function($request); } public function sample(Request $request) { return $request; } }