MYHOSPITALNOW.COM

Find Trusted Doctors & Hospitals

Discover healthcare providers, compare hospitals, and explore treatment options worldwide.

Free Treatment Quotes • Doctor Search • Hospital Comparison

Find Healthcare Options

www.myhospitalnow.com

Top 10 Basic Laravel Interview Questions.

Q:-1 What is Laravel?

Laravel is a free, open-source PHP web framework, created by Taylor Otwell and intended for the development of web applications following the model–view–controller (MVC) architectural pattern.

Q:-2 How to Install Laravel via Composer?

composer create-project –prefer-dist laravel/laravel myproject

Q:-3 How to Install any Specific version of Laravel via Composer?

Q:-4 What is php artisan?

  1. Artisan is the command-line interface included with Laravel.
  2. It provides a number of helpful commands that can assist you while you build your application.
  3. To view a list of all available Artisan commands, you may use the list command:

Q:-5 How to turn off CRSF in Laravel?

  1. Remove or comment out this line in app\Http\Kernel.php
  2. \App\Http\Middleware\VerifyCsrfToken::class,

Q:-6 List types of relationships available in Laravel Eloquent?

  1. Eloquent relationships are defined as methods on your Eloquent model classes
  2. Relationships supported by Laravel Eloquent ORM:
    1. One To One – hasOne
    2. One To Many – hasMany
    3. One To Many(Inverse) – belongsTo
    4. Many To Many – belongsToMany
    5. Has Many Through – hasManyThrough
    6. Polymorphic Relations
    7. Many To Many Polymorphic Relations

Q:-7 What is the purpose of using dd() function in laravel?

dd() – Stands for “Dump and Die”
Laravel’s dd() is a helper function ,which will dump a variable’s contents to the browser and halt further script execution.

Q:-8 What is Middleware in Laravel?

Middleware provide a convenient mechanism for filtering all HTTP requests entering in your application.

Q:-9 What is Fillable Attribute in a Laravel Model?

In eloquent ORM, $fillable is an array which contains all those fields of table which can be filled using mass-assignment.

Mass assignment, means to send an array to the model to directly create a new record in Database

Q:-10 List out databases that laravel supports?

Currently, Laravel supports four databases:

  1. MySQL
  2. PostgreSQL
  3. SQLite
  4. SQL Server

Note:

you can use NoSQL databses with laravel by installing their packages.

Laravel doesn’t support mongoDB out of the box, you’ll have to install a third party package or create your own implementation. I’d suggest using https://github.com/jenssegers/laravel-mongodb , it seems a pretty popular package on packagist atleast. Or you could use the php mongodb class https://secure.php.net/manual/en/class.mongodb.php.

Find Trusted Cardiac Hospitals

Compare heart hospitals by city and services — all in one place.

Explore Hospitals
sam
MotoShare.in is your go-to platform for adventure and exploration. Rent premium bikes for epic journeys or simple scooters for your daily errands—all with the MotoShare.in advantage of affordability and ease.

Related Posts

What is Laravel and use cases of Laravel?

What is Laravel? Laravel is an open-source, free PHP web framework designed for the development of web applications following the model-view-controller (MVC) architectural pattern. It was generated…

Read More

What is Laravel? and Its Features.

In this Tutorial we are going to learn about Laravel. But most importantly you have to know about PHP first. If you don’t know about PHP and…

Read More

HOW TO CREATE EVENT CALENDAR IN LARAVEL? PART-2

Step 1.Create a Laravel Project Firstly, Create a new project in laravel, so we open Git Bash,  Go to My Computer/This PC–>LocalDisk(C:)–>Xampp–>Htdocs (Press right click on Mouse)…

Read More

8 Features That Make PHP Laravel Framework Best

Why Laravel is the best php framework PHP is undoubtedly one of the most popular and widely used programming languages used for web application development that is…

Read More

Directory Structure of Laravel

The image is showing the files and directories of laravel. It is automatically created when we create a project using a composer or laravel installer. Let’s we…

Read More

55 Steps For build a project in php Laravel Framework.

1.laravel new project (open command prompt on xampp/htdocs directory) 2.cd projectname 4.Customise users table(database/migration/create_users_table.php) 5.Make Model and Migration for Role Table 6.Customise roles table(database/migration/create_roles_table.php) 7.Make Relationship between…

Read More