Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
L

laravel-apz

> 后端框架
Open source

The guide to build a Laravel 5.2 app from a to z.

316 stars0 likes2 views
WebsiteGitHub

About

The guide to build a Laravel 5.2 app from a to z.

Laravel Apz

The guide to build a Laravel app from a to z.

A small CRUD application kept current with the framework: articles, authors, a recommendation mailer and a weather widget, wired the way a Laravel 13 app is wired today.

Step-by-Step Tutorial

https://github.com/jp7io/laravel-apz/wiki

Screencast

https://www.youtube.com/watch?v=AKFoJ2YDPmI&list=PLFEMeqXSeh3xpnSCvL66t87_LcTNYOoFL (portuguese only)

Includes

  • Laravel 13 on PHP 8.4.1+
  • Restful CRUD and associations, API first (the same routes answer HTML and JSON)
  • Blade components, form requests and a custom validation rule
  • Ajax CRUD in a native ``, over fetch, with no frontend framework
  • Tailwind 4 built by Vite
  • Queued mailable
  • Scheduled command feeding a cached weather widget
  • Feature and unit tests with PHPUnit, browser tests with Playwright (a full-site sweep plus one script per journey)
  • Pint and PHPStan (level 8) in CI

Getting started

bash
composer setup
php artisan serve

composer setup installs both dependency sets, writes a .env, creates the sqlite database, migrates it and builds the assets. The app answers on http://localhost:8011.

Seed it with something to look at:

bash
php artisan db:seed

Two optional keys in .env. Without either one the app works and the feature it drives stays out of the way, rather than failing:

Key What it turns on
OPENWEATHER_KEY the temperature in the navbar
RECAPTCHA_SITE_KEY / RECAPTCHA_SECRET_KEY reCAPTCHA v2 on every form

Working on it

bash
composer dev               # serve + queue worker + vite, together
composer test              # PHPUnit
composer analyse           # PHPStan
composer format            # Pint

npm run e2e:all            # Playwright, boots the app itself

Browser tests need Chromium once: npx playwright install chromium. .npmrc sets ignore-scripts=true, so npm will not fetch it for you.

Testing is documented in tests/README.md.

Deploy

One image, three roles: the web server, a queue worker and the scheduler. FrankenPHP serves public/ itself, so there is no php-fpm and no nginx.

bash
APP_KEY=$(php artisan key:generate --show) docker compose up -d --build

The app answers on http://localhost:8012 (APP_PORT to move it). APP_KEY is required and comes from the environment, never from a file in the image; the sqlite database lives on a named volume outside /app, because a volume mounted over /app/database would shadow migrations/.

The image installs --no-dev, so db:seed will not run there: factories need fakerphp/faker. That is the point of a production image, not a limitation to work around.

Notes

The queue is database by default. predis/predis ships with the app, so switching to Redis is QUEUE_CONNECTION=redis in .env and a worker.

php artisan serve is pinned to 8011 through SERVER_PORT and fails rather than sliding onto a neighbouring port, which would otherwise shadow another application on the same machine.

Issues· 1 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

PHPlaravelphp

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 18, 2026
Category后端框架
PricingOpen source

> Related tools

N
Node.js
基于 V8 的 JavaScript 运行时
D
Django
Python 高级 Web 框架
S
Spring Boot
Java 生态主流微服务框架