Answer: A PHP web application framework with expressive syntax
Laravel is a free, open-source PHP web application framework created by Taylor Otwell. It follows the MVC architectural pattern and emphasizes elegant syntax.
2. What are Laravel queues?
Advanced
Answer: Defer time-consuming tasks to background
Queues defer time-consuming tasks (emails, API calls) to background. Improves response time. Supports multiple drivers: database, redis, beanstalkd, SQS.
3. What is middleware in Laravel?
Intermediate
Answer: HTTP request filter
Middleware provides a mechanism for filtering HTTP requests. Can authenticate, log, modify requests/responses. Defined in app/Http/Middleware.
4. Which command creates a new Laravel project?
Beginner
Answer: Both a and b
Both `composer create-project laravel/laravel project-name` and `laravel new project-name` (requires Laravel Installer) create new Laravel projects.
5. How do you create a job?
Advanced
Answer: php artisan make:job JobName
`php artisan make:job JobName` creates a job. Dispatch with JobName::dispatch(). Run workers with `php artisan queue:work`.
`php artisan make:middleware MiddlewareName` creates middleware. Register in app/Http/Kernel.php in $middleware, $middlewareGroups, or $routeMiddleware.
7. What is Laravel authentication?
Intermediate
Answer: Both a and b
Laravel provides complete authentication system including registration, login, password reset. Use `php artisan make:auth` (Laravel UI) or Laravel Breeze/Jetstream.
8. What is Artisan?
Beginner
Answer: Laravel command-line interface for development tasks
Artisan is Laravel's command-line interface. It provides helpful commands for application development like migrations, seeding, and code generation.
9. What are Laravel events?
Advanced
Answer: Provide observer pattern implementation
Events provide observer pattern implementation. Decouple aspects of application. Event fired, listeners handle it. Register in EventServiceProvider.
10. What is event broadcasting?
Advanced
Answer: Broadcasts events to client-side via WebSockets
Broadcasting broadcasts server-side events to client-side JavaScript via WebSockets (Pusher, Ably, Laravel Echo). Enables real-time features.
`php artisan make:controller ControllerName` creates a new controller. Add --resource flag for resourceful controller with CRUD methods.
21. What is testing in Laravel?
Advanced
Answer: Built-in testing with PHPUnit
Laravel provides testing with PHPUnit out of box. Write feature tests (HTTP tests) and unit tests. Run with `php artisan test`.
22. What is database testing with factories?
Advanced
Answer: Generate fake data for testing
Factories generate fake model data for testing and seeding. Use Faker library. Define in database/factories. Create with ModelName::factory()->create().
23. What is Blade in Laravel?
Beginner
Answer: Laravel templating engine
Blade is Laravel's powerful templating engine. Blade template files use .blade.php extension and allow PHP code with clean syntax.
24. What is a Form Request?
Intermediate
Answer: Custom request class with validation logic
Form Requests are custom request classes encapsulating validation logic. Created with `php artisan make:request RequestName`.
Ready to test yourself?
The full Laravel bank has 90 questions across 3 difficulty levels — timed, shuffled, and scored.