-
Notifications
You must be signed in to change notification settings - Fork 7
/
extend.php
36 lines (28 loc) · 1.03 KB
/
extend.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<?php
/*
* This file is part of blomstra/search.
*
* Copyright (c) 2022 Blomstra Ltd.
*
* For the full copyright and license information, please view the LICENSE.md
* file that was distributed with this source code.
*
*/
namespace Blomstra\Search;
use Flarum\Extend as Flarum;
return [
(new Flarum\ServiceProvider())->register(Provider::class),
(new Flarum\Frontend('forum'))
->js(__DIR__.'/js/dist/forum.js'),
(new Flarum\Frontend('admin'))
->js(__DIR__.'/js/dist/admin.js'),
new Flarum\Locales(__DIR__.'/resources/locale'),
(new Flarum\Routes('api'))
->get('/blomstra/search/{type}', 'blomstra.search', Api\Controllers\SearchController::class)
->put('/blomstra/search/index', 'blomstra.search.index', Api\Controllers\IndexController::class),
(new Flarum\Console())
->command(Commands\BuildCommand::class),
(new Flarum\Settings())
->default('blomstra-search.search-discussion-subjects', true)
->default('blomstra-search.search-post-bodies', true),
];