Laravel Interview Questions & Answers

  1. Question 1. Does Laravel Support Caching?

    Answer :

    Yes, Its provides.

  2. Question 2. How To Use Delete Statement In Laravel?

    Answer :

    DB::delete(‘delete from  users where id = ?’, [1015]);

  3. Python Interview Questions

  4. Question 3. How To Use Update Statement In Laravel?

    Answer :

    DB::update(‘update users set city_id = 10 where id = ?’, [1015]);

  5. Question 4. How To Use Insert Statement In Laravel?

    Answer :

    DB::insert(‘insert into users (id, name, city_id) values (?, ?)’, [1, ‘Web technology’,10]);

  6. Python Tutorial

  7. Question 5. How To Use Select Query In Laravel?

    Answer :

    $users = DB::select(‘select * from users where city_id = ?’, 10);

    if(!empty($users)){
        foreach($users as $user){
        }

  8. PHP Interview Questions

  9. Question 6. How To Enable The Query Logging?

    Answer :

    DB::connection()->enableQueryLog();

  10. Question 7. How To Set Database Connection In Laravel?

    Answer :

    Database configuration file path is : config/database.php

    Following are sample of database file :

     ‘mysql’ => [
        ‘read’ => [
            ‘host’ => ‘localhost’,
        ],
        ‘write’ => [
            ‘host’ => ‘localhost’
        ],
        ‘driver’    => ‘mysql’,
        ‘database’  => ‘database’,
        ‘username’  => ‘root’,
        ‘password’  => ”,
        ‘charset’   => ‘utf8’,
        ‘collation’ => ‘utf8_unicode_ci’,
        ‘prefix’    => ”,
    ],

  11. PHP Tutorial
    Zend Interview Questions

  12. Question 8. What Are Bundles,reverse Routing And The Ioc Container ?

    Answer :

    • Bundles: These are small functionality which you may download to add to your web application.
    • Reverse Routing: This allows you to change your routes and application will update all of the relevant links as per this link.
    • IoC container: It gives you Control gives you a method for generating new objects and optionally instantiating and referencing singletons.
  13. Question 9. Compare Laravel With Codeigniter?

    Answer :

    Laravel :

    • Laravel is a framework with expressive, elegant syntax
    • Development is enjoyable, creative experience
    • Laravel is built for latest version of PHP
    • It is more object oriented compared to CodeIgniter
    • Laravel community is still small, but it is growing very fast.

    Codeigniter :

    • CodeIgniter is a powerful PHP framework
    • Simple and elegant toolkit to create full-featured web applications.
    • Codeigniter is an older more mature framework
    • It is less object oriented compared to Laravel.
    • Codeigniter community is large.

     

  14. AJAX Interview Questions

  15. Question 10. What Are The Feature Of Laravel 5.0?

    Answer :

    • Method injection
    • Contracts
    • Route caching
    • Events object
    • Multiple file system
    • Authentication Scaffolding
    • dotenv – Environment Detection
    • Laravel Scheduler
  16. Zend Tutorial

  17. Question 11. Explain About Laravel Project?

    Answer :

    • Laravel is one of the most popular PHP frameworks used for Web Development.
    • This framework is with expressive, elegant syntax. 
    • It is based on model–view–controller (MVC) architectural pattern. 
  18. MySQL Interview Questions

  19. Question 12. What Are Advantages Of Laravel?

    Answer :

    • Easy and consistent syntax
    • Set-up process is easy
    • customization process is easy
    • code is always regimented with Laravel
  20. Python Interview Questions

  21. Question 13. What Is Laravel?

    Answer :

    • Laravel is a open-source PHP framework developed by Taylor Otwell used for Developing the websites. 
    • Laravel helps you create applications using simple, expressive syntax. 
  22. AJAX Tutorial

  23. Question 14. What Is System Requirement For Installation Of Laravel 5.2 (latest Version)?

    Answer :

    • PHP >= 5.5.9
    • OpenSSL PHP Extension
    • PDO PHP Extension
    • Mbstring PHP Extension
    • Tokenizer PHP Extension
  24. Question 15. How To Install Laravel?

    Answer :

    We can install the Laravel in following ways. 

    • Laravel Installer
    • Composer Create-Project
  25. Drupal Interview Questions

  26. Question 16. Is Laravel An Open Source?

    Answer :

    Yes, Download the framework and use as per your requirement 

  27. MySQL Tutorial

  28. Question 17. What Is Offical Website Url Of Laravel?

    Answer :

    laravel.com. 

  29. WordPress Interview Questions

  30. Question 18. In Which Language It Was Written?

    Answer :

    PHP. 

  31. PHP Interview Questions

  32. Question 19. What Is Current Stable Version Of Laravel?

    Answer :

    Version 5.2.36 dated June 6, 2016

  33. Drupal Tutorial

  34. Question 20. When Laravel Was Launched?

    Answer :

    June 2011

  35. Java Abstraction Interview Questions

  36. Question 21. What Developed The Laravel?

    Answer :

    Taylor Otwell.

  37. Question 22. What Are System Requirement For Laravel 5.0?

    Answer :

    Following are system requirements:

    • PHP >= 5.4, PHP < 7
    • Mcrypt PHP Extension
    • OpenSSL PHP Extension
    • Mbstring PHP Extension
    • Tokenizer PHP Extension
  38. WordPress Tutorial