mirror of
https://github.com/flarum/framework.git
synced 2025-05-17 03:42:33 +08:00
Add BootForum event so extensions can add assets
This commit is contained in:
parent
b6613dbdc2
commit
8fdc1ba548
11
src/Forum/Events/BootForum.php
Normal file
11
src/Forum/Events/BootForum.php
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
<?php namespace Flarum\Forum\Events;
|
||||||
|
|
||||||
|
class BootForum
|
||||||
|
{
|
||||||
|
public $app;
|
||||||
|
|
||||||
|
public function __construct($app)
|
||||||
|
{
|
||||||
|
$this->app = $app;
|
||||||
|
}
|
||||||
|
}
|
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
use Illuminate\Support\ServiceProvider;
|
use Illuminate\Support\ServiceProvider;
|
||||||
use Flarum\Support\AssetManager;
|
use Flarum\Support\AssetManager;
|
||||||
|
use Flarum\Forum\Events\BootForum;
|
||||||
|
|
||||||
class ForumServiceProvider extends ServiceProvider
|
class ForumServiceProvider extends ServiceProvider
|
||||||
{
|
{
|
||||||
@ -23,6 +24,8 @@ class ForumServiceProvider extends ServiceProvider
|
|||||||
$root.'/less/forum/app.less'
|
$root.'/less/forum/app.less'
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
event(new BootForum($this->app));
|
||||||
|
|
||||||
$this->publishes([
|
$this->publishes([
|
||||||
$root.'/public/fonts' => public_path('flarum/fonts')
|
$root.'/public/fonts' => public_path('flarum/fonts')
|
||||||
]);
|
]);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user