shipu / web-installer
Laravel Web Installer
Installs: 1 467
Dependents: 1
Suggesters: 0
Security: 0
Stars: 52
Watchers: 2
Forks: 13
Open Issues: 3
Requires
- filament/forms: ^3.0-stable
- filament/support: ^3.0-stable
- laravel/helpers: ^1.6
- livewire/livewire: ^3.0@beta
- spatie/laravel-package-tools: ^1.9
This package is auto-updated.
Last update: 2024-11-05 21:30:20 UTC
README
Laravel Web Installer is a Laravel package that allows you to install your application easily, without having to worry about setting up your environment before starting with the installation process.
Installation
composer require shipu/web-installer
then publish the assets
php artisan vendor:publish --tag=web-installer-assets
Screenshots
Add New Step
You can add new step in installer. For this you have to create a new class and implement Shipu\WebInstaller\Concerns\StepContract
class. Eg:
<?php 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 ]); } }
For Step
documentation please visit Filament Forms
Then you have to add this class in config/installer.php
Eg:
//... 'steps' => [ Overview::class, // <-- Add Here //... ], //...
Note: you have to publish config file first. More details in Configuration section.
Protect Routes
Protect other routes if not installed then you can apply the middleware to a route or route-group. Eg:
Route::group(['middleware' => 'redirect.if.not.installed'], function () { Route::get('/', function () { return view('welcome'); }); });
In Filament, if you want to protect all admin panel routes then you have to add middleware in panel service provider. Eg:
public function panel(Panel $panel): Panel { return $panel ... ->middleware([ \Shipu\WebInstaller\Middleware\RedirectIfNotInstalled::class, ... ]); }
Configuration
you can modify almost everything in this package. For this you have to publish the config file. Eg:
php artisan vendor:publish --tag=web-installer-config