Getting Started
Directory Structure
Introduction
The default Laravel Bash application structure will look very familiar, because it was copied. The difference is that every file ends in .sh.
The Root Directory
| Directory | What's in it |
|---|---|
app/ | Your controllers, form requests, models, jobs, events and listeners. Every .sh file in here is sourced when the framework boots. |
bootstrap/ | app.sh boots the framework. handle is the program socat runs for each request. |
database/ | Migrations (plain .sql files), seeders and the SQLite database file. |
docs/ | These pages, as Markdown. |
framework/ | What would be vendor/laravel/framework: routing, Eloquent, Blade, queues and the rest, plus markdown.awk. |
resources/views/ | Blade templates, which are Bash files that print HTML. |
routes/ | web.sh for routes, console.sh for the schedule. |
storage/ | Logs, the queue folders, the event log and the broadcast log. |
tests/ | The bats test suite. |
The Root Files
artisanis the command line. It's a Bash script, like it always secretly wanted to be.sailwrapsdocker compose. Laravel Sail was always a Bash script, so this one is the real thing.compose.yamlandDockerfiledescribe theappandpgsqlcontainers.
The Storage Directory
| Path | Used by |
|---|---|
storage/logs/laravel.log | Log::info and friends |
storage/queue/pending/ | Jobs waiting to run |
storage/queue/processing/ | Jobs a worker has claimed |
storage/queue/failed/ | Jobs that failed or timed out |
storage/events/events.log | Event payloads, for the listener to read |
storage/broadcasts/broadcasts.log | Everything broadcast, followed by tail -F |
storage/framework/*.lock | flock locks for the scheduler |
note
Everything in storage/ is a plain text file. If you want to know what the framework is doing, cat it.