Laravel Assessment Step 1 of 2 50% Name(Required) First Last Email(Required) Phone(Required)ResumeAccepted file types: pdf, docx, Max. file size: 5 MB.Portfolio Website Consent I agree not to cheat during the test. The answers are solely based on my knowledge and experience. I understand that I can face actions if cheating is discovered. What tools do you use to manage local server? ex. XAMPP, Homestead(Required) Where do we need to set database connection in Laravel?(Required) .env file config.php setting.php migrations.php How to set a session data in Laravel?(Required) $request->db->session('key', 'value'); $request->session()->put('key', 'value'); $request->session()->set('key', 'value'); $request->session('key', 'value'); Which directory not in side the app directory?(Required) Console Broadcasting Events Factories How to clear cache in Laravel?(Required) php artisan config: clear php artisan dump:cache php artisan cache: clear php artisan redis:clear Below options which come under Laravel array helper functions?(Required) Arr::add() Arr::divide() Arr:: accessible() All of the above How to get current route name?(Required) request()->route()->getName() \Illuminate\Support\Facades\Route:: currentRouteAction() \Illuminate\Http\Route::currentRouteName() Route::path(); CSRF protection is enabled on following routes(Required) web api console All of the above Can you use multiple databases in Eloquent model?(Required) Yes, by writing custom functionality Yes, using env variable Yes, using different connection name Not Possible How to enable sessions on api routes?(Required) Using StartSession middleware Using EncryptCookies middleware All of the above None of the above Can you call class methods statically?(Required) No Yes, using Facade Yes, using service container Yes, using singleton What function should you use to join array elements with a glue string?(Required) join_st implode connect make_array How do I log an error?(Required) report($error) Log::error($error) Log::error($error->getMessage()) Log::error("error", $error->toArray()) How to send a notification?(Required) Notification::send($users, new InvoicePaid($invoice)); $user->notify(new InvoicePaid($invoice)); User:: notify($user, new InvoicePaid($invoice)); Notification::notify($user, new InvoicePaid($invoice)); How to get current environment in Laravel?(Required) app()->environment() app()->environment("local") App::isDevelopment() All of the above How to generate random string?(Required) str_random() Str::random() substr(str_replace(['/', '+', '='], '', base64_encode(random_bytes(10))), 0, 10) All of the above Write an Eloquent Query to get users with admin role.Can you install local composer package? If yes explain howHow would you turn off CSRF protection on routes?Write a command to create Role Model with migrations.(Required) Can you explain how facades work under the hood?How do I send 5 emails and a text message efficiently to newly registered users?Write a middleware to optionally handle authenticationWhat is a resource controller?List types of relationships available in Laravel EloquentWhat is the purpose of using dd() function in laravel?What are Jobs and Middleware?Provide a short code snippet to change the Queue connection for a notificationExplain code snippet: substr(str_replace(['/', '+', '='], '', base64_encode(random_bytes(10))), 0, 10)(Required)List the 3rd party packages you most commonly useList the 3rd party packages you have used in the past