⚙️

Backend Technologies · PHP

Laravel — Free Learning Resources

Free, printable resources for Laravel — practice problems, quick-reference cheatsheet, and an interview prep sheet. No sign-up required.

📝Practice Worksheet

LaravelPractice Worksheet

Structured exercises and problems to build hands-on Laravel skills. Work through key concepts step by step.

📋Cheatsheet

LaravelCheatsheet

One-page quick-reference for Laravel — key syntax, commands, patterns, and best practices at a glance.

🎯Interview Sheet

LaravelInterview Sheet

Top Laravel interview questions with concise answers. Get ready for any technical round with this focused prep sheet.

About Laravel

Laravel is the PHP framework for web artisans — elegant, expressive, and equipped with a full ecosystem: Eloquent ORM, Blade templating, Artisan CLI, queues, events, and first-party packages for auth, payments, and testing. Laravel consistently tops PHP developer satisfaction surveys and powers countless SaaS products worldwide.

LaravelCheat Sheet — What's Covered

  • Eloquent ORM — models, relationships, eager loading, and query scopes
  • Artisan CLI — generators, migrations, seeders, and custom commands
  • Blade templating — directives, components, layouts, and slots
  • Service container, service providers, and facades
  • Queues, events, broadcasting, and scheduled tasks

Frequently Asked Questions — Laravel

What is Laravel's service container?

The service container is an IoC container managing class dependencies. Bind interfaces to implementations with $app->bind(). Controllers and services receive dependencies via type-hinted constructor parameters automatically resolved by the container.

How does Eloquent ORM handle relationships?

Define relationships as methods: hasOne(), hasMany(), belongsTo(), belongsToMany(). Access them as properties (lazy loading) or eager load with ::with(['relation']) to avoid N+1 queries. Eloquent generates the correct SQL JOIN or separate query.

What is the difference between Laravel gates and policies?

Gates are closures in AuthServiceProvider for simple authorization (Gate::define). Policies are classes grouping authorization logic per model (UserPolicy::update). Use policies for model CRUD; gates for actions that don't map to a specific model.

How does Laravel's queue system work?

Dispatch a job class implementing ShouldQueue. Laravel serializes it and pushes it to the configured driver (Redis, SQS, database). Run php artisan queue:work to consume. Failed jobs go to the failed_jobs table and can be retried with artisan queue:retry.

What is the difference between Sanctum and Passport?

Sanctum provides simple API token authentication (personal access tokens stored in database) and SPA cookie-based auth. Passport is a full OAuth2 server implementation. Use Sanctum for most APIs and SPAs; Passport only when you need OAuth2 authorization server functionality.

Who Is This For?

PHP developers building modern web applications who want an expressive, full-featured framework with an outstanding developer experience.

Resource Details

FormatPDF, Printable
Cheat Sheet1 page, landscape
Interview Sheet10 questions + answer lines
Practice Sheet10 Q&A pairs with answers
PriceFree
Back to Laravel