-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathextend.php
47 lines (41 loc) · 1.49 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
37
38
39
40
41
42
43
44
45
46
47
<?php
namespace Kilowhat\AffiliationLinks;
use Flarum\Extend;
use Flarum\Foundation\Application;
use Illuminate\Contracts\Events\Dispatcher;
return [
(new Extend\Frontend('admin'))
->js(__DIR__ . '/js/dist/admin.js')
->css(__DIR__ . '/resources/less/admin.less'),
new Extend\Locales(__DIR__ . '/resources/locale'),
(new Extend\Routes('api'))
->post(
'/kilowhat-affiliation-links/rules/order',
'kilowhat.affiliation-links.api.rules.order',
Controllers\RuleOrderController::class
)
->get(
'/kilowhat-affiliation-links/rules',
'kilowhat.affiliation-links.api.rules.index',
Controllers\RuleIndexController::class
)
->post(
'/kilowhat-affiliation-links/rules',
'kilowhat.affiliation-links.api.rules.store',
Controllers\RuleStoreController::class
)
->patch(
'/kilowhat-affiliation-links/rules/{id:[0-9]+}',
'kilowhat.affiliation-links.api.rules.update',
Controllers\RuleUpdateController::class
)
->delete(
'/kilowhat-affiliation-links/rules/{id:[0-9]+}',
'kilowhat.affiliation-links.api.rules.delete',
Controllers\RuleDeleteController::class
),
function (Dispatcher $events, Application $app) {
$events->subscribe(Listeners\ReplacePostLinks::class);
$app->register(Providers\UrlReplacerProvider::class);
},
];