Use new listen API

This commit is contained in:
Toby Zerner 2015-08-13 12:49:58 +09:30
parent bcce0c8cc0
commit b9edb29d9f

View File

@ -5,10 +5,8 @@ use Illuminate\Events\Dispatcher;
class Extension extends BaseExtension class Extension extends BaseExtension
{ {
public function boot(Dispatcher $events) public function listen(Dispatcher $events)
{ {
$this->loadViewsFrom(__DIR__.'/../views', 'mentions');
$events->subscribe('Flarum\Mentions\Listeners\AddClientAssets'); $events->subscribe('Flarum\Mentions\Listeners\AddClientAssets');
$events->subscribe('Flarum\Mentions\Listeners\AddModelRelationships'); $events->subscribe('Flarum\Mentions\Listeners\AddModelRelationships');
$events->subscribe('Flarum\Mentions\Listeners\AddApiRelationships'); $events->subscribe('Flarum\Mentions\Listeners\AddApiRelationships');
@ -17,4 +15,9 @@ class Extension extends BaseExtension
$events->subscribe('Flarum\Mentions\Listeners\UpdateUserMentionsMetadata'); $events->subscribe('Flarum\Mentions\Listeners\UpdateUserMentionsMetadata');
$events->subscribe('Flarum\Mentions\Listeners\UpdatePostMentionsMetadata'); $events->subscribe('Flarum\Mentions\Listeners\UpdatePostMentionsMetadata');
} }
public function boot()
{
$this->loadViewsFrom(__DIR__.'/../views', 'mentions');
}
} }