PHP code example of webrium / console
1. Go to this page and download the library: Download webrium/console library . Choose the download type require .
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
webrium / console example snippets bash
php webrium init
bash
php webrium make:model <Name> [--table=<table>] [--no-plural] [--force]
bash
php webrium make:controller <Name> [--namespace=<Namespace>] [--force]
bash
php webrium make:controller User
php webrium make:controller Admin --namespace="App\Controllers\Admin"
bash
php webrium make:route <Name> [--force]
bash
php webrium make:route Api
php webrium make:route Web --force
bash
php webrium call <Class@Method> [--params=<JSON>] [--model] [--namespace=<Namespace>]
bash
php webrium call UserController@index
php webrium call UserController@find --params='[42]'
php webrium call User@active --model
php webrium call Report@generate --params='["2024-01", true]' --namespace="App\Services"
bash
php webrium db <action> [<name>] [--use=<database>] [--force]
bash
php webrium db list
php webrium db tables --use=my_database
php webrium db create my_database
php webrium db drop my_database
php webrium db drop my_database --force
bash
php webrium table <action> <table_name> [--use=<database>] [--force]
bash
php webrium table info users
php webrium table columns orders --use=shop_db
php webrium table drop sessions
php webrium table drop sessions --force
php webrium table rename old_table new_table
php webrium table copy products products_backup
php webrium table exists users
php webrium table count orders
php webrium table run sql/setup_tables.sql --use=shop_db
bash
php webrium log <action> [<name>]
bash
php webrium log list
php webrium log latest
php webrium log file 2024-01-15.log
php webrium log clear
bash
php webrium botfire:init [<token>] [--debug=<chat_id>] [--force]
bash
php webrium botfire:init 123456:ABC-DEF
php webrium botfire:init 123456:ABC-DEF --debug=987654321
bash
php webrium plugin:install <source> [--force] [--dry-run] [--no-backup]
php webrium plugin:update <source> [--force] [--no-backup]
php webrium plugin:remove <name> [--no-backup] [--keep-files]
php webrium plugin:list
php webrium plugin:info <source>