Pharaonic
Loading...

# Controller

Create a new controller class of a module.

1php artisan module:make:controller [module-name] [controller-name]
Option Description
-m, --model[=MODEL]
The model class that related to the controller
--force
Create the class even if the controller already exists
--test
Generate an accompanying PHPUnit test for the Controller
--pest
Generate an accompanying Pest test for the Controller

# Request

Create a new form request class of a module.

1php artisan module:make:request [module-name] [request-name]
Option Description
-j, --json
Create a new jsonable form request

# Resource

Create a new resource of a module.

1php artisan module:make:resource [module-name] [resource-name]
Option Description
-j, --json
Create a new jsonable resource
-c, --collection
Create a resource collection

# Middleware

Create a new middleware class of a module.

1php artisan module:make:middleware [module-name] [middleware-name]
Option Description
--test
Generate an accompanying PHPUnit test for the Middleware
--pest
Generate an accompanying Pest test for the Middleware

# Model

Create a new Eloquent model class of a module.

1php artisan module:make:model [module-name] [model-name]
Option Description
-a, --all
Create a new migration, fatcory, seeder and policy files for the model
-m, --migration
Create a new migration file for the model
-f, --factory
Create a new factory for the model
-s, --seed
Create a new seeder for the model
-p, --policy
Create a new policy for the model
--force
Create the class even if the model already exists
--test
Generate an accompanying PHPUnit test for the Model
--pest
Generate an accompanying Pest test for the Model

# Observer

Create a new observer class of a module.

1php artisan module:make:observer [module-name] [observer-name]
Option Description
--model[=MODEL]
The model that the observer applies to

# Migration

Create a new migration file of a module.

1php artisan module:make:migration [module-name] [migration-name]
Option Description
--create[=CREATE]
The table to be created
--table[=TABLE]
The table to migrate

# Seeder

Create a new seeder class of a module.

1php artisan module:make:seeder [module-name] [seeder-name]

# Provider

Create a new service provider class of a module.

1php artisan module:make:provider [module-name] [provider-name]

# Provider

Create a new service provider class of a module.

1php artisan module:make:provider [module-name] [provider-name]

# Cast

Create a new custom Eloquent cast class of a module.

1php artisan module:make:cast [module-name] [cast-name]

# Channel

Create a new channel class of a module.

1php artisan module:make:channel [module-name] [channel-name]

# Command

Create a new Artisan command of a module.

1php artisan module:make:command [module-name] [command-name]
Option Description
--test
Generate an accompanying PHPUnit test for the Command
--pest
Generate an accompanying Pest test for the Command
--command
The terminal command that should be assigned [default: "command:name"]

# Component

Create a new view component of a module.

1php artisan module:make:component [module-name] [component-name]
Option Description
--force
Create the class even if the component already exists
--inline
Create a component that renders an inline view

# Event

Create a new event class of a module.

1php artisan module:make:event [module-name] [event-name]

# Exception

Create a new custom exception class of a module.

1php artisan module:make:exception [module-name] [exception-name]
Option Description
--render
Create the exception with an empty render method
--report
Create the exception with an empty report method

# Factory

Create a new model factory of a module.

1php artisan module:make:factory [module-name] [factory-name]

# Job

Create a new job class of a module.

1php artisan module:make:job [module-name] [job-name]
Option Description
--sync
Indicates that job should be synchronous
--test
Generate an accompanying PHPUnit test for the Job
--pest
Generate an accompanying Pest test for the Job

# Listener

Create a new event listener class of a module.

1php artisan module:make:listener [module-name] [listener-name]
Option Description
-e, --event[=EVENT]
The event class being listened for
--queued
Indicates the event listener should be queued
--test
Generate an accompanying PHPUnit test for the Listener
--pest
Generate an accompanying Pest test for the Listener

# Mail

Create a new email class of a module.

1php artisan module:make:mail [module-name] [mail-name]
Option Description
-f, --force
Create the class even if the mailable already exists
-m, --markdown[=MARKDOWN]
Create a new Markdown template for the mailable [default: false]
--test
Generate an accompanying PHPUnit test for the Mail
--pest
Generate an accompanying Pest test for the Mail

# Notification

Create a new notification class of a module.

1php artisan module:make:notification [module-name] [notification-name]
Option Description
-f, --force
Create the class even if the notification already exists
-m, --markdown[=MARKDOWN]
Create a new Markdown template for the notification
--test
Generate an accompanying PHPUnit test for the Notification
--pest
Generate an accompanying Pest test for the Notification

# Policy

Create a new policy class of a module.

1php artisan module:make:policy [module-name] [policy-name]
Option Description
--guard[=GUARD]
The guard that the policy relies on
--model[=MODEL]
The model that the policy applies to

# Rule

Create a new validation rule of a module.

1php artisan module:make:rule [module-name] [rule-name]

# Test

Create a new test class of a module.

1php artisan module:make:test [module-name] [test-name]
Option Description
-u, --unit
reate a unit test
-p, --pest
Create a Pest test

# Migrate

Run the database migrations of a module.

1php artisan module:migrate [module-name]

# Fresh

Drop all tables then re-run migrations of a module.

1php artisan module:migrate:fresh [module-name]
Option Description
--drop-views
Drop all tables and views
--drop-types
Drop all tables and types (Postgres only)
--force
Force the operation to run when in production
--seed
Indicates if the seed task should be re-run
--seeder[=SEEDER]
The class name of the root seeder
--schema-path[=SCHEMA-PATH]
The path to a schema dump file
--step[=STEP]
Force the migrations to be run so they can be rolled back individually

# Refresh

Reset and re-run all module migrations.

1php artisan module:migrate:refresh [module-name]
Option Description
--force
Force the operation to run when in production
--seed
Indicates if the seed task should be re-run
--seeder[=SEEDER]
The class name of the root seeder
--step[=STEP]
The number of migrations to be reverted & re-run

# Reset

Rollback all database migrations of a module.

1php artisan module:migrate:reset [module-name]
Option Description
--force
Force the operation to run when in production

# Status

Show the status of each migration of a module.

1php artisan module:migrate:status [module-name]

# List

Display all modules info.

1php artisan module:list

# Routes

Get routes list of a specific module.

1php artisan module:routes
Option Description
-r, --reverse
Reverse the ordering of the routes
--json
Output the route list as JSON
--method[=METHOD]
Filter the routes by method
--sort[=SORT]
The column (precedence, domain, method, uri, name, action, middleware) to sort by [default: "uri"]

# Seed

Seed the database with records of a module.

1php artisan module:seed [module-name]
Option Description
--force
Force the operation to run when in production
--class[=CLASS]
The class name of the root seeder [default: "DatabaseSeeder"]

# Test

Run the module tests.

1php artisan module:test [module-name]
Option Description
-l, --list
Get tests list
-s, --stop-on-failure
Stop all tests on the failure status
-f, --filter[=FILTER]
Test name (example: UserTest)