You can create all web pages of a website to tell the search engine about the organizing site content. The crawlers of search engine read this file intelligently to crawl a website.
Category: Laravel Interview Question
https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQWVFjQ5rCH3w8I5JUGiE_GcKNaE-Wy_loi_w&s
-
Differentiate between delete() and softDeletes().
- delete(): remove all record from the database table.
- softDeletes(): It does not remove the data from the table. It is used to flag any record as deleted.
-
Explain Auth.
It is a method of identifying user login credential with a password. In Laravel it can be managed with a session which takes two parameters 1) username and 2) password.
-
How to configure a mail-in Laravel?
Laravel provides APIs to send an email on local and live server.
-
List out common artisan commands used in Laravel.
Laravel supports following artisan commands:
- PHP artisan down;
- PHP artisan up;
- PHP artisan make:controller;
- PHP artisan make:model;
- PHP artisan make:migration;
- PHP artisan make:middleware;
-
What is the use of dd() function?
This function is used to dump contents of a variable to the browser. The full form of dd is Dump and Die.
-
Explain fluent query builder in Laravel.
It is a database query builder that provides convenient, faster interface to create and run database queries.
-
What are common HTTP error codes?
The most common HTTP error codes are:
- Error 404 – Displays when Page is not found.
- Error- 401 – Displays when an error is not authorized
-
Which class is used to handle exceptions?
Laravel exceptions are handled by App\Exceptions\Handler class
-
Explain PHP artisan
An artisan is a command-line tool of Laravel. It provides commands that help you to build Laravel application without any hassle.