-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
3 changed files
with
241 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,238 @@ | ||
# Artisan Commands | ||
This is very much a WIP! Many Many commands, Layout might change. | ||
|
||
Updated: 8/18/2024 ~notCharles | ||
## User Commands | ||
### Create a User | ||
|
||
Creates a user on the system via the CLI. | ||
```sh | ||
php artisan p:user:make [options] | ||
``` | ||
|
||
```sh | ||
Options: | ||
--email[=EMAIL] | ||
--username[=USERNAME] | ||
--password[=PASSWORD] | ||
--admin[=ADMIN] | ||
--no-password | ||
-q, --quiet Do not output any message | ||
-V, --version Display this application version | ||
--ansi|--no-ansi Force (or disable --no-ansi) ANSI output | ||
-n, --no-interaction Do not ask any interactive question | ||
``` | ||
|
||
### Delete a User | ||
|
||
Deletes a user from the Panel if no servers are attached to their account. | ||
```sh | ||
php artisan p:user:delete [options] | ||
``` | ||
|
||
```sh | ||
Options: | ||
--user[=USER] | ||
-q, --quiet Do not output any message | ||
--ansi|--no-ansi Force (or disable --no-ansi) ANSI output | ||
-n, --no-interaction Do not ask any interactive question | ||
``` | ||
|
||
### Disable 2fa for a single User | ||
|
||
Disable two-factor authentication for a specific user in the Panel. | ||
```sh | ||
php artisan p:user:disable2fa [options] | ||
``` | ||
|
||
```sh | ||
Options: | ||
--email[=EMAIL] The email of the user to disable 2-Factor for. | ||
-q, --quiet Do not output any message | ||
--ansi|--no-ansi Force (or disable --no-ansi) ANSI output | ||
-n, --no-interaction Do not ask any interactive question | ||
|
||
``` | ||
|
||
## Editing the Environment | ||
|
||
### Editing Cache | ||
```sh | ||
php artisan p:environment:cache [options] | ||
``` | ||
|
||
```sh | ||
Options: | ||
--driver[=DRIVER] The cache driver backend to use. | ||
--redis-host[=REDIS-HOST] Redis host to use for connections. | ||
--redis-user[=REDIS-USER] User used to connect to redis. | ||
--redis-pass[=REDIS-PASS] Password used to connect to redis. | ||
--redis-port[=REDIS-PORT] Port to connect to redis over. | ||
-q, --quiet Do not output any message | ||
--ansi|--no-ansi Force (or disable --no-ansi) ANSI output | ||
-n, --no-interaction Do not ask any interactive question | ||
``` | ||
|
||
### Editing Database | ||
```sh | ||
php artisan p:environment:database [options] | ||
``` | ||
|
||
```sh | ||
Options: | ||
--driver[=DRIVER] The database driver backend to use. | ||
--database[=DATABASE] The database to use. | ||
--host[=HOST] The connection address for the MySQL/ MariaDB server. | ||
--port[=PORT] The connection port for the MySQL/ MariaDB server. | ||
--username[=USERNAME] Username to use when connecting to the MySQL/ MariaDB server. | ||
--password[=PASSWORD] Password to use for the MySQL/ MariaDB database. | ||
-q, --quiet Do not output any message | ||
--ansi|--no-ansi Force (or disable --no-ansi) ANSI output | ||
-n, --no-interaction Do not ask any interactive question | ||
``` | ||
### Editing Mail | ||
```sh | ||
php artisan p:environment:mail [options] | ||
``` | ||
|
||
```sh | ||
Options: | ||
--driver[=DRIVER] The mail driver to use. | ||
--email[=EMAIL] Email address that messages from the Panel will originate from. | ||
--from[=FROM] The name emails from the Panel will appear to be from. | ||
--encryption[=ENCRYPTION] | ||
--host[=HOST] | ||
--port[=PORT] | ||
--endpoint[=ENDPOINT] | ||
--username[=USERNAME] | ||
--password[=PASSWORD] | ||
-q, --quiet Do not output any message | ||
--ansi|--no-ansi Force (or disable --no-ansi) ANSI output | ||
-n, --no-interaction Do not ask any interactive question | ||
``` | ||
### Editing Queue | ||
```sh | ||
php artisan p:environment:queue [options] | ||
``` | ||
|
||
```sh | ||
Options: | ||
--driver[=DRIVER] The queue driver backend to use. | ||
--redis-host[=REDIS-HOST] Redis host to use for connections. | ||
--redis-user[=REDIS-USER] User used to connect to redis. | ||
--redis-pass[=REDIS-PASS] Password used to connect to redis. | ||
--redis-port[=REDIS-PORT] Port to connect to redis over. | ||
-q, --quiet Do not output any message | ||
--ansi|--no-ansi Force (or disable --no-ansi) ANSI output | ||
-n, --no-interaction Do not ask any interactive question | ||
``` | ||
### Editing Session | ||
```sh | ||
php artisan p:environment:session [options] | ||
``` | ||
|
||
```sh | ||
Options: | ||
--driver[=DRIVER] The queue driver backend to use. | ||
--redis-host[=REDIS-HOST] Redis host to use for connections. | ||
--redis-user[=REDIS-USER] User used to connect to redis. | ||
--redis-pass[=REDIS-PASS] Password used to connect to redis. | ||
--redis-port[=REDIS-PORT] Port to connect to redis over. | ||
-q, --quiet Do not output any message | ||
--ansi|--no-ansi Force (or disable --no-ansi) ANSI output | ||
-n, --no-interaction Do not ask any interactive question | ||
``` | ||
### Editing Setup | ||
```sh | ||
php artisan p:environment:setup [options] | ||
``` | ||
|
||
```sh | ||
Options: | ||
--url[=URL] The URL that this Panel is running on. | ||
-q, --quiet Do not output any message | ||
--ansi|--no-ansi Force (or disable --no-ansi) ANSI output | ||
-n, --no-interaction Do not ask any interactive question | ||
``` | ||
|
||
## Migrations | ||
### Migration Command | ||
```sh | ||
php artisan migrate [options] | ||
``` | ||
|
||
```sh | ||
Options: | ||
--database[=DATABASE] The database connection to use | ||
--force Force the operation to run when in production | ||
--path[=PATH] The path(s) to the migrations files to be executed (multiple values allowed) | ||
--realpath Indicate any provided migration file paths are pre-resolved absolute paths | ||
--schema-path[=SCHEMA-PATH] The path to a schema dump file | ||
--pretend Dump the SQL queries that would be run | ||
--seed Indicates if the seed task should be re-run | ||
--seeder[=SEEDER] The class name of the root seeder | ||
--step Force the migrations to be run so they can be rolled back individually | ||
--graceful Return a successful exit code even if an error occurs | ||
--isolated[=ISOLATED] Do not run the command if another instance of the command is already running [default: false] | ||
-q, --quiet Do not output any message | ||
--ansi|--no-ansi Force (or disable --no-ansi) ANSI output | ||
-n, --no-interaction Do not ask any interactive question | ||
``` | ||
### Running Migations | ||
```sh | ||
php artisan migrate | ||
``` | ||
### Rollback previous Migration | ||
```sh | ||
php artisan migrate:rollback [options] | ||
``` | ||
```sh | ||
Options: | ||
--database[=DATABASE] The database connection to use | ||
--force Force the operation to run when in production | ||
--path[=PATH] The path(s) to the migrations files to be executed (multiple values allowed) | ||
--realpath Indicate any provided migration file paths are pre-resolved absolute paths | ||
--pretend Dump the SQL queries that would be run | ||
--step[=STEP] The number of migrations to be reverted | ||
--batch=BATCH The batch of migrations (identified by their batch number) to be reverted | ||
--ansi|--no-ansi Force (or disable --no-ansi) ANSI output | ||
-n, --no-interaction Do not ask any interactive question | ||
``` | ||
### Check Migration Status | ||
```sh | ||
php artisan migrate:status [options] | ||
``` | ||
```sh | ||
Options: | ||
--database[=DATABASE] The database connection to use | ||
--pending[=PENDING] Only list pending migrations [default: false] | ||
--path[=PATH] The path(s) to the migrations files to use (multiple values allowed) | ||
--realpath Indicate any provided migration file paths are pre-resolved absolute paths | ||
--ansi|--no-ansi Force (or disable --no-ansi) ANSI output | ||
-n, --no-interaction Do not ask any interactive question | ||
``` | ||
Providing no extra options, `php artisan migrate:status`, You should see an output similar to the below | ||
```sh title='Migration Status Output' | ||
Migration name .............................................................................. Batch / Status | ||
2016_01_23_195641_add_allocations_table ............................................................ [1] Ran | ||
2016_01_23_195851_add_api_keys ..................................................................... [1] Ran | ||
... | ||
... | ||
2024_07_12_095213_fix_missing_sqlite_foreign_keys .................................................. [1] Ran | ||
2024_08_13_171337_fix_allocation_server_foreign_key ................................................ [2] Ran | ||
``` | ||
If any show `PENDING` or `FAILED`. Open a support thread on our discord for further assistance. | ||
## Clearing Cache | ||
The below commands are helpful if you need to clear the config or application cache. | ||
```sh | ||
php artisan cache:clear # Clears application cache | ||
``` | ||
```sh | ||
php artisan config:clear # Clears configuration cache | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters