Tuesday 19 November 2019

Top 10 asked questions about Laravel


If you are Laravel Developer then this article will help you to know about the top 10 frequently asked questions about Laravel Framework. The questions answers might help to be confident about Laravel Framework knowledge or Job interview in 2019.

1. What is Laravel?
Answer: Laravel is an open-source PHP framework created by Tylor Otwell in june, 2011. It follows the MVC architectural pattern.

2. What is IoC (Inversion of Control) Container or Service container?
Answer: Laravel IoC container is a powerful tool for managing class dependencies and performing dependency injection. It's also known as Laravel service container.

3. What are Laravel Facades?
Answer: Laravel Facade is a way to use a no-static class method as statically. All laravel facades defined in namespace Illuminate\Support\Facades

4. What is Laravel Middleware?
Answer: Laravel middleware is an HTTP request filter. It works between request and response. There are many middlewares exist in Laravel by default. One called CSRF middleware which only validates our every POST request that has to contain CSRF token or not for security purpose. We can add our custom middleware according to our application need. Middleware directory in app/Http/Middleware.

5. What is CSRF? Why it is used?
Answer: CSRF stands for Cross-Site Request Forgery. Its uses for preventing XSS attack in our application. Laravel usages VerifyCsrfToken.php middleware to handle CSRF.

6. What is Bootstrap?
Answer: Bootstrap is the entry point to start the Laravel framework.

7. What is Laravel Contract?
Answer: Laravel’s Contracts are nothing but a set of interfaces that define the core services provided by the Laravel framework.

8. Which directories need to write permission to install & run Laravel?
Answer: Storage and bootstrap/cache

9. What is Composer?
Answer: Composer is a PHP dependency manager. It manages all our project library & class in one place. In traditional PHP development, we need to require or include all our required class again and again different places which were painful. Composer solved this problem.

10. Tell about Laravel latest version requirements and some features.
Answer: Now the latest version of Laravel is 6. Which is an LTS version.
Laravel 6 server requirements
PHP >= 7.2.0
BCMath PHP Extension
Ctype PHP Extension
JSON PHP Extension
Mbstring PHP Extension
OpenSSL PHP Extension
PDO PHP Extension
Tokenizer PHP Extension
XML PHP Extension
New Features on Laravel 6
Semantic Versioning
Laravel Vapor
Lazy Collections
Laravel UI
New Error Page Ignition
Job Middleware
and some improvements

No comments:

Post a Comment