PHP code example of aelisvaddoriya / web-installer

1. Go to this page and download the library: Download aelisvaddoriya/web-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/ */

    

aelisvaddoriya / web-installer example snippets




namespace Your\Namespace;

use Filament\Forms\Components\Wizard\Step;
use Shipu\WebInstaller\Concerns\StepContract;

class Overview implements StepContract
{
    public static function make(): Step
    {
        return Step::make('overview')
            ->label('Overview')
            ->schema([
             // Add Filament Fields Here
            ]);
    }
}

//...
'steps' => [
    Overview::class, // <-- Add Here
    //...
],
//...

Route::group(['middleware' => 'redirect.if.not.installed'], function () {
    Route::get('/', function () {
        return view('welcome');
    });
});

public function panel(Panel $panel): Panel
{
    return $panel
        ...
        ->middleware([
            \Shipu\WebInstaller\Middleware\RedirectIfNotInstalled::class,
            ...
        ]);
}
bash
php artisan vendor:publish --tag=web-installer-assets
 
bash
php artisan vendor:publish --tag=web-installer-config