Udemy
    •  
    •  
    •  
    •  
    •  
    •  
    •  
    •  
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
Laravel Category Management With Infinite Sub Categories
Rating: 4.4 out of 5(3 ratings)
34 students

Laravel Category Management With Infinite Sub Categories

Learn a powerful category management system that you can use in your Laravel web application , E-commerce and Blogs
Created byNamu Makwembo
Last updated 8/2022
English

What you'll learn

  • You will learn how to add and delete Categories
  • You will learn to Assign Categories to your posts
  • You will learn to add your posts to a Tag
  • you will learn how to query posts based on Categories and Tags

Course content

6 sections30 lectures2h 36m total length
  • Install Laravel application1:42

    <div>

       {{--Frequently used Layout--}}

       {{--You can copy this when you create a new Livewire component--}}


        <x-slot name="header">

            <h2 class="font-semibold text-xl text-gray-800 leading-tight">

                {{ __('Enter_Title_here') }}

            </h2>

        </x-slot>



        <div class="py-12">

            <div class="max-w-7xl mx-auto sm:px-6 lg:px-8">

                <div class="bg-white overflow-hidden shadow-sm sm:rounded-lg">         

                    <div class="p-6 bg-white border-b border-gray-200">

                     {{--Code in here --}}

                   </div>

                </div>

            </div>

        </div>

    </div>


  • Setup Breeze & Livewire3:14
  • Database structure & migrations7:13

    Commands Used

    php artisan make:model Category -m

    php artisan make:model Post -m

    php artisan make:model Tag -m

    php artisan make:model PostTag -m


  • Model relationships7:11

    You can download and copy these model relationships

  • Install Bootstrap icons and Daisy UI2:57

    Commands Used:


    npm i bootstrap-icons

    npm i daisyui




    Links :

    Bootstrap icons

    https://icons.getbootstrap.com/

    Daisy ui

    https://daisyui.com/docs/use/


Requirements

  • Students are required to have knowledge of Laravel , Livewire , Tailwind css

Description

Every website that uploads any sort of content dynamically will need a category management system , in this course I show you the right way to manage categories and tags  for your Laravel website be it a `blog , E-commerce


I will also show you how you can query posts based on categories and tags and also how to remove and add posts from categories . All the files are available for download in the resources


Because this is an important part of every website , we are going to dive deep into managing parent categories , Sub categories including all it's children so that you can manage website queries efficiently


We are also going to create 4  separate pages in this course


# 1.Category Management Page

  in this page we are going to :


  1. To create a form where we can submit our new categories

  2. Create a section where we ca view and see our created categories

  3. Create a tree view for our categories

  4. Be able to assign children to parent categories -unlimited children

  5. Be able to delete categories and provide feedback to our user .......  etc


2.Tag Management Page

we are going to:


  1. Create new tags, submit and save to database

  2. Have a section where we can see our available tags

  3. Choose whether a tag is an app dependency or not ?

  4. Delete our tags, if it is deletable  provide feedback to the front end


# 3.Create Post Page

In the create post page , we are going to:


  1. Assign a new post to a category

  2. Show all the parent of the selected category in a nice tree view : 'parent >child >child1 >selectedChild'

  3. be able to assign a tag to our new post (optional )

  4. add a title to our new post   

  5. add an image to our new post

  6. submit  and save out new post to our database


# 4.Home page

In the home we will:


  1. Create a layout and show all our posts on our landing page

  2. Create a section which list all available categories in our database , so that when we click on a category we will be able to display all posts related to that category

  3. Have a section which show all posts related to a particular tag


# 5. Search Page

In the search page  we are going to:


  1. receive a category ID

  2. Get all posts related to that category ID

  3. Check if the received category has any children Category

  4. If it has children , then get all children of the Category  and also get all posts related to those child categories

  5. Create a collection where we can combine the results of two queries

  6. Display the results be creating a foreach function in our blade


Who this course is for:

  • Laravel developers who plan to add dynamic content to the website, blog or e commerce