Aptitude Reasoning English GK Computer Knowledge Programming Skill Banking Software Testing



Question - 1

Where do we need to set database connection in Laravel?

  • setting.php
  • config.php
  • .ENV file
  • In seed files
Solutions
Question - 2

In Laravel Interpolation done by using below which symbol/ file?

  • []
  • {}
  • {{}}
  • ""
Solutions
Question - 3

What would this touch() function do?
 

$obj= User::find(1);
$obj->touch();

  • store a user object in cache
  • update updated_at to current timestamp
  • created a new filed in database
  • None of these
Solutions
Question - 4

After running "artisan down", The project will show the maintenance page. What would be HTTP Status return Code?

  • 303
  • 503
  • 404
  • 300
Solutions
Question - 5

Which directory contain “robot.txt” file ? 

  • public
  • app
  • config
  • routes
Solutions
Question - 6

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

  • 5.6.4
  • 5.3.2
  • 5.4.3
  • 7.1
Solutions
Question - 7

$user = DB::table('users')->SomeName()->first();
For getting newest registered user, In above function
What would be the below options replace by SomeName.

  • latest
  • last
  • newest
  • last_user
Solutions
Question - 8

Which functions are used for database migration classes?

  • up() and down()
  • migrate() and upmigrate()
  • insert() and rollback()
  • None of these
Solutions
Question - 9

How to set a session data in Laravel?

  • $request->session()->put('key', 'value');
  • $request->db->session('key', 'value');
  • $request->session()->set('key', 'value');
  • None of these
Solutions
Question - 10

Which directory not in side the app directory?

  • Broadcasting
  • resources
  • Console
  • Events
Solutions
Question - 11

How to create a controller in laravel by cmd?

  • php artisan make:controller generate
  • php artisan make:controller --plain
  • php artisan make: generate controller contoller_name
  • php artisan make:request controller_name create
Solutions
Question - 12

View files in Laravel end in which extension?

  • .blade.php
  • .php
  • .php.blade
  • .lar.php
Solutions
Question - 13

How to check current laravel version install your system?

  • php artisan --version
  • php artisan check --version
  • php artisan make --version
  • None of these
Solutions
Question - 14

Where is the routing file located in Laravel ?

  • routes/
  • config/
  • app/Http/
  • vendor/
Solutions
Question - 15

How to clear cache in Laravel?

  • php artisan cache: clear
  • php artisan config: clear
  • php artisan cache: clear
  • All of Above
Solutions
Question - 16

How to get IP address in Laravel?

  • $request->ip();
  • $request->ip_address();
  • $request->ipAddress();
  • None of these
Solutions
Question - 17

What is ORM in laravel?

  • Object-relational Mapping
  • Object-Rotational Mechanisim
  • Object-related Modifier
  • Overloaded-relational Mapping
Solutions
Question - 18

Below options which come under Laravel array helper functions?

  • Arr::add()
  • Arr::has()
  • Arr::only()
  • All the above
Solutions
Question - 19

How to get current action name in Laravel?

  • request()->DB->getActionMethod()
  • request()->getActionMethod()
  • request()->route()->getActionMethod()
  • None of these
Solutions
Question - 20

How to get current route name?

  • request()->route()->getName()
  • request()->getName()
  • request()->route->getName()
  • None of these
Solutions
Tags:
Laravel MCQ (Multiple Choice Questions), Advanced Laravel MCQ, Laravel MCQ Online test,Laravel MCQ Questions and answers PDF, Laravel Interview Questions With Answers, Laravel Technical Questions with full explanatio