From 7d15aa76da73f07cdf3ef2f6763700cf25a2a538 Mon Sep 17 00:00:00 2001 From: George John Date: Wed, 22 Sep 2021 18:16:39 +0400 Subject: [PATCH] Update frontend views. --- config/config.php | 129 +++---- .../2021_08_23_100001_create_blogs_table.php | 6 +- database/seeds/BlogTableSeeder.php | 342 +++++++++--------- resources/views/public/blog/filter.blade.php | 26 -- resources/views/public/blog/index.blade.php | 69 ++-- .../views/public/blog/partial/aside.blade.php | 21 +- resources/views/public/blog/show.blade.php | 10 +- routes/api.php | 26 +- routes/web.php | 29 +- src/Blog.php | 31 +- src/Forms/Blog.php | 12 +- src/Http/Controllers/BlogPublicController.php | 62 ++-- .../Controllers/BlogResourceController.php | 1 - .../Controllers/CategoryPublicController.php | 75 ---- src/Http/Controllers/TagPublicController.php | 75 ---- src/Models/Blog.php | 2 +- src/Repositories/Eloquent/BlogRepository.php | 17 +- .../Eloquent/CategoryRepository.php | 15 +- .../Eloquent/Filters/BlogPublicFilter.php | 40 +- .../Eloquent/Presenters/BlogItemPresenter.php | 11 +- .../Eloquent/Presenters/BlogListPresenter.php | 19 +- .../Presenters/CategoryListPresenter.php | 5 +- src/Repositories/Eloquent/TagRepository.php | 7 +- 23 files changed, 413 insertions(+), 617 deletions(-) delete mode 100644 resources/views/public/blog/filter.blade.php delete mode 100644 src/Http/Controllers/CategoryPublicController.php delete mode 100644 src/Http/Controllers/TagPublicController.php diff --git a/config/config.php b/config/config.php index 6a3df7d..ff7aa6b 100644 --- a/config/config.php +++ b/config/config.php @@ -5,59 +5,62 @@ /** * Provider. */ - 'provider' => 'litecms', + 'provider' => 'litecms', /* * Package. */ - 'package' => 'blog', + 'package' => 'blog', /* * Modules. */ - 'modules' => ['blog', 'category', 'tag'], + 'modules' => ['blog', 'category', 'tag'], - 'blog' => [ + 'blog' => [ 'model' => [ 'model' => \Litecms\Blog\Models\Blog::class, 'repository' => \Litecms\Blog\Repositories\Eloquent\BlogRepository::class, 'table' => 'blogs', - 'hidden'=> [], + 'hidden' => [], 'visible' => [], 'guarded' => ['*'], - 'slugs' => ['slug' => 'name'], + 'slugs' => ['slug' => 'title'], 'dates' => ['deleted_at', 'createdat', 'updated_at'], 'appends' => [], - 'fillable' => ['id', 'category_id', 'title', 'description', 'images', 'tags', 'viewcount', 'slug', 'published', 'published_at', 'user_id', 'user_type', 'created_at', 'updated_at', 'deleted_at'], + 'fillable' => [ + 'id', 'category_id', 'title', 'description', 'images', 'tags', 'viewcount', + 'slug', 'status', 'user_id', 'user_type', 'created_at', 'updated_at', 'deleted_at', + ], 'translatables' => [], 'upload_folder' => 'blog/blog', 'uploads' => [ - /* - 'file' => [ - 'count' => 1, - 'type' => 'file', - ], - */ - 'images' => [ + /* + 'file' => [ 'count' => 1, - 'type' => 'image', - ], + 'type' => 'file', + ], + */ + 'images' => [ + 'count' => 1, + 'type' => 'image', + ], ], 'casts' => [ - /* - + /* + 'file' => 'array', - */ - 'images' => 'array', + */ + 'images' => 'array', ], 'revision' => [], 'perPage' => '20', - 'search' => [ - 'name' => 'like', + 'search' => [ + 'name' => 'like', 'status', - ] + ], ], 'controller' => [ @@ -66,46 +69,46 @@ 'module' => 'Blog', ], ], - 'category' => [ + 'category' => [ 'model' => [ 'model' => \Litecms\Blog\Models\Category::class, 'repository' => \Litecms\Blog\Repositories\Eloquent\CategoryRepository::class, 'table' => 'blog_categories', - 'hidden'=> [], + 'hidden' => [], 'visible' => [], 'guarded' => ['*'], 'slugs' => ['slug' => 'name'], 'dates' => ['deleted_at', 'createdat', 'updated_at'], 'appends' => [], - 'fillable' => ['id', 'name', 'slug', 'status', 'user_id', 'user_type', 'created_at', 'updated_at', 'deleted_at'], + 'fillable' => ['id', 'name', 'slug', 'status', 'user_id', 'user_type', 'created_at', 'updated_at', 'deleted_at'], 'translatables' => [], 'upload_folder' => 'blog/category', 'uploads' => [ - /* - 'images' => [ - 'count' => 10, - 'type' => 'image', - ], - 'file' => [ - 'count' => 1, - 'type' => 'file', - ], - */ + /* + 'images' => [ + 'count' => 10, + 'type' => 'image', + ], + 'file' => [ + 'count' => 1, + 'type' => 'file', + ], + */ ], 'casts' => [ - /* - 'images' => 'array', - 'file' => 'array', - */ + /* + 'images' => 'array', + 'file' => 'array', + */ ], 'revision' => [], 'perPage' => '20', - 'search' => [ - 'name' => 'like', + 'search' => [ + 'name' => 'like', 'status', - ] + ], ], 'controller' => [ @@ -114,46 +117,46 @@ 'module' => 'Category', ], ], - 'tag' => [ + 'tag' => [ 'model' => [ 'model' => \Litecms\Blog\Models\Tag::class, 'repository' => \Litecms\Blog\Repositories\Eloquent\TagRepository::class, 'table' => 'blog_tags', - 'hidden'=> [], + 'hidden' => [], 'visible' => [], 'guarded' => ['*'], 'slugs' => ['slug' => 'name'], 'dates' => ['deleted_at', 'createdat', 'updated_at'], 'appends' => [], - 'fillable' => ['id', 'name', 'slug', 'status', 'user_id', 'user_type', 'created_at', 'updated_at', 'deleted_at'], + 'fillable' => ['id', 'name', 'slug', 'status', 'user_id', 'user_type', 'created_at', 'updated_at', 'deleted_at'], 'translatables' => [], 'upload_folder' => 'blog/tag', 'uploads' => [ - /* - 'images' => [ - 'count' => 10, - 'type' => 'image', - ], - 'file' => [ - 'count' => 1, - 'type' => 'file', - ], - */ + /* + 'images' => [ + 'count' => 10, + 'type' => 'image', + ], + 'file' => [ + 'count' => 1, + 'type' => 'file', + ], + */ ], 'casts' => [ - /* - 'images' => 'array', - 'file' => 'array', - */ + /* + 'images' => 'array', + 'file' => 'array', + */ ], 'revision' => [], 'perPage' => '20', - 'search' => [ - 'name' => 'like', + 'search' => [ + 'name' => 'like', 'status', - ] + ], ], 'controller' => [ diff --git a/database/migrations/2021_08_23_100001_create_blogs_table.php b/database/migrations/2021_08_23_100001_create_blogs_table.php index 9d5a59c..1ffef98 100644 --- a/database/migrations/2021_08_23_100001_create_blogs_table.php +++ b/database/migrations/2021_08_23_100001_create_blogs_table.php @@ -21,13 +21,13 @@ public function up() $table->increments('id'); $table->integer('category_id')->nullable(); $table->string('title', 255)->nullable(); + $table->text('summary')->nullable(); $table->text('description')->nullable(); $table->text('images')->nullable(); - $table->text('tags')->nullable(); + $table->string('tags', 225)->nullable(); $table->integer('viewcount')->nullable(); $table->string('slug', 255)->nullable(); - $table->enum('published', ['yes', 'no'])->nullable(); - $table->text('published_at')->nullable(); + $table->enum('status', ['draft', 'completed', 'approved', 'published'])->nullable(); $table->integer('user_id')->nullable(); $table->string('user_type', 255)->nullable(); $table->softDeletes(); diff --git a/database/seeds/BlogTableSeeder.php b/database/seeds/BlogTableSeeder.php index df3726a..ee3dbf6 100644 --- a/database/seeds/BlogTableSeeder.php +++ b/database/seeds/BlogTableSeeder.php @@ -11,250 +11,230 @@ public function run() { DB::table('blogs')->insert([ [ - 'id' => 1, - 'category_id' => 1, - 'title' => 'Design is thinking made visual', - 'description' => '

Lorem Ipsum is simply dummy text of the printing and typesetting industry. + 'id' => 1, + 'category_id' => 1, + 'title' => 'Design is thinking made visual', + 'description' => '

Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industrys standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.

Microsoft Patch Management For Home Users

Last month, my wife, Anne Doe, took me to Las Vegas because she had to go for a business convention. Needless to say, she writes for an guide to casinos and I hate gambling. But then, she likes it and this supports us too, so I went along without any hassle. At first I was depressed, but then as I asked around and looked around, I ended up having more fun in Las Vegas than I would have thought. And no. I did not enter a single casino while I was there.

Entertainment

One of the greatest things about Las Vegas, Reno and Atlantic City (but especially Las Vegas) is the number of shows that are available. You can get to watch top class comedians like Jay Leno, Jerry Seinfeld, Ray Romano, Tim Allen and even the likes of Bill Cosby and Chris Rock. If you are into music you can watch female singers like Celine Dion, Mariah Carey, Britney Spears, Christina Aguilera and Beyonc?, male performers like Phil Collins, Eric Clapton, Snoopy Dog and bands like Oasis and Bon Jovi. I could go on and on but the list is endless. If you are into magic you can watch magicians like David Copperfield do their thing meters from you. Whatever you like, you can find it here from Western music to oldies to Jazz, Rock, Heavy Mettle to Trance. All you have to do is look at the itenary offered during your visit

', - 'images' => '[{"title":"Blog img37","caption":"Blog img37","url":"Blog img37","desc":null,"folder":"2021\/08\/13\/121214839\/images","time":"2021-08-13 12:17:20","path":"blog\/blog\/2021\/08\/13\/121214839\/images\/blog-img37.jpeg","file":"blog-img37.jpeg"}]', - 'tags' => NULL, - 'viewcount' => NULL, - 'slug' => 'Design is thinking made visual', - 'published' => 'yes', - 'published_at' => '2021-07-17', - 'user_id' => 1, - 'user_type' => 'App\Models\User', - ], - [ - 'id' => 2, - 'category_id' => 1, - 'title' => 'Design is thinking made visual-1', - 'description' => '

Lorem Ipsum is simply dummy text of the printing and typesetting industry. + 'images' => '[{"title":"Blog img37","caption":"Blog img37","url":"Blog img37","desc":null,"folder":"2021\/08\/13\/121214839\/images","time":"2021-08-13 12:17:20","path":"blog\/blog\/2021\/08\/13\/121214839\/images\/blog-img37.jpeg","file":"blog-img37.jpeg"}]', + 'tags' => null, + 'viewcount' => null, + 'slug' => 'design-is-thinking-made-visual', + 'status' => 'published', + 'user_id' => 1, + 'user_type' => 'App\Models\User', + ], + [ + 'id' => 2, + 'category_id' => 1, + 'title' => 'Design is thinking made visual-1', + 'description' => '

Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industrys standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.

Microsoft Patch Management For Home Users

Last month, my wife, Anne Doe, took me to Las Vegas because she had to go for a business convention. Needless to say, she writes for an guide to casinos and I hate gambling. But then, she likes it and this supports us too, so I went along without any hassle. At first I was depressed, but then as I asked around and looked around, I ended up having more fun in Las Vegas than I would have thought. And no. I did not enter a single casino while I was there.

Entertainment

One of the greatest things about Las Vegas, Reno and Atlantic City (but especially Las Vegas) is the number of shows that are available. You can get to watch top class comedians like Jay Leno, Jerry Seinfeld, Ray Romano, Tim Allen and even the likes of Bill Cosby and Chris Rock. If you are into music you can watch female singers like Celine Dion, Mariah Carey, Britney Spears, Christina Aguilera and Beyonc?, male performers like Phil Collins, Eric Clapton, Snoopy Dog and bands like Oasis and Bon Jovi. I could go on and on but the list is endless. If you are into magic you can watch magicians like David Copperfield do their thing meters from you. Whatever you like, you can find it here from Western music to oldies to Jazz, Rock, Heavy Mettle to Trance. All you have to do is look at the itenary offered during your visit

', - 'images' => '[{"title":"Blog img38","caption":"Blog img38","url":"Blog img38","desc":null,"folder":"2021\/08\/13\/121945933\/images","time":"2021-08-13 12:20:19","path":"blog\/blog\/2021\/08\/13\/121945933\/images\/blog-img38.jpeg","file":"blog-img38.jpeg"}]', - 'tags' => NULL, - 'viewcount' => NULL, - 'slug' => 'Design is thinking made visual-1', - 'published' => 'yes', - 'published_at' => '2021-07-17', - 'user_id' => 1, - 'user_type' => 'App\Models\User', - ], - [ - 'id' => 3, - 'category_id' => 4, - 'title' => 'Design is thinking made visual-2', - 'description' => '

Lorem Ipsum is simply dummy text of the printing and typesetting industry. + 'images' => '[{"title":"Blog img38","caption":"Blog img38","url":"Blog img38","desc":null,"folder":"2021\/08\/13\/121945933\/images","time":"2021-08-13 12:20:19","path":"blog\/blog\/2021\/08\/13\/121945933\/images\/blog-img38.jpeg","file":"blog-img38.jpeg"}]', + 'tags' => null, + 'viewcount' => null, + 'slug' => 'design-is-thinking-made-visual-one', + 'status' => 'published', + 'user_id' => 1, + 'user_type' => 'App\Models\User', + ], + [ + 'id' => 3, + 'category_id' => 4, + 'title' => 'Design is thinking made visual-2', + 'description' => '

Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industrys standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.

Microsoft Patch Management For Home Users

Last month, my wife, Anne Doe, took me to Las Vegas because she had to go for a business convention. Needless to say, she writes for an guide to casinos and I hate gambling. But then, she likes it and this supports us too, so I went along without any hassle. At first I was depressed, but then as I asked around and looked around, I ended up having more fun in Las Vegas than I would have thought. And no. I did not enter a single casino while I was there.

Entertainment

One of the greatest things about Las Vegas, Reno and Atlantic City (but especially Las Vegas) is the number of shows that are available. You can get to watch top class comedians like Jay Leno, Jerry Seinfeld, Ray Romano, Tim Allen and even the likes of Bill Cosby and Chris Rock. If you are into music you can watch female singers like Celine Dion, Mariah Carey, Britney Spears, Christina Aguilera and Beyonc?, male performers like Phil Collins, Eric Clapton, Snoopy Dog and bands like Oasis and Bon Jovi. I could go on and on but the list is endless. If you are into magic you can watch magicians like David Copperfield do their thing meters from you. Whatever you like, you can find it here from Western music to oldies to Jazz, Rock, Heavy Mettle to Trance. All you have to do is look at the itenary offered during your visit

', - 'images' => '[{"title":"Blog img39","caption":"Blog img39","url":"Blog img39","desc":null,"folder":"2021\/08\/16\/132431165\/images","time":"2021-08-16 13:24:39","path":"blog\/blog\/2021\/08\/16\/132431165\/images\/blog-img39.jpeg","file":"blog-img39.jpeg"}]', - 'tags' => NULL, - 'viewcount' => NULL, - 'slug' => 'Design is thinking made visual-2', - 'published' => 'yes', - 'published_at' => '2021-07-17', - 'user_id' => 1, - 'user_type' => 'App\Models\User', + 'images' => '[{"title":"Blog img39","caption":"Blog img39","url":"Blog img39","desc":null,"folder":"2021\/08\/16\/132431165\/images","time":"2021-08-16 13:24:39","path":"blog\/blog\/2021\/08\/16\/132431165\/images\/blog-img39.jpeg","file":"blog-img39.jpeg"}]', + 'tags' => null, + 'viewcount' => null, + 'slug' => 'design-is-thinking-made-visual-two', + 'status' => 'published', + 'user_id' => 1, + 'user_type' => 'App\Models\User', ], - + ]); DB::table('blog_categories')->insert([ [ - 'id' => 1, - 'name' => 'Arts and Entertainment', - 'slug' => NULL, - 'status' => 'show', - 'user_id' => 1, - 'user_type' => 'App\Models\User', + 'id' => 1, + 'name' => 'Arts and Entertainment', + 'slug' => 'arts-and-entertainment', + 'status' => 'show', + 'user_id' => 1, + 'user_type' => 'App\Models\User', ], [ - 'id' => 2, - 'name' => 'Branding', - 'slug' => NULL, - 'status' => 'show', - 'user_id' => 1, - 'user_type' => 'App\Models\User', + 'id' => 2, + 'name' => 'Branding', + 'slug' => 'branding', + 'status' => 'show', + 'user_id' => 1, + 'user_type' => 'App\Models\User', ], [ - 'id' => 3, - 'name' => 'Design Tutorials', - 'slug' => NULL, - 'status' => 'show', - 'user_id' => 1, - 'user_type' => 'App\Models\User', + 'id' => 3, + 'name' => 'Design Tutorials', + 'slug' => 'design-tutorials', + 'status' => 'show', + 'user_id' => 1, + 'user_type' => 'App\Models\User', ], [ - 'id' => 4, - 'name' => 'Designing', - 'slug' => NULL, - 'status' => 'show', - 'user_id' => 1, - 'user_type' => 'App\Models\User', + 'id' => 4, + 'name' => 'Designing', + 'slug' => 'designing', + 'status' => 'show', + 'user_id' => 1, + 'user_type' => 'App\Models\User', ], [ - 'id' => 5, - 'name' => 'Feature', - 'slug' => NULL, - 'status' => 'show', - 'user_id' => 1, - 'user_type' => 'App\Models\User', + 'id' => 5, + 'name' => 'Feature', + 'slug' => 'feature', + 'status' => 'show', + 'user_id' => 1, + 'user_type' => 'App\Models\User', ], ]); - + DB::table('blog_tags')->insert([ [ - 'id' => 1, - 'name' => 'Advertisements', - 'slug' => NULL, - 'status' => 'show', - 'user_id' => 1, - 'user_type' => 'App\Models\User', - ], - [ - 'id' => 2, - 'name' => 'Artistry', - 'slug' => NULL, - 'status' => 'show', - 'user_id' => 1, - 'user_type' => 'App\Models\User', + 'id' => 1, + 'name' => 'Advertisements', + 'slug' => 'advertisements', + 'status' => 'show', + 'user_id' => 1, + 'user_type' => 'App\Models\User', ], [ - 'id' => 3, - 'name' => 'Blog', - 'slug' => NULL, - 'status' => 'show', - 'user_id' => 1, - 'user_type' => 'App\Models\User', + 'id' => 2, + 'name' => 'Artistry', + 'slug' => 'artistry', + 'status' => 'show', + 'user_id' => 1, + 'user_type' => 'App\Models\User', ], [ - 'id' => 4, - 'name' => 'Conceptual', - 'slug' => NULL, - 'status' => 'show', - 'user_id' => 1, - 'user_type' => 'App\Models\User', + 'id' => 3, + 'name' => 'Blog', + 'slug' => 'blog', + 'status' => 'show', + 'user_id' => 1, + 'user_type' => 'App\Models\User', ], [ - 'id' => 5, - 'name' => 'Design', - 'slug' => NULL, - 'status' => 'show', - 'user_id' => 1, - 'user_type' => 'App\Models\User', + 'id' => 4, + 'name' => 'Conceptual', + 'slug' => 'conceptual', + 'status' => 'show', + 'user_id' => 1, + 'user_type' => 'App\Models\User', ], [ - 'id' => 6, - 'name' => 'Fashion', - 'slug' => NULL, - 'status' => 'show', - 'user_id' => 1, - 'user_type' => 'App\Models\User', + 'id' => 5, + 'name' => 'Design', + 'slug' => 'design', + 'status' => 'show', + 'user_id' => 1, + 'user_type' => 'App\Models\User', ], [ - 'id' => 7, - 'name' => 'Inscription', - 'slug' => NULL, - 'status' => 'show', - 'user_id' => 1, - 'user_type' => 'App\Models\User', + 'id' => 6, + 'name' => 'Fashion', + 'slug' => 'fashion', + 'status' => 'show', + 'user_id' => 1, + 'user_type' => 'App\Models\User', ], [ - 'id' => 8, - 'name' => 'Smart', - 'slug' => NULL, - 'status' => 'show', - 'user_id' => 1, - 'user_type' => 'App\Models\User', + 'id' => 7, + 'name' => 'Inscription', + 'slug' => 'inscription', + 'status' => 'show', + 'user_id' => 1, + 'user_type' => 'App\Models\User', ], [ - 'id' => 9, - 'name' => 'Quotes', - 'slug' => NULL, - 'status' => 'show', - 'user_id' => 1, - 'user_type' => 'App\Models\User', + 'id' => 8, + 'name' => 'Unique', + 'slug' => 'unique', + 'status' => 'show', + 'user_id' => 1, + 'user_type' => 'App\Models\User', ], [ - 'id' => 10, - 'name' => 'Unique', - 'slug' => NULL, - 'status' => 'show', - 'user_id' => 1, - 'user_type' => 'App\Models\User', - ], - [ - 'id' => 11, - 'name' => 'Concepts', - 'slug' => NULL, - 'status' => 'show', - 'user_id' => 1, - 'user_type' => 'App\Models\User', + 'id' => 9, + 'name' => 'Concepts', + 'slug' => 'concepts', + 'status' => 'show', + 'user_id' => 1, + 'user_type' => 'App\Models\User', ], ]); DB::table('permissions')->insert([ [ - 'slug' => 'blog.blog.view', - 'name' => 'View Blog', + 'slug' => 'blog.blog.view', + 'name' => 'View Blog', ], [ - 'slug' => 'blog.blog.create', - 'name' => 'Create Blog', + 'slug' => 'blog.blog.create', + 'name' => 'Create Blog', ], [ - 'slug' => 'blog.blog.edit', - 'name' => 'Update Blog', + 'slug' => 'blog.blog.edit', + 'name' => 'Update Blog', ], [ - 'slug' => 'blog.blog.delete', - 'name' => 'Delete Blog', + 'slug' => 'blog.blog.delete', + 'name' => 'Delete Blog', ], - - + ]); DB::table('menus')->insert([ [ - 'parent_id' => 1, - 'key' => null, - 'url' => 'admin/blog/blog', - 'name' => 'Blog', + 'parent_id' => 1, + 'key' => null, + 'url' => 'admin/blog/blog', + 'name' => 'Blog', 'description' => null, - 'icon' => 'las la-book-open', - 'target' => null, - 'order' => 190, - 'status' => 1, + 'icon' => 'las la-book-open', + 'target' => null, + 'order' => 190, + 'status' => 1, ], [ - 'parent_id' => 4, - 'key' => null, - 'url' => 'blog', - 'name' => 'Blog', + 'parent_id' => 4, + 'key' => null, + 'url' => 'blog', + 'name' => 'Blogs', 'description' => null, - 'icon' => null, - 'target' => null, - 'order' => 190, - 'status' => 1, + 'icon' => null, + 'target' => null, + 'order' => 190, + 'status' => 1, ], ]); DB::table('settings')->insert([ // Uncomment and edit this section for entering value to settings table. - /* - [ - 'pacakge' => 'Blog', - 'module' => 'Blog', - 'user_type' => null, - 'user_id' => null, - 'key' => 'blog.blog.key', - 'name' => 'Some name', - 'value' => 'Some value', - 'type' => 'Default', - 'control' => 'text', - ], - */ + + // [ + // 'pacakge' => 'Blog', + // 'module' => 'Blog', + // 'user_type' => null, + // 'user_id' => null, + // 'key' => 'blog.blog.key', + // 'name' => 'Some name', + // 'value' => 'Some value', + // 'type' => 'Default', + // 'control' => 'text', + // ], + ]); } } diff --git a/resources/views/public/blog/filter.blade.php b/resources/views/public/blog/filter.blade.php deleted file mode 100644 index 5f569bc..0000000 --- a/resources/views/public/blog/filter.blade.php +++ /dev/null @@ -1,26 +0,0 @@ -@forelse($data as $blog) -
- -
-
-

{{@$blog['title']}}

-
- By {{@$blog->users->name}} - {{date('M d,Y', strtotime(@$blog['published_at']))}} - {{@$blog->category->name}} -
-

{!! str_limit(@$blog['description'],300 )!!}

-
- Continue Reading -
-
-@empty -@endif \ No newline at end of file diff --git a/resources/views/public/blog/index.blade.php b/resources/views/public/blog/index.blade.php index 5b8f40c..c89e252 100644 --- a/resources/views/public/blog/index.blade.php +++ b/resources/views/public/blog/index.blade.php @@ -1,44 +1,51 @@ -@include('blog::public.blog.partial.header') +
+
+
+
+ +
+
+
+
- @include('blog::public.blog.partial.aside',['categories' => $categories,'tags' => $tags,'blogs' => $blogs]) + @include('blog::public.blog.partial.aside')
- \ No newline at end of file diff --git a/resources/views/public/blog/partial/aside.blade.php b/resources/views/public/blog/partial/aside.blade.php index 8ba1942..2f9ffb0 100644 --- a/resources/views/public/blog/partial/aside.blade.php +++ b/resources/views/public/blog/partial/aside.blade.php @@ -1,3 +1,4 @@ +
@@ -11,26 +12,26 @@

Categories

Recently Added

    - @foreach($blogs as $recentblog) + @foreach($recent as $blg)
  • - @foreach($recentblog['images'] as $image) - - @endforeach + + +
    -
    {{@$recentblog['title']}}
    - {{date('M d,Y', strtotime(@$recentblog['published_at']))}} +
    {{@$blg['title']}}
    + {{date('M d,Y', strtotime(@$blg['published_at']))}}
  • @endforeach @@ -40,7 +41,7 @@ class="text-extra-dark-gray">{{@$recentblog['title']}}

    Tags Cloud

    @foreach($tags as $tag) - {{$tag['name']}} + {{$tag['name']}} @endforeach
diff --git a/resources/views/public/blog/show.blade.php b/resources/views/public/blog/show.blade.php index 3626b29..da67004 100644 --- a/resources/views/public/blog/show.blade.php +++ b/resources/views/public/blog/show.blade.php @@ -11,17 +11,19 @@
+
- @include('blog::public.blog.partial.aside',['categories' => $categories,'tags' => $tags]) + @include('blog::public.blog.partial.aside', compact('categories', 'tags')) +