PHP code example of zisunal / laravel-installer
1. Go to this page and download the library: Download zisunal/laravel-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/ */
zisunal / laravel-installer example snippets
->withMiddleware(function (Middleware $middleware): void {
$middleware->prepend(\Zisunal\LaravelInstaller\Middleware\Installed::class);
})
'route_prefix' => 'setup',
'redirect_after_install' => '/dashboard',
'admin_model' => App\\Models\\Admin::class,
'admin_role_attribute' => 'user_type',
'admin_role_value' => 'super_admin',
'providers_to_register' => [
App\Providers\CustomServiceProvider::class,
],
'steps' => [
\Zisunal\LaravelInstaller\Livewire\Steps\WelcomeStep::class,
App\Installer\Steps\LicenseAgreementStep::class,
\Zisunal\LaravelInstaller\Livewire\Steps\RequirementsStep::class,
\Zisunal\LaravelInstaller\Livewire\Steps\EnvironmentStep::class,
\Zisunal\LaravelInstaller\Livewire\Steps\AdminUserStep::class,
\Zisunal\LaravelInstaller\Livewire\Steps\FinishStep::class,
],
'discover' => [
'enabled' => true,
'paths' => [
app_path('Installer/Steps') => 'App\\Installer\\Steps',
],
],
Zisunal\LaravelInstaller\Livewire\Steps\AbstractInstallerStep
Route::middleware(['web', 'installed'])->group(function () {
// protected routes here
});
bash
php artisan installer:setup
bash
php artisan installer:setup --force
bash
php artisan vendor:publish \
--provider="Zisunal\\LaravelInstaller\\InstallerServiceProvider" \
--tag="installer-config"
bash
php artisan make:installer-step
bash
php artisan installer:setup --force