-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathextend.php
More file actions
40 lines (31 loc) · 1.07 KB
/
extend.php
File metadata and controls
40 lines (31 loc) · 1.07 KB
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
37
38
39
40
<?php
/*
* This file is part of ianm/log-viewer.
*
* Copyright (c) 2022 IanM.
*
* For the full copyright and license information, please view the LICENSE.md
* file that was distributed with this source code.
*/
namespace IanM\LogViewer;
use Flarum\Extend;
use Illuminate\Console\Scheduling\Event;
return [
(new Extend\Frontend('admin'))
->js(__DIR__.'/js/dist/admin.js')
->css(__DIR__.'/less/admin.less'),
new Extend\Locales(__DIR__.'/locale'),
new Extend\ApiResource(Api\Resource\LogFileResource::class),
(new Extend\Settings())
->default('ianm-log-viewer.purge-days', 90)
->default('ianm-log-viewer.max-file-size', 1),
(new Extend\Console())
->command(Console\CleanupLogfilesCommand::class)
->command(Console\SplitLargeLogfilesCommand::class)
->schedule(Console\CleanupLogfilesCommand::class, function (Event $schedule) {
$schedule->daily();
})
->schedule(Console\SplitLargeLogfilesCommand::class, function (Event $schedule) {
$schedule->daily();
}),
];