eliyas5044 / laravel-visual-installer
Laravel visual installer
Installs: 38
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 1
Forks: 1
Open Issues: 0
Language:HTML
Requires
- php: >=7.1.3
This package is auto-updated.
Last update: 2024-10-21 21:02:02 UTC
README
About
This package was made possible by using Laravel Installer awesome package. Most code copied from this repository. I just needed more features for my project. So I've made this package.
The current features are :
- Check for server requirements.
- Check for folders permissions.
- Generate storage link to public folder.
- Ability to set database information.
- .env text editor
- .env form wizard
- Migrate the database.
- Seed the tables.
Requirements
Laravel Compatibility
Installation
Step 1: Install package
Add the package in your composer.json by executing the command.
composer require eliyas5044/laravel-visual-installer
Step 2: Publish package
Publish the packages views, config file, assets, and language files by executing the command.
php artisan vendor:publish --tag=laravelinstaller
Note: For linux user
# update user group of laravel project folder sudo chown -R $USER:www-data /var/www/html/laravel # give folder permissions sudo chmod -R 775 storage sudo chmod -R 775 bootstrap/cache
Extends
If you need extend this package, such as need more .env
variables, need to override controller method, you can easily extend it.
Create a file EnvironmentManager
in your app directory and bind it in your AppServiceProvider
.
use Eliyas5044\LaravelVisualInstaller\Controllers\FinalController; use Eliyas5044\LaravelVisualInstaller\Helpers\EnvironmentManager; public function register() { $this->app->bind(EnvironmentManager::class, \App\Helpers\EnvironmentManager::class); $this->app->bind(FinalController::class, \App\Http\Controllers\FinalController::class); }
Override controller method in \App\Http\Controllers\FinalController::class
<?php namespace App\Http\Controllers; use Eliyas5044\LaravelVisualInstaller\Events\LaravelVisualInstallerFinished; use Eliyas5044\LaravelVisualInstaller\Helpers\EnvironmentManager; use Eliyas5044\LaravelVisualInstaller\Helpers\FinalInstallManager; use Eliyas5044\LaravelVisualInstaller\Helpers\InstalledFileManager; class FinalController extends \Eliyas5044\LaravelVisualInstaller\Controllers\FinalController { public function finish(InstalledFileManager $fileManager, FinalInstallManager $finalInstall, EnvironmentManager $environment) { $finalMessages = $finalInstall->runFinal(); $finalEnvFile = $environment->getEnvContent(); event(new LaravelVisualInstallerFinished); return view('vendor.installer.finished', compact('finalMessages', 'finalEnvFile')); } }
Routes
/install
/update
Usage
-
Install Routes Notes
- In order to install your application, go to the
/install
route and follow the instructions. - Once the installation has ran the empty file
installed
will be placed into the/storage
directory. If this file is present the route/install
will abort to the 404 page.
- In order to install your application, go to the
-
Update Route Notes
- In order to update your application, go to the
/update
route and follow the instructions. - The
/update
routes counts how many migration files exist in the/database/migrations
folder and compares that count against the migrations table. If the files count is greater then the/update
route will render, otherwise, the page will abort to the 404 page.
- In order to update your application, go to the
-
Additional Files and folders published to your project :
Contributing
- If you have any suggestions please let me know : https://github.com/eliyas5044/laravel-visual-installer/pulls.
License
Laravel Visual Web Installer is licensed under the MIT license. Enjoy!