-
Notifications
You must be signed in to change notification settings - Fork 6
/
Plugin.php
43 lines (38 loc) · 954 Bytes
/
Plugin.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
<?php
namespace Autumn\Api;
use App;
use System\Classes\PluginBase;
use Autumn\Api\Console\CreateApi;
use Autumn\Api\Providers\ServiceProvider;
use Barryvdh\Cors\ServiceProvider as CorsServiceProvider;
/**
* Api Plugin Information File.
*/
class Plugin extends PluginBase
{
/**
* Returns information about this plugin.
*
* @return array
*/
public function pluginDetails()
{
return [
'name' => 'Api',
'description' => 'Tools for building RESTful HTTP + JSON APIs.',
'author' => 'Autumn',
'icon' => 'icon-paper-plane',
];
}
/**
* Register method, called when the plugin is first registered.
*
* @return void
*/
public function register()
{
App::register(CorsServiceProvider::class);
App::register(ServiceProvider::class);
$this->registerConsoleCommand('create.api', CreateApi::class);
}
}