← 返回命令列表

Linux command

cradle 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Install the Cradle framework

cradle install

Install and force override files

cradle install -f

Create a new module

cradle make:module [module_name]

Run database migrations

cradle migrate

Generate model from a database table

cradle make:model [table_name]

Start the development server

cradle serve

Clear application cache

cradle cache:clear

说明

Cradle is a PHP framework designed for rapid application development with a focus on modularity and developer experience. The CLI tool provides commands for scaffolding, database management, and development server operations. The framework follows an event-driven architecture, allowing loose coupling between components. Modules can be developed independently and plugged into applications. The make commands generate boilerplate code following the framework's conventions. Cradle CLI handles common development tasks including database migrations, model generation from existing schemas, and cache management. The built-in server provides quick access for local development without configuring external web servers.

参数

install
Install the Cradle framework and dependencies. Supports `-f`/`--force` to override files, `--skip-sql`, `--skip-versioning`, `--skip-mkdir`, `--skip-chmod`.
serve
Start the built-in development server.
migrate
Run database migrations.
make:module _NAME_
Generate a new module scaffold.
make:model _TABLE_
Generate a model from a database table.
make:controller _NAME_
Generate a new controller.
cache:clear
Clear the application cache.
queue:work
Process jobs from the queue.
connect _NAME_
Connect to a configured server.
--help
Display help for a command.

FAQ

What is the cradle command used for?

Cradle is a PHP framework designed for rapid application development with a focus on modularity and developer experience. The CLI tool provides commands for scaffolding, database management, and development server operations. The framework follows an event-driven architecture, allowing loose coupling between components. Modules can be developed independently and plugged into applications. The make commands generate boilerplate code following the framework's conventions. Cradle CLI handles common development tasks including database migrations, model generation from existing schemas, and cache management. The built-in server provides quick access for local development without configuring external web servers.

How do I run a basic cradle example?

Run `cradle install` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does install do in cradle?

Install the Cradle framework and dependencies. Supports `-f`/`--force` to override files, `--skip-sql`, `--skip-versioning`, `--skip-mkdir`, `--skip-chmod`.