InstallerErag packages can be seamlessly integrated into any Laravel project. Designed for simplicity, this package allows you to dynamically configure essential settings such as:
- Minimum PHP version required
- PHP execution
- Default Laravel folder permissions
.envfile setup- Custom account form
Additionally, InstallerErag automates database migrations and seeding processes.
Install the package via Composer:
composer require erag/installereragEnsure the service provider is registered in /bootstrap/providers.php:
return [
// ...
InstallerErag\InstallerServiceProvider::class
];Add the service provider to config/app.php:
'providers' => [
// ...
InstallerErag\InstallerServiceProvider::class,
];Run the following command to publish the necessary assets:
php artisan vendor:publish --tag=InstallerErag --forceNavigate to your installation URL:
https://yourdomain.com/install-appEnsure the appropriate file or directory permissions with:
sudo chmod -R 775 directory_nameTo customize PHP requirements or folder permissions, edit yourProject/config/install.php:
'requirements' => [
// Add or remove PHP extensions as needed
],
'permissions' => [
// Add or remove folder permissions as needed
]To add new .env variables dynamically, modify yourProject/config/install.php like so:
'needed="34dsf24bcgf"' . "\n" .
'apikey="123456"',To add extra fields to the account form:
- Navigate to
resources/views/vendor/account.blade.php. - Add the following code for a new field (e.g., phone number):
<div class="col-md-12 mb-3">
<x-install-input label="Phone Number" required="true" name="phone_number" type="text"
value="{{ old('phone_number') }}" />
<x-install-error for="phone_number" />
</div>- Update the input tag in
yourproject/config/install.php:
'account' => [
'name' => 'required|string|max:255',
'email' => 'required|email|unique:users|max:255',
'password' => 'required|string|min:6',
'phone_number' => 'required',
]