sky

Configuration

There is two different set of configuration, for filament, and for the frontend pages

Filament Configuration

to configure the plugin Sky, you can pass the configuration to the plugin in adminPanelProvider

these all the available configuration, and their defaults values

1SpatieLaravelTranslatablePlugin::make()
2 //If you don't use multi-language
3 ->defaultLocales([config('app.locale')])
4 // or if you have more
5 ->defaultLocales(['en', 'pt']),
6 
7SkyPlugin::make()
8 ->navigationGroupLabel('Sky')
9 
10 // uploading config
11 ->uploadDisk()
12 ->uploadDirectory()
13 
14 // the default models, by default Sky will read from the config file 'zeus-sky'.
15 // but if you want to customize the models per panel, you can do it here
16 ->skyModels([
17 // ...
18 'Tag' => \LaraZeus\Sky\Models\Tag::class,
19 ])
20 
21 // available tags
22 ->tagTypes([
23 'tag' => 'Tag',
24 'category' => 'Category',
25 'library' => 'Library',
26 'faq' => 'Faq',
27 ])
28 
29 // disable a Resource, if you dont use it, or want to replace them with your own resource
30 ->postResource()
31 ->pageResource()
32 ->faqResource()
33 ->libraryResource()
34 ->tagResource()
35 ->navigationResource()
36 
37 // hide a Resource, if you need to register them, but want to hide them from the sidebar navigation
38 ->hideResources([
39 FaqResource::class,
40 ])
41 
42 // hide/show nav badges
43 ->hideNavigationBadges(resource: LaraZeus\Sky\Resources::CollectionResource)
44 ->showNavigationBadges(resource: LaraZeus\Sky\Resources::CollectionResource)

Customize Filament Resources

you can customize all Sky resources icons and sorting by adding the following code to your AppServiceProvider boot method

1PostResource::navigationSort(100);
2PostResource::navigationIcon('heroicon-o-home');
3PostResource::navigationGroup('New Name');

Show or Hide Badges

To show all navigation badges (default)

1->showNavigationBadges()

To hide all navigation badges

1->hideNavigationBadges()

This will hide only the CollectionResource navigation badge

1->hideNavigationBadges(resource: LaraZeus\Sky\Resources::CollectionResource)

This will show only the FormResource navigation badge

1->hideNavigationBadges()
2->showNavigationBadges(resource: LaraZeus\Sky\Resources::CollectionResource)

available resources:

  • FaqResource,
  • LibraryResource,
  • NavigationResource,
  • PageResource,
  • PostResource,
  • TagResource,

Frontend Configuration

use the file zeu-sky.php, to customize the frontend, like the prefix, middleware and URI prefix for each content type.

to publish the configuration:

1php artisan vendor:publish --tag=zeus-sky-config

and here is the config content:

1<?php
2 
3return [
4 'domain' => null,
5 
6 /**
7 * disable all sky frontend routes.
8 */
9 'headless' => false,
10 
11 /**
12 * set the default path for the blog homepage.
13 */
14 'prefix' => 'sky',
15 
16 /**
17 * the middleware you want to apply on all the blog routes
18 * for example if you want to make your blog for users only, add the middleware 'auth'.
19 */
20 'middleware' => ['web'],
21 
22 /**
23 * URI prefix for each content type
24 */
25 'uri' => [
26 'post' => 'post',
27 'page' => 'page',
28 'library' => 'library',
29 'faq' => 'faq',
30 ],
31 
32 /**
33 * you can overwrite any model and use your own
34 * you can also configure the model per panel in your panel provider using:
35 * ->skyModels([ ... ])
36 */
37 'models' => [
38 'Faq' => \LaraZeus\Sky\Models\Faq::class,
39 'Post' => \LaraZeus\Sky\Models\Post::class,
40 'PostStatus' => \LaraZeus\Sky\Models\PostStatus::class,
41 'Tag' => \LaraZeus\Sky\Models\Tag::class,
42 'Library' => \LaraZeus\Sky\Models\Library::class,
43 ],
44 
45 'parsers' => [
46 \LaraZeus\Sky\Classes\BoltParser::class,
47 ],
48 
49 'recentPostsLimit' => 5,
50 
51 'searchResultHighlightCssClass' => 'highlight',
52 
53 'skipHighlightingTerms' => ['iframe'],
54 
55 'defaultFeaturedImage' => null,
56 
57 'editor' => \LaraZeus\Sky\Editors\RichEditor::class,
58];

Zeus is an open-source project. Thanks to my sponsors for helping me maintain this project.