PHP code example of shlinkio / shlink-installer
1. Go to this page and download the library: Download shlinkio/shlink-installer library . Choose the download type require .
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
shlinkio / shlink-installer example snippets
declare(strict_types=1);
use Shlinkio\Shlink\Installer\Config\Option;
return [
'installer' => [
'enabled_options' => [
Option\Database\DatabaseDriverConfigOption::class,
Option\Database\DatabaseHostConfigOption::class,
Option\BasePathConfigOption::class,
Option\Redirect\Regular404RedirectConfigOption::class,
Option\UrlShortener\ShortDomainHostConfigOption::class,
Option\UrlShortener\ShortDomainSchemaConfigOption::class,
],
],
];
declare(strict_types=1);
use Shlinkio\Shlink\Installer\Util\InstallationCommand;
return [
'installer' => [
'installation_commands' => [
InstallationCommand::DB_CREATE_SCHEMA->value => [
'command' => 'bin/shlink shlink:db:create',
],
InstallationCommand::DB_MIGRATE->value => [
'command' => 'bin/some-script some:command',
],
InstallationCommand::ORM_PROXIES->value => [
'command' => '-v', // Just print PHP version
],
],
],
];