LogicielController.php 892 B

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. namespace App\Http\Controllers\frontend;
  3. use App\Http\Controllers\Controller;
  4. use App\Models\Categorie;
  5. use App\Models\Contact;
  6. use App\Models\Logiciel;
  7. use Illuminate\Support\Facades\Storage;
  8. use Illuminate\Http\Request;
  9. class LogicielController extends Controller
  10. {
  11. public function Index(){
  12. $logiciels = Logiciel::where('etat','1')->get();
  13. $categories = Categorie::where('etat','1')->get();
  14. $contacts = Contact::where('etat','1')->get();
  15. return view('frontend.logiciel.index',compact('logiciels','categories','contacts'));
  16. }
  17. public function show ($id){
  18. $logiciel = Logiciel::find($id);
  19. $contacts = Contact::where('etat','1')->get();
  20. $categories = Categorie::where('etat','1')->get();
  21. return view('frontend.logiciel.show',compact('logiciel','contacts','categories'));
  22. }
  23. }