preflow/devtools 问题修复 & 功能扩展

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

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

preflow/devtools

最新稳定版本:v0.13.1

Composer 安装命令:

composer require preflow/devtools

包简介

Preflow devtools — CLI commands, dev inspector

README 文档

README

CLI commands for Preflow development. Requires the preflow entry point in your project root (provided by preflow/skeleton) or the package binary at vendor/bin/preflow.

Installation

composer require preflow/devtools --dev

Commands

serve — start the dev server

Starts PHP's built-in server rooted at public/.

php preflow serve
# Preflow dev server started on http://localhost:8080
# Press Ctrl+C to stop.

php preflow serve 0.0.0.0 9000
# Binds to 0.0.0.0:9000

migrate — run pending migrations

Reads config/data.php for the SQLite path, then runs any unexecuted files from migrations/.

php preflow migrate
# Running migrations...
# 2 pending migration(s).
# Done.

make:component Name — scaffold a component

Creates app/Components/Name/Name.php and app/Components/Name/Name.twig.

php preflow make:component ProductCard
# Component created: app/Components/ProductCard/
#   - ProductCard.php
#   - ProductCard.twig

The generated PHP class extends Component with empty resolveState() and actions(). The Twig template includes {% apply css %} and {% apply js %} blocks.

make:model Name — scaffold a model

Creates app/Models/Name.php with #[Entity], #[Id], #[Field], and #[Timestamps] attributes. The table name is derived by snake-casing the class name and appending s.

php preflow make:model BlogPost
# Model created: app/Models/BlogPost.php
# (maps to table: blog_posts)

make:controller Name — scaffold a controller

Creates app/Controllers/NameController.php with a #[Route] class attribute and a #[Get] index action. Appends Controller to the name if not already present.

php preflow make:controller Article
# Controller created: app/Controllers/ArticleController.php
# (route prefix: /api/article)

make:migration name — create a migration file

Creates a timestamped file in migrations/ with empty up() and down() stubs.

php preflow make:migration create_comments
# Migration created: migrations/2026_04_10_143012_create_comments.php

routes:list — print the route table

Scans app/pages/ using the file-based router and prints all registered routes.

php preflow routes:list
# Registered Routes
# ──────────────────────────────────────────────────────────────────────
# Method  Pattern                            Mode        Handler
# ──────────────────────────────────────────────────────────────────────
# GET     /                                  page        pages/index.twig
# GET     /about                             page        pages/about.twig
# ──────────────────────────────────────────────────────────────────────

cache:clear — clear framework caches

Deletes all files under storage/cache/ recursively.

php preflow cache:clear
# Cleared 14 cached file(s).

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-04-10

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固