shopperlabs/laravel-sail-starter-kit 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

shopperlabs/laravel-sail-starter-kit

Composer 安装命令:

composer create-project shopperlabs/laravel-sail-starter-kit

包简介

The skeleton application for the Laravel framework using docker sail and filament.

README 文档

README

branding for Laravel Sail Starter kit

PHP 8.4+ Laravel v12.x Filament 4.1 Total Downloads Latest Stable Version Build Status Coding Standards

Laravel Sail Starter Kit is an ultra-strict, type-safe Laravel skeleton engineered for developers who refuse to compromise on code quality. This opinionated starter kit enforces rigorous development standards through meticulous tooling configuration and architectural decisions that prioritize type safety, immutability, and fail-fast principles.

Why This Starter Kit?

Modern PHP has evolved into a mature, type-safe language, yet many Laravel projects still operate with loose conventions and optional typing. This starter kit changes that paradigm by enforcing:

  • 100% Type Coverage: Every method, property, and parameter is explicitly typed
  • Zero Tolerance for Code Smells: Rector and PHPStan at maximum strictness catch issues before they become bugs
  • Immutable-First Architecture: Data structures favor immutability to prevent unexpected mutations
  • Fail-Fast Philosophy: Errors are caught at compile-time, not runtime
  • Automated Code Quality: Pre-configured tools ensure consistent, pristine code across your entire team
  • Just Better Laravel Defaults: Thanks to Essentials / strict models, auto eager loading, immutable dates, and more...

This isn't just another Laravel boilerplate—it's a statement that PHP applications can and should be built with the same rigor as strongly-typed languages like Rust or TypeScript.

Included Features

This Starter kit contains my starting point when developing a new Laravel project using Filament & Sail. Its based on the Laravel Starter Kit by Nuno Maduro, and includes the following features:

  • Traefik as reverse proxy to serve your application locally and in production,
  • Laravel Octane with FrankenPHP to supercharges your application's performance,
  • Spatie Roles & Permission with Filament Shield,
  • ✅ Updated for Laravel 12.*, Filament 4.3 and Livewire 3.6

Getting Started

Requires PHP 8.4+.

Create your type-safe Laravel application using Composer:

composer create-project shopperlabs/laravel-sail-starter-kit --prefer-dist example-app
# Or
laravel new example-app --using=shopperlabs/laravel-sail-starter-kit

Initial Setup

Navigate to your project and complete the setup:

cd example-app

# Setup project
composer dev:setup

# Start the development server
composer dev:run

Initialize the Application

Once your containers are running, initialize the application database and create your admin user:

./vendor/bin/sail artisan app:setup

This command will:

  • Setup APP_DOMAIN, APP_URL and ASSET_URL variables
  • Run database migrations
  • Generate roles and permissions (via Filament Shield)
  • Create the storage symbolic link
  • Create an admin user with interactive prompts

You can also run it non-interactively by providing all options:

./vendor/bin/sail artisan app:setup laravel.local \
  --admin-firstname="John" \
  --admin-lastname="Doe" \
  --admin-username="john.doe" \
  --admin-password="your-secure-password"

Configure Local Domain

Add your application domain (defined in APP_DOMAIN from .env) to your hosts file:

Linux/macOS:

sudo sh -c 'echo "127.0.0.1       your-domain.local" >> /etc/hosts'

Windows (as Administrator):

echo 127.0.0.1       your-domain.local >> C:\Windows\System32\drivers\etc\hosts

Replace your-domain.local with your actual APP_DOMAIN value.

Access Your Application

Common Errors

  • "Disk named 'media' cannot be accessed": Bucket doesn't exist, run the configuration above.
  • 403 Forbidden on image URLs: Bucket is not public, apply the public policy above.

Optional: Browser Testing Setup

If you plan to use Pest's browser testing capabilities:

npm install playwright
npx playwright install

Verify Installation

Run the test suite to ensure everything is configured correctly:

composer test

You should see 100% test coverage and all quality checks passing.

Available Tooling

Development

  • composer dev:run - Starts Laravel sail, queue worker, log monitoring, and Vite dev server concurrently

Code Quality

  • composer lint - Runs Rector (refactoring), Pint (PHP formatting), and Prettier (JS/TS formatting)
  • composer test:lint - Dry-run mode for CI/CD pipelines

Testing

  • composer test:type-coverage - Ensures 100% type coverage with Pest
  • composer test:types - Runs PHPStan at level 10 (maximum strictness)
  • composer test:unit - Runs Pest tests with 100% code coverage requirement
  • composer test - Runs the complete test suite (type coverage, unit tests, linting, static analysis)

Maintenance

  • composer update:requirements - Updates all PHP and NPM dependencies to latest versions

License

Laravel Sail Starter Kit was created by Arthur Monney inspired by Laravel Starter Kit of Nuno Maduro under the MIT license.

shopperlabs/laravel-sail-starter-kit 适用场景与选型建议

shopperlabs/laravel-sail-starter-kit 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 10 次下载、GitHub Stars 达 4, 最近一次更新时间为 2025 年 11 月 10 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「framework」 「laravel」 「docker」 「sail」 「filament」 「shopperlabs」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 shopperlabs/laravel-sail-starter-kit 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 shopperlabs/laravel-sail-starter-kit 我们能提供哪些服务?
定制开发 / 二次开发

基于 shopperlabs/laravel-sail-starter-kit 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 10
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 4
  • 点击次数: 31
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 4
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-11-10