Documentation

Installer
in package

Table of Contents

$dbFields  : array<string|int, mixed>
This array defines the valid fields for each database type.
$installSteps  : array<string|int, mixed>
Contains the installer steps in the correct order of execution The slug must consist of (lowercase) a-z or dashes only!
configureSql()  : InstallStepResult
Tests & Configures the SQL settings to use
developmentSeedDatabase()  : InstallStepResult
Runs the seeder that aids during development
finishInstall()  : InstallStepResult
Finishes up the Shoutz0r installation by setting shoutzor.installed to true, and rebuilding the config cache
generateAppKey()  : InstallStepResult
Executes the artisan key:generate command to generate an APP_KEY
generateCache()  : InstallStepResult
Generates laravel cache for things like Routes & Views to speed up requests
migrateDatabase()  : InstallStepResult
Executes the artisan migrate command
rebuildConfigCache()  : InstallStepResult
rebuilds the config cache
seedDatabase()  : InstallStepResult
Executes the artisan db:seed command

Properties

$dbFields

This array defines the valid fields for each database type.

public static array<string|int, mixed> $dbFields = ['mysql' => ['host' => ['validate' => 'required|string', 'dotconfig' => 'database.connections.mysql.host', 'dotenv' => 'DB_HOST', 'type' => 'text', 'default' => 'localhost'], 'port' => ['validate' => 'required|numeric|integer', 'dotconfig' => 'database.connections.mysql.port', 'dotenv' => 'DB_PORT', 'type' => 'text', 'default' => '3306'], 'database' => ['validate' => 'required|string', 'dotconfig' => 'database.connections.mysql.database', 'dotenv' => 'DB_DATABASE', 'type' => 'text', 'default' => 'shoutzor'], 'username' => ['validate' => 'required|string', 'dotconfig' => 'database.connections.mysql.username', 'dotenv' => 'DB_USERNAME', 'type' => 'text', 'default' => 'shoutzor'], 'password' => ['validate' => 'required|string', 'dotconfig' => 'database.connections.mysql.password', 'dotenv' => 'DB_PASSWORD', 'type' => 'password', 'default' => '']], 'pgsql' => ['host' => ['validate' => 'required|string', 'dotconfig' => 'database.connections.pgsql.host', 'dotenv' => 'DB_HOST', 'type' => 'text', 'default' => 'localhost'], 'port' => ['validate' => 'required|numeric|integer', 'dotconfig' => 'database.connections.pgsql.port', 'dotenv' => 'DB_PORT', 'type' => 'text', 'default' => '5432'], 'database' => ['validate' => 'required|string', 'dotconfig' => 'database.connections.pgsql.database', 'dotenv' => 'DB_DATABASE', 'type' => 'text', 'default' => 'shoutzor'], 'username' => ['validate' => 'required|string', 'dotconfig' => 'database.connections.pgsql.username', 'dotenv' => 'DB_USERNAME', 'type' => 'text', 'default' => 'shoutzor'], 'password' => ['validate' => 'required|string', 'dotconfig' => 'database.connections.pgsql.password', 'dotenv' => 'DB_PASSWORD', 'type' => 'password', 'default' => '']], 'sqlsrv' => ['host' => ['validate' => 'required|string', 'dotconfig' => 'database.connections.sqlsrv.host', 'dotenv' => 'DB_HOST', 'type' => 'text', 'default' => 'localhost'], 'port' => ['validate' => 'required|numeric|integer', 'dotconfig' => 'database.connections.sqlsrv.port', 'dotenv' => 'DB_PORT', 'type' => 'text', 'default' => '1433'], 'database' => ['validate' => 'required|string', 'dotconfig' => 'database.connections.sqlsrv.database', 'dotenv' => 'DB_DATABASE', 'type' => 'text', 'default' => 'shoutzor'], 'username' => ['validate' => 'required|string', 'dotconfig' => 'database.connections.sqlsrv.username', 'dotenv' => 'DB_USERNAME', 'type' => 'text', 'default' => 'shoutzor'], 'password' => ['validate' => 'required|string', 'dotconfig' => 'database.connections.sqlsrv.password', 'dotenv' => 'DB_PASSWORD', 'type' => 'password', 'default' => '']]]

As well as relevant information such as the validation requirements, type, dotconfig and dotenv keys.

$installSteps

Contains the installer steps in the correct order of execution The slug must consist of (lowercase) a-z or dashes only!

public static array<string|int, mixed> $installSteps = [['name' => 'Generate App Key', 'description' => 'Generates an APP_KEY in the env file', 'slug' => 'generate-app-key', 'running' => false, 'status' => -1, 'method' => 'generateAppKey'], ['name' => 'Database migrations', 'description' => 'Creates tables and indexes in the database', 'slug' => 'migrate-database', 'running' => false, 'status' => -1, 'method' => 'migrateDatabase'], ['name' => 'Database seeding', 'description' => 'Adds initial data to the database', 'slug' => 'seed-database', 'running' => false, 'status' => -1, 'method' => 'seedDatabase'], ['name' => 'Generate cache', 'description' => 'Generate cache to speed up requests', 'slug' => 'generate-cache', 'running' => false, 'status' => -1, 'method' => 'generateCache'], ['name' => 'Finishing up', 'description' => 'Finalize the installation', 'slug' => 'finish-install', 'running' => false, 'status' => -1, 'method' => 'finishInstall']]

Methods

configureSql()

Tests & Configures the SQL settings to use

public configureSql(string $dbtype, string $host, string $port, string $database, string $username, string $password) : InstallStepResult
Parameters
$dbtype : string
$host : string
$port : string
$database : string
$username : string
$password : string
Return values
InstallStepResult

Search results