1. Tell me how To Install Laravel?
We can install the Laravel in following ways.
☛ Laravel Installer
☛ Composer Create-Project
2. Please explain what Is Laravel?
☛ 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.
3. Do you know About Laravel Project?
☛ 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.
4. Do you know what is Laravel Elixir?
Laravel Elixir provides a clean, fluent API for defining basic Gulp tasks for your Laravel application. Elixir supports common CSS and JavaScript preprocessors like Sass and Webpack. Using method chaining, Elixir allows you to fluently define your asset pipeline.
5. Please explain Events in laravel?
An event is an action or occurrence recognized by a program that may be handled by the program or code. Laravel events provides a simple observer implementation,that allowing you to subscribe and listen for various events/actions that occur in your application.
All Event classes are generally stored in the app/Events directory, while their listeners are stored in app/Listeners of your application.
6. Do you know Laravel Service Container?
Laravel Service Container is used to perform dependency injection, wherein the dependencies of a class is injected via constructor or other method.
7. Tell us do you have any experience with LAMP?
LAMP is an open-source solution stack that contains everything you need to create a complete, stand-alone platform for your web application-Linux, Apache, MySQL, and PHP. This question is a good opportunity for your prospective programmer to detail any experience they have taking a web project from conception to completion.
8. Tell me how To Use Select Query In Laravel?
$users = DB::select('select * from users where city_id = ?', 10);
if(!empty($users)){
foreach($users as $user){
}
}
9. Explain me what directories that need to be writable laravel installation?
After installing Laravel, you may need to configure some permissions. Directories within the storage and the bootstrap/cache directories should be writable by your web server or Laravel will not run. If you are using the Homestead virtual machine, these permissions should already be set.
10. Tell us what Are Bundles, reverse Routing And The Ioc Container?
☛ 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.
11. List Types of the relationships supported by Laravel?
Laravel support 7 types of table relationships, they are
☛ One To One
☛ One To Many
☛ One To Many (Inverse)
☛ Many To Many
☛ Has Many Through
☛ Polymorphic Relations
☛ Many To Many Polymorphic Relations
12. Tell me what is Service Providers?
Laravel Service providers are used for all Laravel applications including Laravel core service applications.
Also, most of the service container bindings are registered inside service providers.
13. Please explain Laravel Query Builder?
Laravel's database query builder provides a suitable, easy interface to creating and organization database queries. It can be used to achieve most database operations in our application and works on all supported database systems. The Laravel query planner uses PDO restriction necessary to keep our application against SQL injection attacks.
14. Tell me what is database migration? And how to use it to add insert initial data to database?
Migrations are like version control for your database, allowing your team to easily modify and share the application's database schema. Migrations are typically paired with Laravel's schema builder to easily build your application's database schema. If you have ever had to tell a teammate to manually add a column to their local database schema, you've faced the problem that database migrations solve.
Laravel includes a simple method of seeding your database with test data using seed classes. All seed classes are stored in the database/seeds directory. Seed classes may have any name you wish, but probably should follow some sensible convention, such as UsersTableSeeder, etc. By default, a DatabaseSeeder class is defined for you. From this class, you may use the call method to run other seed classes, allowing you to control the seeding order.
15. Tell me how to implement you own package in Laravel?
You can create a package in laravel using the following steps:
☛ 1. Package folder and name
☛ 2. Composer.json file for the package
☛ 3. Loading package via main composer.json and PSR-4
☛ 4. Creating a Service Provider
☛ 5. Create a Controller for your package
☛ 6. Create our Routes.php file
16. Do you know what is the latest version of laravel?
Laravel 5.5 is the latest version of Laravel. Here are steps to install and configure laravel 5.5
17. List out the Databases Laravel supports?
Currently Laravel supports four major databases, they are :-
☛ MySQL
☛ Postgres
☛ SQLite
☛ SQL Server
18. Explain few features of Laravel?
Here are some few features:
☛ Bundles
☛ Query Builder
☛ Reverse Routing
☛ IOC Container feature
☛ Database Seeding
☛ Automatic pagination
20. Tell me does Laravel Support Caching?
Yes, Its provides.
21. Tell me what is Laravel Eloquent?
The Eloquent ORM included with Laravel provides a beautiful, simple ActiveRecord implementation for working with your database. Each database table has a corresponding "Model" which is used to interact with that table. Models allow you to query for data in your tables, as well as insert new records into the table.
22. Tell me how To Use Insert Statement In Laravel?
DB::insert('insert into users (id, name, city_id) values (?, ?)', [1, 'Web technology',10]);
23. Tell me what Is Current Stable Version Of Laravel?
Version 5.2.36 dated June 6, 2016
24. Tell us how long have you been using Laravel?
This question can help decide what level of questions to ask.
25. Tell me how do I see all of the routes that are defined?
Tests basic knowledge of artisan
26. Do you know how To Use Delete Statement In Laravel?
DB::delete('delete from users where id = ?', [1015]);
27. Do you know what Developed The Laravel?
Taylor Otwell.
29. Explain me what is your favorite feature of Laravel?
If they only say "it's easy to get started" then it's probably safe to assume they are not an expert.
30. Tell me does laravel support php 7?
Yes,laravel supports php 7
31. Tell me how would you add a 3rd party package like Sentry?
tests both Composer knowledge and registering service providers in Laravel)**
32. Do you know validations in laravel?
In Programming validations are a handy way to ensure that your data is always in a clean and expected format before it gets into your database. Laravel provides several different ways to validate your application incoming data.By default Laravel's base controller class uses a ValidatesRequeststrait which provides a convenient method to validate all incoming HTTP requests coming from client.You can also validate data in laravel by creating Form Request.
33. Do you know what is Method Spoofing in Laravel?
As HTML forms does not supports PUT, PATCH or DELETE request. So, when defining PUT, PATCH or DELETE routes that are called from an HTML form, you will need to add a hidden _method field to the form. The value sent with the _method field will be used as the HTTP request method:
<form action="/foo/bar" method="POST">
<input type="hidden" name="_method" value="PUT">
<input type="hidden" name="_token" value="{{ csrf_token() }}">
</form>
To generate the hidden input field _method, you may also use the method_field helper function:
<?php echo method_field('PUT'); ?>
In Blade template you can write it as below
{{ method_field('PUT') }}
34. Tell me what Are The Feature Of Laravel 5.0?
☛ Method injection
☛ Contracts
☛ Route caching
☛ Events object
☛ Multiple file system
☛ Authentication Scaffolding
☛ dotenv – Environment Detection
☛ Laravel Scheduler
35. Please explain what are the main differences between Laravel 4 and Laravel 5.x?
Summarizing Laravel 5.0 Release notes from the above article:
☛ 1. The old app/models directory has been entirely removed.
☛ 2. Controllers, middleware, and requests (a new type of class in Laravel 5.0) are now grouped under the app/Http directory.
☛ 3. A new app/Providers directory replaces the app/start files from previous versions of Laravel 4.x.
☛ 4. Application language files and views have been moved to the resources directory.
☛ 5. All major Laravel components implement interfaces which are located in the illuminate/contracts repository.
☛ 6. New route:cache Artisan command to drastically speed up the registration of your routes.
☛ 7. Laravel 5 now supports HTTP middleware, and the included authentication and CSRF "filters" have been converted to middleware.
☛ 8. you may now type-hint dependencies on controller methods.
☛ 9. User registration, authentication, and password reset controllers are now included out of the box, as well as simple corresponding views, which are located at resources/views/auth.
☛ 10. You may now define events as objects instead of simply using strings.
☛ 11. In addition to the queue job format supported in Laravel 4, Laravel 5 allows you to represent your queued jobs as simple command objects. These commands live in the app/Commands directory.
☛ 12. A database queue driver is now included in Laravel, providing a simple, local queue driver that requires no extra package installation beyond your database software.
☛ 13. Laravel command scheduler allows you to fluently and expressively define your command schedule within Laravel itself, and only a single Cron entry is needed on your server.
☛ 14. The php artisan tinker command now utilizes Psysh by Justin Hileman, a more robust REPL for PHP.
☛ 15. Laravel 5 now utilizes DotEnv by Vance Lucas.
☛ 16. Laravel Elixir, by Jeffrey Way, provides a fluent, expressive interface to compiling and concatenating your assets.
☛ 17. Laravel Socialite is an optional, Laravel 5.0+ compatible package that provides totally painless authentication with OAuth providers.
☛ 18. Laravel now includes the powerful Flysystem filesystem abstraction library, providing pain free integration with local, Amazon S3, and Rackspace cloud storage - all with one, unified and elegant API!
☛ 19. Laravel 5.0 introduces form requests, which extend the IlluminateFoundationHttpFormRequest class. These request objects can be combined with controller method injection to provide a boiler-plate free method of validating user input.
☛ 20. The Laravel 5 base controller now includes a ValidatesRequests trait. This trait provides a simple validate method to validate incoming requests.
☛ 21. new Artisan generator commands have been added to the framework.
☛ 22. The popular dd helper function, which dumps variable debug information, has been upgraded to use the amazing Symfony VarDumper.