Laravel · 75 topics · tiered by priority
Laravel interview topics
Every topic from the master checklist as its own revision page. Tier 1 is must-know, Tier 2 is senior-level, Tier 3 is your full-stack edge.
M13 · Laravel Fundamentals
6 topicsT1Tier 1Laravel FundamentalsWhat is Laravel? · MVC · request lifecycle · app structure · service providers · facades · contracts · helpers · config · env vars · Artisan · routing · controllers · Blade · sessions · cookies · CSRF · encryption · loggingT5Tier 1Dependency Injection & Service ContainerIoC · dependency injection · service container · binding · singleton · scoped · contextual · interface→implementation · automatic resolutionT6Tier 2Service Providers`register()` · `boot()` · provider lifecycle · custom providers · binding services · loading configuration · registering macrosT7Tier 2Facades & Contractsfacades (what they really are) · facade root · static-looking syntax · testing facades · facade vs DI · contracts (interfaces)T44Tier 2Artisan`make:` commands · `route:list` · `migrate` · `queue:work` · `optimize` · config/route cacheT52Tier 2Laravel Contractscache contracts · queue contracts · mail contracts · filesystem contracts · why contracts make implementations replaceable/testable
M14 · Routing & Request Handling
5 topicsT2Tier 2Routingbasic routes · parameters · optional · named · groups · prefixes · middleware groups · route model binding · resource routes · API routes · fallback · route caching · constraintsT3Tier 1Middlewaremiddleware purpose · global · route · groups · parameters · terminable · priority · `$next($request)` · auth/CORS/rate-limiting/loggingT4Tier 2Controllersresource controllers · single-action · dependency injection · controller middleware · form requests · invokable controllers · separation of concernsT22Tier 2Laravel Bladecomponents · layouts · slots · directives · loops · conditionals · includes · sections · stacks · escapingT25Tier 2HTTP Responses200/201/204/400/401/403/404/409/422/429/500 · especially 401 vs 403
M15 · Eloquent & the Database
19 topicsT8Tier 1Eloquent ORMmodels · `$fillable`/`$guarded` · `$casts` · accessors · mutators · attribute objects · relationships · scopes · events · observers · collections · query builder · model events · serializationT9Tier 1Eloquent Relationshipsone-to-one · one-to-many · many-to-many · has-many-through · polymorphic · pivot table · `hasOne` vs `belongsTo`T10Tier 2Eager Loadinglazy vs eager · `with()` · `load()` · `loadMissing()` · nested · conditionalT11Tier 1The N+1 Problemwhy lazy loading runs N queries · how `with()` fixes it · how to detect itT12Tier 1Eloquent Query Optimization`select` · `where` · `whereHas` · `with` · `withCount` · `exists` · `chunk` · `chunkById` · `cursor` · `lazy` · pagination · indexes · query logging · `EXPLAIN`T13Tier 2Query Builder`DB::table()` · joins · subqueries · grouping · aggregates · transactions · raw expressions · unions · pagination · Query Builder vs EloquentT14Tier 2Database & Migrationsmigrations · schema builder · foreign keys · indexes · unique · composite · soft deletes · timestamps · transactions · seeders · factories · migrate commandsT15Tier 1Database Transactions`DB::transaction()` · atomicity · rollback · deadlocks · nested transactions · when they're necessaryT16Tier 1Validation`$request->validate()` · Form Requests · custom rules · conditional · nested · custom messages · `authorize()` + `rules()`T43Tier 2Seeders`php artisan db:seed` · development data · test data · production considerationsT45Tier 2Laravel Collections`map` · `filter` · `reduce` · `each` · `pluck` · `groupBy` · `keyBy` · `sortBy` · `unique` · `flatten` · `flatMap` · `first` · `contains` · `where` · Collection vs Query BuilderT46Tier 2Lazy Collections`LazyCollection` · `cursor()` · `lazy()` · why you don't load 1,000,000 records into RAMT47Tier 2Pagination`paginate()` · `simplePaginate()` · `cursorPaginate()` · the difference · why cursor wins for very large datasetsT48Tier 2Model Events & Observers`creating`/`created` · `updating`/`updated` · `saving`/`saved` · `deleting`/`deleted` · `restoring`/`restored` · observersT49Tier 2Global Scopesglobal scopes · local scopes · removing global scopes · `booted()` + `addGlobalScope`T50Tier 2Soft Deletes`SoftDeletes` trait · `withTrashed` · `onlyTrashed` · `withoutTrashed` · `restore` · `forceDelete`T51Tier 2Accessors & Mutatorstransforming attributes · `$casts` · attribute objects · serialization · modern Laravel syntaxT63Tier 1Database Indexingprimary · unique · composite · covering · selectivity · query plans · `EXPLAIN`T64Tier 2Transactions & Concurrencyrace conditions · database locks · `lockForUpdate()` · deadlocks · optimistic vs pessimistic locking · idempotency · overselling
M16 · Auth, Queues & Async
24 topicsT17Tier 1Authenticationauth vs authorization · guards · providers · sessions · API auth · Sanctum · Passport · Fortify · hashing · remember me · email verification · password resetT18Tier 1Authorizationgates · policies · `authorize()` · middleware · roles · permissions · auth vs authzT19Tier 2Laravel SanctumSPA authentication · API tokens · personal access tokens · CSRF · cookie-based auth · token abilitiesT20Tier 2Laravel PassportOAuth2 · access tokens · refresh tokens · clients · scopes · OAuth flowsT21Tier 2Laravel Fortifyauthentication backend · login · registration · password reset · email verification · 2FA · authentication pipelines · custom flows · Fortify vs Breeze vs JetstreamT26Tier 1Queuesjobs · workers · connections · Redis/database queues · failed jobs · retries · backoff · timeouts · delayed · batching · chains · Horizon · why not sync emailT27Tier 2Laravel Horizonqueue monitoring · workers · supervisors · metrics · Redis · failed jobs · balancingT28Tier 1Events & Listenersevents · listeners · queued listeners · event discovery · event subscribersT29Tier 2Jobs vs Eventsthe difference · "execute a specific piece of work" vs "something happened in the system"T30Tier 2Notificationsmail · database · Slack · broadcast · custom channels · notification queuesT31Tier 2Mailmailables · markdown mail · queued mail · attachments · templates · mail drivers · configurationT32Tier 2Laravel Schedulingtask scheduler · cron · scheduled commands · scheduled jobs · frequency · prevent overlapping · background executionT33Tier 1Cachingcache drivers · Redis · file · database · keys · TTL · tags · invalidation · `remember()` · `rememberForever()` · cache locking · stale dataT34Tier 1Rediscache · queues · locks · pub/sub concepts · rate limiting · sessions · why Redis beats a relational DB for ephemeral dataT35Tier 2Rate LimitingLaravel RateLimiter · API throttling · user-based limits · IP-based limits · Redis-backed rate limiting · 100 req/min/userT36Tier 2Files & StorageStorage facade · local disk · S3 · public/private files · signed URLs · temporary URLs · file uploads · validation · storage disksT37Tier 1Laravel SecuritySQL injection · XSS · CSRF · mass assignment · secure auth · authorization · file uploads · secrets — and how Laravel defends eachT38Tier 2Encryption & Hashingthe difference · one-way hashing vs reversible encryption · `Hash::make()` · `Crypt::encryptString()`T41Tier 1Laravel Testingunit tests · feature tests · HTTP tests · database testing (`RefreshDatabase`) · factories · seeders · mocking (Mockery, Laravel helpers)T42Tier 2Laravel Factories`User::factory()->count(10)->create()` · states · relationships · Faker · factory callbacksT58Tier 2Laravel Events vs Observersthe difference · application-level event vs model lifecycle eventsT59Tier 2Broadcasting & WebSocketsbroadcasting · events · channels · private/presence channels · WebSockets · Laravel Echo · use cases (chat, notifications, live dashboards, real-time status)T60Tier 2Laravel ReverbLaravel's first-party WebSocket server · the broadcast chain: Laravel → event → Reverb → WebSocket → browserT65Tier 2Queues & Distributed Systemsworker crash · job executes twice · external API timeout · 30-minute job · Redis down · retry · backoff · timeout · idempotency · dead-letter/failed-job concepts
M17 · Senior & Full-Stack
21 topicsT23Tier 1API DevelopmentREST · HTTP methods · status codes · API Resources · versioning · pagination · filtering · sorting · searching · rate limiting · auth · error handlingT24Tier 2API Resources`UserResource::make($user)` · `UserResource::collection($users)` · why use them · resource vs model · conditional includes · standardized responsesT39Tier 2Laravel Logginglog channels · stacks · daily logs · syslog · Slack · context · log levelsT40Tier 2Exception Handlingexceptions · global exception handling · custom exceptions · HTTP exceptions · rendering · reporting · logging · API error responsesT53Tier 2Service Layerwhen to extract business logic into Controller → Service → Repository/Query → Model · why you don't need a repository per model · "why did you introduce a service layer?"T54Tier 2Repository Patternrepository abstraction · interface · implementation · dependency injection · testing · when it becomes unnecessary abstractionT55Tier 2SOLIDS · O · L · I · D — each with a Laravel exampleT56Tier 2Design PatternsFactory · Strategy · Repository · Adapter · Observer · Singleton · Dependency Injection · Decorator · Builder · Command — and where Laravel itself uses themT57Tier 2Laravel Macroscollection macros · response macros · custom macros · when useful vs confusingT61Tier 2Laravel Octanewhy Octane improves performance · long-lived workers · Swoole · RoadRunner · worker memory · application state · memory leaks · request lifecycle differencesT62Tier 2Laravel Performance"Your Laravel API is slow. What do you do?" — measure · queries · N+1 · indexes · eager loading · pagination · caching · Redis · queues · OPcache · payload · infra · monitoringT66Tier 2Laravel Deploymentthe production path (Nginx → PHP-FPM → Laravel → DB → Redis) · env vars · PHP extensions · Composer · migrations · storage permissions · queues · workers · scheduler · cache · OPcacheT67Tier 2Production Optimization`composer install --no-dev --optimize-autoloader` · `config:cache` · `route:cache` · `view:cache` · why you shouldn't blindly cache during developmentT68Tier 2CI/CDGitHub Actions · the pipeline (push → CI → tests → lint → build → deploy → migrate → restart workers) · rollback strategiesT69Tier 3Laravel + React / InertiaInertia architecture · server-side routing · React pages · props · forms · validation errors · shared data · middleware · auth · partial reloads · lazy props · SPA navigation · why Inertia over a separate React + REST APIT70Tier 3Laravel + Next.jsthe architecture (Next.js → Laravel API → PostgreSQL) · JWT · Sanctum · CORS · CSRF · API Resources · SSR considerations · auth · token handlingT71Tier 3Laravel + StripeStripe Checkout · payment intents · webhooks · subscription lifecycle · idempotency · failed payments · refunds · cancellation · webhook verification · **never trust the frontend — use the verified webhook**T72Tier 2Multi-Tenant SaaSshared DB (tenant_id) · separate schemas · separate databases · tenant isolation · authorization · data-leak prevention · global scopes · database design · scalingT73Tier 3Laravel + AIOpenAI · Anthropic · Gemini · embeddings · vector databases · pgvector · RAG · streaming · background AI jobs · when AI calls are synchronous vs queuedT74Tier 3System Design Questionsdesign a SaaS · a chat app · an e-commerce backend · a notification system · a payment system · an API handling 1M requests/day · a multi-tenant app · an AI support platform · a file-processing system · a job queue systemT75Tier 2Senior Laravel Scenario Questionsthe ten scenarios — 8s API · 50M users · overselling · 100k jobs · duplicate webhook · 10x traffic · broken deploy · tenant leak · Redis down · 20s external API — the decision rule, not the guess