
Laravel Fundamentals
Project structure, artisan, routing, controllers, views, Blade templates, service container
1What is Artisan in Laravel?
What is Artisan in Laravel?
Answer
Artisan is Laravel's built-in command-line interface. It automates many repetitive tasks such as creating controllers, models, migrations, and other components. This interface streamlines development by providing ready-to-use commands and the ability to create custom commands.
2Which folder contains the route files in a Laravel application?
Which folder contains the route files in a Laravel application?
Answer
The routes folder located at the project root contains all route definition files. By default, Laravel includes web.php for web routes with sessions and CSRF, api.php for stateless API routes, console.php for Artisan commands, and channels.php for real-time broadcast channels.
3Which Artisan command lists all defined routes?
Which Artisan command lists all defined routes?
Answer
The php artisan route:list command displays a summary table of all registered routes in the application. This table includes HTTP methods, URIs, route names, associated actions, and applied middlewares. This command is essential for debugging and verifying routing configuration.
Where are Blade views located by default in a Laravel project?
What file extension is used for Blade templates?
+17 interview questions
Other Laravel interview topics
PHP Basics
PHP OOP Essentials
Composer & Autoloading
Laravel Routing
Blade Templates
Request & Response
Eloquent ORM Basics
Eloquent Relationships
Migrations & Schema Builder
Validation & Forms
Authentication
Authorization & Policies
API Resources & Authentication
Middleware
Service Container & DI
Queues & Jobs
Events & Listeners
Notifications & Mail
File Storage
Testing & PHPUnit
Caching
Livewire & Inertia
Eloquent Advanced
Repository Pattern
Laravel Packages
Performance Optimization
Security Best Practices
Laravel Octane
Laravel Distributed Systems
Observability & Monitoring
Deployment & DevOps
Master Laravel for your next interview
Access all questions, flashcards, technical tests, code review exercises and interview simulators.
Start for free