diff --git a/README.md b/README.md index 46f1f34..da10a7b 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@

Lara Zeus Sky

- +

@@ -77,6 +77,12 @@ visit the url `/admin` to manage the Letters, and `/blog`. Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently. +## Support +available support channels: +* using our channel `#sky` on [Discord](https://filamentphp.com/discord) +* open an issue on [GitHub](https://github.com/lara-zeus/sky/issues) +* email us using the [contact center](https://atm-code.com/contact-us/lara-zeus) + ## Contributing Please see [CONTRIBUTING](CONTRIBUTING.md) for details. diff --git a/database/factories/PostFactory.php b/database/factories/PostFactory.php index 965af9d..61b2f2f 100644 --- a/database/factories/PostFactory.php +++ b/database/factories/PostFactory.php @@ -17,14 +17,13 @@ class PostFactory extends Factory public function definition() { return [ - 'user_id' => 1, - 'title' => $this->faker->word, - 'slug' => $this->faker->slug(2), - 'description' => $this->faker->sentence, - 'content' => $this->faker->sentence, + 'user_id' => 1, + 'title' => $this->faker->word, + 'slug' => $this->faker->slug(2), + 'description' => $this->faker->sentence, + 'content' => $this->faker->sentence, 'published_at' => now(), - 'post_type' => $this->faker->randomElement(['page','post']), - 'tags' => $this->faker->randomElement([['dev'], ['talk'], ['laravel']]), + 'post_type' => $this->faker->randomElement([ 'page', 'post' ]), ]; } } diff --git a/database/seeders/SkySeeder.php b/database/seeders/SkySeeder.php index 3bd956b..dd8228f 100644 --- a/database/seeders/SkySeeder.php +++ b/database/seeders/SkySeeder.php @@ -3,16 +3,24 @@ namespace Database\Seeders; use Illuminate\Database\Seeder; -use Illuminate\Support\Facades\DB; -use Illuminate\Support\Facades\Hash; use LaraZeus\Sky\Models\Post; +use LaraZeus\Sky\Models\Tag; class SkySeeder extends Seeder { public function run() { + Tag::create([ 'name' => 'laravel', 'type' => 'category' ]); + Tag::create([ 'name' => 'talks', 'type' => 'category' ]); + Tag::create([ 'name' => 'dev', 'type' => 'category' ]); + Post::factory() ->count(8) ->create(); + + foreach (Post::all() as $post) { // loop through all posts + $random_tags = Tag::all()->random(1)->first()->name; + $post->syncTagsWithType([ $random_tags ], 'category'); + } } } diff --git a/docs/customization.md b/docs/customization.md index e10839b..2ce2396 100644 --- a/docs/customization.md +++ b/docs/customization.md @@ -25,5 +25,14 @@ to customize the default views for sky: php artisan vendor:publish --tag=zeus-sky-views ``` +## Publishing Translations + +to customize the translations: + +```bash +php artisan vendor:publish --tag=zeus-sky-translations +``` + + ## themes soon diff --git a/docs/introduction.md b/docs/introduction.md index ace053c..47d29bb 100644 --- a/docs/introduction.md +++ b/docs/introduction.md @@ -27,4 +27,11 @@ and more in the way: - authers - menus - comments +- RSS - and more! + +## Support +available support channels: +* using our channel `#sky` on [Discord](https://filamentphp.com/discord) +* open an issue on [GitHub](https://github.com/lara-zeus/sky/issues) +* email us using the [contact center](https://atm-code.com/contact-us/lara-zeus) diff --git a/resources/views/themes/zeus/partial/sidebar/categories.blade.php b/resources/views/themes/zeus/partial/sidebar/categories.blade.php index b2630ac..b5f1691 100644 --- a/resources/views/themes/zeus/partial/sidebar/categories.blade.php +++ b/resources/views/themes/zeus/partial/sidebar/categories.blade.php @@ -7,7 +7,7 @@

  • {{ $tag->name }} - {{ $tag->posts_count }} Post + {{ $tag->posts_published_count }} Post
  • diff --git a/resources/views/themes/zeus/partial/sidebar/pages.blade.php b/resources/views/themes/zeus/partial/sidebar/pages.blade.php index 9aa9653..eb1e9d3 100644 --- a/resources/views/themes/zeus/partial/sidebar/pages.blade.php +++ b/resources/views/themes/zeus/partial/sidebar/pages.blade.php @@ -7,8 +7,6 @@
    @if(!$post->getMedia('posts')->isEmpty()) - @else - @endif
    {{ $post->title ?? '' }}
    diff --git a/resources/views/themes/zeus/partial/sidebar/recent.blade.php b/resources/views/themes/zeus/partial/sidebar/recent.blade.php index 1a8db3d..6009a0b 100644 --- a/resources/views/themes/zeus/partial/sidebar/recent.blade.php +++ b/resources/views/themes/zeus/partial/sidebar/recent.blade.php @@ -7,8 +7,6 @@
    @if(!$post->getMedia('posts')->isEmpty()) - @else - @endif
    {{ $post->title ?? '' }}
    diff --git a/src/Http/Livewire/Posts.php b/src/Http/Livewire/Posts.php index 89be790..9ad8db6 100644 --- a/src/Http/Livewire/Posts.php +++ b/src/Http/Livewire/Posts.php @@ -14,7 +14,7 @@ public function render() ->with([ 'posts' => Post::NotSticky()->orderBy('published_at', 'desc')->get(), 'pages' => Post::page()->orderBy('published_at', 'desc')->whereNull('parent_id')->get(), - 'tags' => Tag::withCount('posts')->where('type', 'category')->get(), + 'tags' => Tag::withCount('postsPublished')->where('type', 'category')->get(),// $this->tag->postsPublished 'stickies' => Post::sticky()->get(), 'recent' => Post::posts()->take(5)->get(), ])