mirror of
https://github.com/flarum/core.git
synced 2025-07-31 13:40:20 +02:00
Refactor Flarum\Web and Flarum\Admin
- In order to be consistent with the Ember/LESS naming scheme, renamed Flarum\Web to Flarum\Forum. - Moved common classes into Flarum\Support so that Flarum\Admin doesn’t depend on Flarum\Forum. Also moved Actor into Flarum\Support as it doesn’t belong in the domain.
This commit is contained in:
45
src/Forum/ForumServiceProvider.php
Normal file
45
src/Forum/ForumServiceProvider.php
Normal file
@@ -0,0 +1,45 @@
|
||||
<?php namespace Flarum\Forum;
|
||||
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
use Flarum\Support\AssetManager;
|
||||
|
||||
class ForumServiceProvider extends ServiceProvider
|
||||
{
|
||||
/**
|
||||
* Bootstrap the application events.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function boot()
|
||||
{
|
||||
$root = __DIR__.'/../..';
|
||||
|
||||
$this->loadViewsFrom($root.'/views', 'flarum.forum');
|
||||
|
||||
$assetManager = $this->app['flarum.forum.assetManager'];
|
||||
|
||||
$assetManager->addFile([
|
||||
$root.'/ember/forum/dist/assets/vendor.js',
|
||||
$root.'/ember/forum/dist/assets/flarum-forum.js',
|
||||
$root.'/less/forum/app.less'
|
||||
]);
|
||||
|
||||
$this->publishes([
|
||||
$root.'/public/fonts' => public_path('flarum/fonts')
|
||||
]);
|
||||
|
||||
include __DIR__.'/routes.php';
|
||||
}
|
||||
|
||||
/**
|
||||
* Register the service provider.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function register()
|
||||
{
|
||||
$this->app['flarum.forum.assetManager'] = $this->app->share(function ($app) {
|
||||
return new AssetManager($app['files'], $app['path.public'].'/flarum', 'forum');
|
||||
});
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user