Laravel/Laravel MCQ (Multiple Choice Question) Set 1 Sample Test,Sample questions

Question:
 Artisan command to flush the application cache:

1. cache:flush

2.cache:clear

3.cache:forget

4.cache:remove

Posted Date:-2022-10-30 04:16:39


Question:
 For what do the .env is used?

1.For setting environment variables

2.For running cron jobs

3. For tracking vendors

4.None of these

Posted Date:-2022-10-30 04:20:42


Question:
 In which file we can set database connections?

1.database.php file

2.config.php file

3..env file

4.None of these

Posted Date:-2022-10-30 01:40:44


Question:
 Interpolation of variable in laravel done using

1.compact

2. {{}}

3.helpers

4.None of these

Posted Date:-2022-10-30 04:22:13


Question:
 What are the ways to get the data from database in laravel?

1.Query Builder

2.Eloquent ORM

3.both a and b

4.None of These

Posted Date:-2022-10-30 01:56:59


Question:
 What is the minimum PHP version required to install Laravel 5.3?

1.7.1

2.5.6.4

3. 5.3.2

4.5.4.3

Posted Date:-2022-10-30 04:26:45


Question:
 Where do we need to set database connection in Laravel?

1.config.php

2.setting.php

3.In seed files

4..ENV file

Posted Date:-2022-10-30 04:26:01


Question:
 which command is used to clear the cache in laravel?

1.php artisan cache:clear

2.php artisan cache:clearall

3. php artisan clear:cache

4.None of These

Posted Date:-2022-10-30 03:02:36


Question:
 Which directory contain “robot.txt” file ?

1.app

2.public

3.config

4.storage

Posted Date:-2022-10-30 04:21:29


Question:
Bootstrap directory in Laravel is used to

1. Initialize a Laraval application

2.Call laravel library functions

3.Load the configuration files

4.Load laravel classes and models

Posted Date:-2022-10-30 04:12:29


Question:
By default laravel project runs on which PORT?

1.3000

2.5000

3.8000

4.7000

Posted Date:-2022-10-30 01:34:49


Question:
Can laravel application support caching?

1.Yes

2.No

3.Can't Say

4. None of these

Posted Date:-2022-10-30 01:43:37


Question:
CLI Command to create controller in laravel?

1.php artisan make:controller Mycontroller

2.php artisan create:controller Mycontroller

3.php artisan controller Mycontroller

4.None of these

Posted Date:-2022-10-30 01:37:03


Question:
CLI Command to migrate in Laravel project?

1.php artisan create migration

2.php artisan migrate

3.php artisan serve

4.None of these

Posted Date:-2022-10-30 01:35:35


Question:
Command to check the current version of the Laravel Framwork?

1.php artisan main --version

2.php artisan --version status

3.php artisan check --version

4.php artisan --version

Posted Date:-2022-10-30 01:45:39


Question:
Command to check the current version of the Laravel Framwork?

1. php artisan main --version

2. php artisan --version status

3.php artisan check --version

4.php artisan --version

Posted Date:-2022-10-30 01:49:25


Question:
Command to check the status of migration in laravel application?

1.php artisan migration status

2.php artisan status

3.php artisan migrate:status

4.None of These

Posted Date:-2022-10-30 01:38:30


Question:
Command to create middleware in laravel application?

1.php artisan make:middleware Mymiddleware

2.php artisan middleware Mymiddleware

3.php artisan create:middleware Mymiddleware

4.php artisan middleware:make Mymiddleware

Posted Date:-2022-10-30 01:55:36


Question:
Command to Disable Maintenance Mode in laravel?

1.php artisan up

2.php artisan up:maintenance

3.php artisan up:live

4.None of These

Posted Date:-2022-10-30 03:06:47


Question:
Command to enable maintenance mode in laravel?

1.php artisan down

2.php artisan down:maintenance

3.php artisan maintenance

4. None of these

Posted Date:-2022-10-30 03:06:00


Question:
Command to get the route list in Laravel?

1.php artisan list

2.php artisan route:list

3.php artisan route

4.php artisan list:all

Posted Date:-2022-10-30 01:36:16


Question:
Command to install laravel project?

1.composer create-project laravel/laravel myproject

2.composer new-project laravel/laravel myproject

3.composer create-project new laravel/laravel myproject

4.None of these

Posted Date:-2022-10-30 01:34:07


Question:
Command to make migration in laravel?

1.php artisan migration table

2.php artisan make:migration create_tags_table

3.php artisan make-migration digit

4.None of these

Posted Date:-2022-10-30 01:37:45


Question:
Command to roll back migration operation in laravel?

1.php artisan rollback

2.php artisan migration:rollback

3.php artisan migrate:rollback

4.php artisan rollback migration

Posted Date:-2022-10-30 01:39:12


Question:
Command to rollback all migrations operations?

1.php artisan migrate:reset

2. php artisan migration:reset

3.php artisan reset

4.php artisan reset:migration

Posted Date:-2022-10-30 01:40:00


Question:
Command to start Laravel Application?

1.php artisan new

2.php artisan

3.php artisan start

4.php artisan serve

Posted Date:-2022-10-30 01:33:07


Question:
Full form of ORM in laravel?

1.Object Relation Mapping

2.Object Relation Master

3.Object Relation Manager

4.None of These

Posted Date:-2022-10-30 02:00:00


Question:
How to create a controller in laravel by cmd?

1.php artisan make: generate controller contoller_name

2.php artisan make:controller generate

3.php artisan make:controller --plain

4.php artisan make:request controller_name create

Posted Date:-2022-10-30 04:31:21


Question:
How to set a session data in Laravel?

1.$request->db->session('key', 'value');

2.$request->session()->set('key', 'value');

3.$request->session()->put('key', 'value');

4.None of These

Posted Date:-2022-10-30 04:27:56


Question:
In which directory robots.txt file is located?

1.models

2.public

3.views

4.controllers

Posted Date:-2022-10-30 03:04:05


Question:
In which folder .htaccess file is located in laravel?

1.model

2.controller

3.route

4.public

Posted Date:-2022-10-30 03:03:24


Question:
Laravel is based on which design pattern?

1.Singleton Design Pattern

2.MVC(Model View Controller) Pattern

3.Factory Design pattern

4.Observer pattern

Posted Date:-2022-10-30 02:00:55


Question:
Method to create Hash password in laravel?

1.$hashed = Hash::create('has-text');

2. $hashed = Hash::all('has-text');

3.$hashed = Hash::make('has-text');

4.None of these

Posted Date:-2022-10-30 04:07:58


Question:
Method to determine if the user is authenticated?

1.Auth::check()

2.Auth::user()

3.Auth::authenticated()

4.None of the these

Posted Date:-2022-10-30 04:05:09


Question:
Method to logout authenticated user from other devices in laravel?

1.Auth::logoutOtherDevices($currentPassword);

2.Auth::logoutAllDevices($currentPassword);

3.Auth::logout($currentPassword);

4.None of these

Posted Date:-2022-10-30 04:06:56


Question:
Method to logout authenticated user in laravel?

1.Auth::signout();

2.Auth::logout();

3.Auth::forgot();

4.None of these

Posted Date:-2022-10-30 04:05:50


Question:
The vendor directory contains

1. Laravel Framework code

2.Assets

3.Third-party code

4.Configuration files

Posted Date:-2022-10-30 04:18:16


Question:
The vendor directory contains in laravel?

1.Bootstrap dependencies

2.Laravel dependencies

3.Composer dependencies

4.None of These

Posted Date:-2022-10-30 04:04:16


Question:
What is laravel?

1.Framework

2.Programming Language

3.Code Editor

4.None of these

Posted Date:-2022-10-30 01:44:26


Question:
What is the HTTP Status Code for your website. When it is down for maintenance.

1. 501

2.200

3.400

4.503

Posted Date:-2022-10-30 04:23:13


Question:
What is the use of .env file in Laravel?

1.Setting Up local Environment variable

2.Optimization

3.Hosting

4.None of these

Posted Date:-2022-10-30 01:32:05


Question:
Which artisan command is used to remove the compiled class file.

1. clear-compiled

2.clear compiled

3.compiled:clear

4.clear:all

Posted Date:-2022-10-30 04:14:30


Question:
Which artisan command is used to remove the compiled class file.

1. clear-compiled

2.clear compiled

3.compiled:clear

4.clear:all

Posted Date:-2022-10-30 04:14:37


Question:
Which command is used to cache configuration in laravel?

1.php artisan cache:everything

2.php artisan cache:config

3. php artisan config:cache_all

4.php artisan config:cache

Posted Date:-2022-10-30 03:05:08


Question:
Which method breaks the collection into multiple, smaller collections of a given size

1.split()

2.chunk()

3.explode()

4.break()

Posted Date:-2022-10-30 04:15:37


Question:
Which method returns the average value of a given key ?

1. average()

2.avg()

3.median()

4.avg_val()

Posted Date:-2022-10-30 04:11:01


Question:
Who Created Laravel?

1.Margon Stan

2.Taylor Otwell

3.Samsy Twig

4.None of these

Posted Date:-2022-10-30 01:31:22


Question:
Who developed Laravel?

1. Rasmus Lerdorf

2.Taylor Otwell

3. James Gosling

4. Guido van Rossum

Posted Date:-2022-10-30 04:29:10


Question:
Who developed Laravel?

1. Rasmus Lerdorf

2.Taylor Otwell

3. James Gosling

4. Guido van Rossum

Posted Date:-2022-10-30 04:29:22


Question:
__() in laravel used for

1.Printing value

2. For string translation

3.both (a) and (b)

4.None of these

Posted Date:-2022-10-30 04:25:04


More MCQS

  1. Laravel MCQ (Multiple Choice Question) Set 1
  2. Laravel MCQ (Multiple Choice Question) Set 2
Search
R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on R4R.in website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!