framework/extensions/package-manager/extend.php

28 lines
860 B
PHP
Raw Normal View History

2021-09-02 00:20:06 +08:00
<?php
/**
*
*/
namespace SychO\PackageManager;
use Flarum\Extend;
use Flarum\Foundation\Paths;
use Illuminate\Console\Scheduling\Event;
return [
(new Extend\Routes('api'))
->post('/package-manager/extensions', 'package-manager.extensions.require', Api\Controller\RequireExtensionController::class)
->patch('/package-manager/extensions/{id}', 'package-manager.extensions.update', Api\Controller\UpdateExtensionController::class)
->delete('/package-manager/extensions/{id}', 'package-manager.extensions.remove', Api\Controller\RemoveExtensionController::class),
(new Extend\Frontend('admin'))
->css(__DIR__ . '/less/admin.less')
->js(__DIR__ . '/js/dist/admin.js'),
new Extend\Locales(__DIR__ . '/locale'),
(new Extend\ServiceProvider)
2021-09-02 02:49:44 +08:00
->register(PackageManagerServiceProvider::class),
2021-09-02 00:20:06 +08:00
];