12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- <?php
- namespace App\Http\Controllers\frontend;
- use App\Http\Controllers\Controller;
- use App\Models\Produit;
- use App\Models\Categorie;
- use App\Models\Promotion;
- use App\Models\Contact;
- use Illuminate\Http\Request;
- class PromotionController extends Controller
- {
- public function Index($categorieId = null){
-
- $promotions = Promotion::where('etat','1') ->paginate(6);
- $produits = Categorie::where('etat','1')->get();
- $categories = Categorie::where('etat','1')->get();
- $contacts = Contact::where('etat','1')->get();
-
- return view('frontend.promotion.promo',compact('promotions','categories','contacts','produits'));
- }
- public function show ($id){
-
- $promotion = Promotion::find($id);
- $categories = Categorie::where('etat','1')->get();
-
- $contacts = Contact::where('etat','1')->get();
-
- return view('frontend.promotion.details',compact('contacts','promotion','categories'));
- }
- }
|