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?
- Artisan is the command-line interface included with Laravel.
- It provides a number of helpful commands that can assist you while you build your application.
- To view a list of all available Artisan commands, you may use the list command:
Q:-5 How to turn off CRSF in Laravel?
- Remove or comment out this line in app\Http\Kernel.php
Q:-6 List types of relationships available in Laravel Eloquent?
- Eloquent relationships are defined as methods on your Eloquent model classes
- Relationships supported by Laravel Eloquent ORM:
- One To One – hasOne
- One To Many – hasMany
- One To Many(Inverse) – belongsTo
- Many To Many – belongsToMany
- Has Many Through – hasManyThrough
- Polymorphic Relations
- 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:
- SQL Server
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.
- Upload image in the database with local folder and image send mail. - October 23, 2020
- How to protect .env file in Laravel. - September 10, 2020
- How to upload laravel project on cPanel. - September 9, 2020