1 | <?php |
||
11 | class FullcalendarServiceProvider extends ServiceProvider |
||
12 | { |
||
13 | /** Identifier for the service */ |
||
14 | const IDENTIFIER = 'laravel-fullcalendar'; |
||
15 | |||
16 | /** |
||
17 | * Register bindings in the container. |
||
18 | * |
||
19 | * @return void |
||
20 | */ |
||
21 | public function register() |
||
27 | |||
28 | /** |
||
29 | * Bootstrap any application services. |
||
30 | * |
||
31 | * @return void |
||
32 | */ |
||
33 | public function boot() |
||
34 | { |
||
35 | // specify from where we want to load the views |
||
36 | $this->loadViewsFrom(__DIR__ . '/views/', 'fullcalendar'); |
||
37 | |||
38 | // publish the config file |
||
39 | $this->publishes([ |
||
40 | __DIR__ . '/config/fullcalendar.php' => config_path('fullcalendar.php'), |
||
41 | ], 'config'); |
||
42 | |||
43 | // publish all the required files to generate the calendar |
||
44 | $this->publishes([ |
||
45 | // fullcalendar library |
||
46 | __DIR__ . '/../../../npm-asset/fullcalendar/dist/fullcalendar.css' => public_path('css/fullcalendar.css'), |
||
47 | __DIR__ . '/../../../npm-asset/fullcalendar/dist/fullcalendar.print.css' => public_path('css/fullcalendar.print.css'), |
||
48 | __DIR__ . '/../../../npm-asset/fullcalendar/dist/fullcalendar.js' => public_path('js/fullcalendar.js'), |
||
49 | __DIR__ . '/../../../npm-asset/fullcalendar/dist/locale-all.js' => public_path('js/locale-all.js'), |
||
50 | __DIR__ . '/../../../npm-asset/fullcalendar/dist/gcal.js' => public_path('js/gcal.js'), |
||
51 | // moment library |
||
52 | __DIR__ . '/../../../npm-asset/moment/moment.js' => public_path('js/moment.js'), |
||
53 | ], 'fullcalendar'); |
||
54 | } |
||
55 | |||
56 | /** |
||
57 | * @return array |
||
58 | */ |
||
59 | public function provides() |
||
63 | } |