PHPackages                             ilgala/laravel-wizzy - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. ilgala/laravel-wizzy

AbandonedArchivedPackage[Utility &amp; Helpers](/categories/utility)

ilgala/laravel-wizzy
====================

A laravel install wizard

0.1.0-alpha(9y ago)119MITJavaScriptPHP &gt;=5.5.9

Since Aug 29Pushed 9y agoCompare

[ Source](https://github.com/IlGala/laravel-wizzy)[ Packagist](https://packagist.org/packages/ilgala/laravel-wizzy)[ RSS](/packages/ilgala-laravel-wizzy/feed)WikiDiscussions master Synced yesterday

READMEChangelog (1)Dependencies (2)Versions (3)Used By (0)

Laravel-wizzy
=============

[](#laravel-wizzy)

Laravel-wizzy was created by, and is maintained by [Filippo Galante](https://github.com/IlGala), and is a configurable laravel install wizard that permits a user to check system requirements, setup environment and run database migrations and seed. Feel free to check out the [change log](CHANGELOG.md), [releases](https://github.com/IlGala/laravel-wizzy/releases), [license](LICENSE), and [contribution guidelines](CONTRIBUTING.md).

[![StyleCI](https://camo.githubusercontent.com/2b1900784fa4c31c2d9032f9c3bd2d3075e656947ba330019fd516b56519f037/68747470733a2f2f7374796c6563692e696f2f7265706f732f36363031303835342f736869656c64)](https://styleci.io/repos/66010854)[![Latest Stable Version](https://camo.githubusercontent.com/68a81f50e6ba9f9601610592073957c02b7a557c2d909b010f0f4002b703de68/68747470733a2f2f706f7365722e707567782e6f72672f696c67616c612f6c61726176656c2d77697a7a792f762f737461626c65)](https://packagist.org/packages/ilgala/laravel-wizzy)[![Total Downloads](https://camo.githubusercontent.com/58460ea64c0615e40628e9f05e439ab70f2472c3330add6a263fe26e39a63ef4/68747470733a2f2f706f7365722e707567782e6f72672f696c67616c612f6c61726176656c2d77697a7a792f646f776e6c6f616473)](https://packagist.org/packages/ilgala/laravel-wizzy)[![Latest Unstable Version](https://camo.githubusercontent.com/fbd51ea57a02a52991a5212705207d96f2620d85e7c8d7f8a5d01efc990a2114/68747470733a2f2f706f7365722e707567782e6f72672f696c67616c612f6c61726176656c2d77697a7a792f762f756e737461626c65)](https://packagist.org/packages/ilgala/laravel-wizzy)[![License](https://camo.githubusercontent.com/12fe1c9c786803acb9eddecf27448e353f7022e6b2759c1ed7497d8a2a8c342e/68747470733a2f2f706f7365722e707567782e6f72672f696c67616c612f6c61726176656c2d77697a7a792f6c6963656e7365)](https://packagist.org/packages/ilgala/laravel-wizzy)

Installation
------------

[](#installation)

Requirements:

- PHP 5.5+
- Laravel

To get the latest version of Laravel Wizzy, simply require the project using [Composer](https://getcomposer.org):

```
$ composer require ilgala/laravel-wizzy:dev-master
```

Instead, you may of course manually update your require block and run `composer update` if you so choose:

```
{
    "require": {
        "ilgala/laravel-wizzy": "dev-master"
    }
}
```

Once Laravel Wizzy is installed, you need to register the service provider. Open up `config/app.php` and add the following to the `providers` key.

- `IlGala\LaravelWizzy\WizzyServiceProvider::class`

You can register the Wizzy facade in the `aliases` key of your `config/app.php` file if you like.

- `'Wizzy' => 'IlGala\LaravelWizzy\Facades\Wizzy'`

Configuration
-------------

[](#configuration)

Laravel Wizzy supports optional configuration.

To get started, you'll need to publish all vendor assets:

```
$ php artisan vendor:publish
```

This will create a `config/wizzy.php` file in your app that you can modify to set your configuration. The `publish` command will also copy the package's views and the `public/assets` folder. Also, make sure you check for changes to the original config file in this package between releases.

There are several config options:

##### Wizzy Enable flag

[](#wizzy-enable-flag)

This option specifies if the wizzy is enabled and will be considered only if the .env file doesn't contain any WIZZY\_ENABLED key.

```
Default: true

```

##### Application System Requirements

[](#application-system-requirements)

This set of options specifies the application requirements for php and the filesystem permissions. Only the required PHP version is mandatory forthe wizard.

```
Default values
    'php' => [
        'required' => 'x.x.x', // Default: laravel required version
        'preferred' => 'x.x.x', // Default: laravel required version
    ],
    'php_extensions' => [ // Default: laravel required extensions
        'OpenSSL',
        'PDO',
        'Mbstring',
        'Tokenizer',
    ],
    'permissions' => [ // Default: laravel filesystem permissions
        'storage/app/' => '775',
        'storage/framework/' => '775',
        'storage/logs/' => '775',
        'bootstrap/cache/' => '775',
    ],
],

```

##### Wizzy Steps

[](#wizzy-steps)

This set of options specifies if the environment view and the database view are enabled in the wizard. If the parameters are setted to false, the wizard will skip one or both steps.

```
environment default: true
database default: true

```

##### Wizzy Routes Prefix

[](#wizzy-routes-prefix)

This option specifies Wizzy's routes group prefix in order to avoid conflicts with other routes of the application.

```
Default: install

```

##### Environment Filename

[](#environment-filename)

Application's environment file used to parse the environment variables.

```
Default: .env

```

##### Migrations Path

[](#migrations-path)

Application's path to migrations files.

```
Default: database/migrations

```

##### Force Flag

[](#force-flag)

If this option is setted to true, the migration command will be runned with --force attribute.

```
Default: false

```

##### Conclusion Scripts

[](#conclusion-scripts)

This set of options contains all the artisan scripts that will be runned during the last step of the wizard.

The defaults scripts runned are:

- **clear-compiled:** Remove the compiled class file
- **optimize:** Optimize the framework for better performance
- **config:clear:** Remove the configuration cache file
- **config:cache:** Create a cache file for faster configuration loading

For more informations about the artisan commands please refer to the official documentation.

##### Redirect To

[](#redirect-to)

This is the url used to redirect the user when the application install process is completed.

```
Default: /

```

Usage
-----

[](#usage)

##### Facades\\Wizzy

[](#facadeswizzy)

This facade will dynamically pass static method calls to the 'wizzy' object in the ioc container which by default is the `IlGala\LaravelWizzy\Wizzy` class. This facade may be also used for a custom wizard creation. The declared methods may be used as helpers function for creating environment files, run database migrations or artisan commands.

```
/**
 * Get wizzy route group prefix from the config file.
 *
 * @return string wizzy.prefix
 */
Wizzy::getPrefix();

/**
 * Get wizzy default evnironment filename from the config file.
 *
 * @return string wizzy.environment
 */
Wizzy::getDefaultEnv();

/**
 * Get wizzy conclusion view redirect url from the config file.
 *
 * @return string wizzy.redirectTo
 */
Wizzy::getRedirectUrl();

/**
 * Check if wizzy is enabled from the config file.
 *
 * @return bool true|false
 */
Wizzy::isWizzyEnabled();

/**
 * Check if wizzy environment step is enabled from the config file.
 *
 * @return string wizzy.steps.environment
 */
Wizzy::isEnvironmentStepEnabled();

/**
 * Check if wizzy database step is enabled from the config file.
 *
 * @return string wizzy.steps.database
 */
Wizzy::isDatabaseStepEnabled();

/**
 * Stores the $variables array as an environment file. If the $wizzy_enabled
 * variable is true, then it will add WIZZY_ENABLED=false variable in the
 * .env file.
 *
 * @param string $filename
 * @param string $variables
 * @param boolean $wizzy_enabled
 * @return string filename
 */
Wizzy::($filename, $variables, $wizzy_enabled = false);

/**
 * Runs the artisan 'migrate' command.
 *
 * @param string $path
 * @param boolean $refresh_database
 * @param boolean $seed_database
 */
Wizzy::runMigration($path, $refresh_database, $seed_database);

/**
 * Retrieve all the migration files in the given path.
 *
 * @param type $path
 * @return array
 */
Wizzy::getMigrationsList($path);

/**
 * Runs an artisan command.
 *
 * @param type $command
 * @param type $attributes
 * @return void
 */
Wizzy::artisanCall($command, $attributes = []);

```

##### WizzyServiceProvider

[](#wizzyserviceprovider)

This class contains no public methods of interest. This class should be added to the providers array in `config/app.php`. This class will setup ioc bindings.

##### WizzyMiddleware

[](#wizzymiddleware)

Wizzy includes a middleware used to redirect the application routes to the installation wizard. In order to enable the redirection, you have to register the middleware as global in the app/Http/Kernel.php file like this:

```
