Docs home / HareAdmin Handbook

CLI & Commands

Run from the project root (where think lives). Put PHP on PATH. Use php think <command> --help for full flags.

CRUD generator

Builds controller, model, view, validate, lang pack, and JS from a table. Fill field comments and the table comment. Default prefix is often yt_.

php think crud -t test
php think crud -t test -u 1
php think crud -t test -d 1
php think crud -t test_log -c testlog
php think crud -t test -r category -k category_id -p id

Recycle bin: table needs a deletetime column defaulting to null.

php think menu -c test
php think menu -c test -d 1
php think menu -c all-controller

Minify assets

php think min -m all -r all
php think min -m backend -r js

Needed after changing core JS/CSS when debug is off. Do not edit .min.* by hand.

API docs

php think api --force=true
php think api -u https://www.example.com --force=true

Annotate API controllers with @ApiTitle, @ApiRoute, @ApiMethod, @ApiParams, @ApiReturn, etc.

Addon CLI

php think addon -a blog -c create|enable|disable|uninstall|package

See the Addons chapter for package layout. Admin UI / store also install addons.

Install

php think install

Same flow as browser /install. See Installation.