Documentation
- Installation
- Controller
- Views
- Database access
- Modules
- Autoloading
- Config management
- Localization
- Logging
- Environment
- Helpers
- Exceptions
- CLI interface
- Events
- Commands
- Authentication
- Caching
- Testing
- mail() wrapper
- SMTP mailer
- HTML helpers
- npm/webpack
CLI tool
Asatru PHP comes with a handy CLI interface which allows you to perform some operations.
Just open your prefered terminal and cd to the directory of your project. Then run the command „php asatru“ to get a list of commands.
The following commands exist:
Displays the help text
php asatru help
Creates a model and migration file according to the name
php asatru make:model <name>
Creates a new module that is dedicated to your business logic Creates a new module that is dedicated to your business logic. Arguments can be –base to create a base class, --extends opt:name to extend a base class and –final to create a final class.
php asatru make:module <name> <opt:args[]>
Creates a new controller
php asatru make:controller <name>
Creates a new language folder structure with an app.php
php asatru make:language <locale>
Creates a new validator with the given name and the associated validator ident
php asatru make:validator <name> <ident>
Creates a new event handler with name as class name and an initial handler method called (initial_method)
php asatru make:event <name> <initial_method>
Creates a new command class
php asatru make:command <name>
Creates a model and migration used for authentication
php asatru make:auth
Creates a model and migration used for caching
php asatru make:cache
Creates a new test case with the given name
php asatru make:test <name>
Creates a fresh migration of your database. Warning: This will erase all previously inserted data, so please be careful.
php asatru migrate:fresh
This will only run the newly created migrations
php asatru migrate:list
This drops all migrations
php asatru migrate:drop
Lists all registered routes
php asatru routes:list
Starts a development server. If port is not provided it uses the port 8000
php asatru serve <opt:port>
Availability
The CLI interface is only available in debug mode.