mercredi 23 janvier 2019

How to redirect one category to sub category?

This is FrontController

public function index(){
    $categories = DB::table('categories')
        ->select('category')
        ->groupBy('category')
        ->get();
    return view('front', compact('categories'));
}

This is blade layout

@foreach($categories as $category)
<a href=""><h2 class="card-title"></br></h2></a>
@endforeach

Categories-table structure and data

This is my front page

My question is when i click any category redirect to related to subcategory...How can i do that??



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire