HomeController.php 858 B

1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. namespace App\Http\Controllers\frontend;
  3. use App\Http\Controllers\Controller;
  4. use Illuminate\Http\Request;
  5. use App\Models\Presentation;
  6. use App\Models\Slide;
  7. use App\Models\Categorie;
  8. use App\Models\Produit;
  9. use App\Models\Promotion;
  10. use App\Models\Contact;
  11. class HomeController extends Controller
  12. {
  13. public function Index(){
  14. $presentations = Presentation::where('etat','1')->get();
  15. $slides = slide::where('etat','1')->get();
  16. $categories = Categorie::where('etat','1')->get();
  17. $produits = Produit::where('home','1')->get();
  18. $promotions = Promotion::where('etat','1')->get();
  19. $contacts = Contact::where('etat','1')->get();
  20. return view('frontend.home',compact('presentations','slides','categories','produits','promotions','contacts'));
  21. }
  22. }