2015-08-04 17:19:17 +09:30
|
|
|
<?php
|
|
|
|
|
2015-09-04 12:30:55 +09:30
|
|
|
/*
|
|
|
|
* This file is part of Flarum.
|
|
|
|
*
|
|
|
|
* (c) Toby Zerner <toby.zerner@gmail.com>
|
|
|
|
*
|
|
|
|
* For the full copyright and license information, please view the LICENSE
|
|
|
|
* file that was distributed with this source code.
|
|
|
|
*/
|
|
|
|
|
2018-01-16 23:19:16 +01:00
|
|
|
use Flarum\Extend;
|
2018-02-08 18:25:58 +01:00
|
|
|
use Flarum\Pusher\Api\Controller\AuthController;
|
2015-10-13 12:29:00 +10:30
|
|
|
use Flarum\Pusher\Listener;
|
|
|
|
use Illuminate\Contracts\Events\Dispatcher;
|
2015-08-04 17:19:17 +09:30
|
|
|
|
2018-01-16 23:19:16 +01:00
|
|
|
return [
|
|
|
|
(new Extend\Assets('forum'))
|
2018-06-20 13:35:38 +09:30
|
|
|
->js(__DIR__.'/js/dist/forum.js')
|
|
|
|
->asset(__DIR__.'/less/forum.less'),
|
|
|
|
|
2018-01-16 23:19:16 +01:00
|
|
|
(new Extend\Assets('admin'))
|
2018-06-20 13:35:38 +09:30
|
|
|
->js(__DIR__.'/js/dist/admin.js'),
|
|
|
|
|
2018-02-08 18:25:58 +01:00
|
|
|
(new Extend\Routes('api'))
|
|
|
|
->post('/pusher/auth', 'pusher.auth', AuthController::class),
|
2018-06-20 13:35:38 +09:30
|
|
|
|
2018-01-16 23:19:16 +01:00
|
|
|
function (Dispatcher $events) {
|
|
|
|
$events->subscribe(Listener\AddPusherApi::class);
|
|
|
|
$events->subscribe(Listener\PushNewPosts::class);
|
|
|
|
},
|
|
|
|
];
|