Application template for the Splinter framework.
composer create-project splinter/skeleton my-service
cd my-service
cp .env.example .env # already done automatically by composerEdit .env, then run the migrations:
php splinter migrateStart a local PHP server:
php -S localhost:8000 -t public/bootstrap/app.php Web bootstrap — boots HttpKernel
config/ Configuration files (auto-loaded by the kernel)
app.php Providers, routes, middlewares, extra commands
database.php Database connections
events.php Event → listener map
phinx.php Migration runner config (includes core migrations)
queue.php Redis connection for the queue driver
db/
migrations/ Your application migrations
seeds/ Seed files
public/index.php Web server document root entry point
routes/
api.php API routes
web.php Web routes
splinter CLI entry point (like artisan)
src/ Your application code (App\ namespace)
php splinter migrate [--connection=default]
php splinter migrate:rollback [--connection=default]
php splinter migrate:status [--connection=default]
php splinter migrate:create <ClassName>
php splinter queue:work [queue]Route files receive $app (Splinter\Application) and $router
(Bramus\Router\Router) as local variables.
// routes/api.php
$router->mount('/api/v1', function () use ($router, $app) {
$router->get('/ping', function () {
\Splinter\Http\JsonResponse::success(['pong' => true])->send();
});
});Register your command classes in config/app.php under 'commands'.
They are resolved from the DI container, so constructor dependencies
are autowired automatically.