michaelyousrie/batframe-skeleton
Composer 安装命令:
composer create-project michaelyousrie/batframe-skeleton
包简介
A skeleton to bootstrap a new Batframe application with `composer create-project`.
README 文档
README
A starting point for a new Batframe application. It gives you the same layout as the framework's example app, ready to run.
Create a project
composer create-project michaelyousrie/batframe-skeleton my-app
cd my-app
composer serve
Then open http://localhost:8000. composer create-project installs the
dependencies and copies .env.example to .env for you.
Layout
public/index.php # front controller (document root)
src/App.php # your app class, extends Batframe
src/Routes/ # route traits, grouped by feature
views/ # Blade templates
pages/ # auto-routed static pages
storage/cache/ # compiled Blade cache (writable)
.env # environment (copied from .env.example)
Add a route
Every verb-prefixed public method becomes an endpoint, with the route inferred
from the method name. Add methods to a trait in src/Routes/:
// src/Routes/UserRoutes.php public function getProducts(): array // GET /products { return ['products' => []]; } public function getProduct(int $id): array // GET /product/{id} { return ['id' => $id]; }
See the Batframe documentation for the full routing convention, request and response helpers, views, and config.
Run
composer serve # http://localhost:8000 # or php -S localhost:8000 -t public
统计信息
- 总下载量: 2
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-07-12