framework/extensions/pusher/bootstrap.php

33 lines
835 B
PHP
Raw Normal View History

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.
*/
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
return [
(new Extend\Assets('forum'))
->js(__DIR__.'/js/dist/forum.js')
->asset(__DIR__.'/less/forum.less'),
(new Extend\Assets('admin'))
->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),
function (Dispatcher $events) {
$events->subscribe(Listener\AddPusherApi::class);
$events->subscribe(Listener\PushNewPosts::class);
},
];