Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
Size: Mime:
<?php namespace Modules\Core\Commands\Installers\Scripts\UserProviders;

use Modules\Core\Commands\Installers\SetupScript;

class DefaultInstaller extends ProviderInstaller implements SetupScript
{
    /**
     * Check if the user driver is correctly registered.
     * @return bool
     */
    public function checkIsInstalled()
    {
        return true;
    }

    /**
     * Not called
     * @return mixed
     */
    public function composer()
    {
    }

    /**
     * @return mixed
     */
    public function publish()
    {
        if ($this->command->option('verbose')) {
            return $this->command->call('module:publish', ['module' => 'Users']);
        }

        return $this->command->callSilent('module:publish', ['module' => 'Users']);
    }

    /**
     * @return mixed
     */
    public function migrate()
    {
        if ($this->command->option('verbose')) {
            return $this->command->call('module:migrate', ['module' => 'Users']);
        }

        return $this->command->callSilent('module:migrate', ['module' => 'Users']);
    }

    /**
     * @return mixed
     */
    public function configure()
    {
        $this->bindUserRepositoryOnTheFly('Eloquent');
    }

    /**
     * @return mixed
     */
    public function seed()
    {
        if ($this->command->option('verbose')) {
            return $this->command->call('module:seed', ['module' => 'Users']);
        }

        return $this->command->callSilent('module:seed', ['module' => 'Users']);
    }

    /**
     * @param $password
     * @return mixed
     */
    public function getHashedPassword($password)
    {
        return bcrypt($password);
    }
}