in other word, how i understand a module before installed? with database? and every time module is loaded, check for install?
solved. in modules routes.php:
Event::subscribe('Test1');
and in module Test1 class:
<?php
use Classes\Validate;
class Test1 extends \Classes\Module\Module
{
public function __construct()
{
$this->name = 'Test2';
$this->author = 'test author';
}
public function subscribe($events)
{
$events->listen('modules.install.' . $this->name, 'Test1@install');
}
public function install()
{
dd('events for install method work pretty');
}
}
and fire events:
$this->app['events']->fire('modules.install.' . $this->name);
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community