Menu

## CreateMiddleware extends BaseCommand
in package

CreateMiddleware.php : 19

For Creating a new middleware in the middlewares directory by running `pionia gen:middleware {name}`

##### Tags

author

  Jet - ezrajet9@gmail.com

### Table of Contents

#### Properties

$description : string
$name : string
$title : string

#### Methods

__construct() : mixed
configure() : void
connection() : Database
  Returns the current database connection
execute() : int

### Properties

#### $description

CreateMiddleware.php : 22
`protected static string $description = 'Generates a middleware for a pionia app. Middlewares run on every request and response.'`

#### $name

CreateMiddleware.php : 23
`protected static string $name = 'gen:middleware'`

#### $title

CreateMiddleware.php : 21
`protected static string $title = 'Adds a new middleware to pionia app'`

### Methods

#### __construct()

BaseCommand.php : 18
`public __construct([string|null $name = null ]) : mixed`

##### Parameters

$name : string|null = null

#### configure()

CreateMiddleware.php : 24
`protected configure() : void`

#### connection()

BaseCommand.php : 32

Returns the current database connection

`protected static connection([string|null $db = null ]) : Database`

##### Parameters

$db : string|null = null

##### Tags

throws
  Exception
author

  Jet - ezrajet9@gmail.com

##### Return values

Database

#### execute()

CreateMiddleware.php : 34
`protected execute(InputInterface $input, OutputInterface $output) : int`

##### Parameters

$input : InputInterface
$output : OutputInterface

##### Return values

int

## Search results