'social', 'description' => 'No description provided yet...', 'author' => 'zoomyboy', 'icon' => 'icon-leaf' ]; } /** * Register method, called when the plugin is first registered. * * @return void */ public function register() { $this->registerConsoleCommand('social-sync', SocialSync::class); $this->registerConsoleCommand('social-refresh', SocialRefresh::class); } /** * Boot method, called right before the request route. * * @return array */ public function boot() { } /** * Registers any front-end components implemented in this plugin. * * @return array */ public function registerComponents() { return [ 'Zoomyboy\Social\Components\FacebookPageFeed' => 'facebookpagefeed', ]; } /** * Registers any back-end permissions used by this plugin. * * @return array */ public function registerPermissions() { return [ 'zoomyboy.social.settings' => [ 'tab' => 'social', 'label' => 'Social Settings' ], ]; } /** * Registers back-end navigation items for this plugin. * * @return array */ public function registerNavigation() { return []; // Remove this line to activate return [ 'social' => [ 'label' => 'social', 'url' => Backend::url('zoomyboy/social/mycontroller'), 'icon' => 'icon-leaf', 'permissions' => ['zoomyboy.social.*'], 'order' => 500, ], ]; } public function registerMarkupTags(): array { return [ 'filters' => [ 'human' => function($date) { return $date->diffForHumans(); } ] ]; } public function registerSettings() { return [ 'settings' => [ 'label' => 'Social Media', 'description' => 'Social media Einstellungen', 'category' => 'Plugins', 'icon' => 'icon-facebook', 'class' => Setting::class, 'order' => 500, 'keywords' => 'facebook twitter social', 'permissions' => ['zoomyboy.social.settings'] ] ]; } public function registerFormWidgets() { return [ FacebookLogin::class => 'zoomyboy_social_facebook_login', InstagramLogin::class => 'zoomyboy_social_instagram_login', ]; } public function registerSchedule($schedule) { $schedule->command('social:sync')->hourly(); $schedule->command('social:refresh')->monthly(); } }