Преглед на файлове

demande de devis et logiciel et video

Besma преди 1 година
родител
ревизия
370f934650
променени са 72 файла, в които са добавени 3890 реда и са изтрити 1503 реда
  1. 57 30
      app/Http/Controllers/backend/CategorieController.php
  2. 43 0
      app/Http/Controllers/backend/DemandeDevisController.php
  3. 94 52
      app/Http/Controllers/backend/PresentationController.php
  4. 303 267
      app/Http/Controllers/backend/ProduitController.php
  5. 125 52
      app/Http/Controllers/backend/PromotionController.php
  6. 23 0
      app/Http/Controllers/backend/ckEditorController.php
  7. 69 0
      app/Http/Controllers/frontend/DeviController.php
  8. 23 0
      app/Http/Controllers/frontend/ErrorController.php
  9. 8 6
      app/Http/Controllers/frontend/HomeController.php
  10. 6 2
      app/Http/Controllers/frontend/ProduitController.php
  11. 3 3
      app/Models/Categorie.php
  12. 11 0
      app/Models/Devi.php
  13. 13 9
      app/Models/Produit.php
  14. 1 1
      app/Models/Promotion.php
  15. 33 0
      config/app.php
  16. 34 0
      database/migrations/2023_06_14_123023_add_titre_seo_to_presentations_table.php
  17. 34 0
      database/migrations/2023_06_14_123217_add_resume_seo_to_presentations_table.php
  18. 34 0
      database/migrations/2023_06_14_123739_add_mot_cle_to_presentations_table.php
  19. 34 0
      database/migrations/2023_06_14_134946_add_mot_cle_to_categories_table.php
  20. 34 0
      database/migrations/2023_06_14_135014_add_titre_seo_to_categories_table.php
  21. 34 0
      database/migrations/2023_06_19_075907_add_titre_seo_to_produits_table.php
  22. 34 0
      database/migrations/2023_06_19_075938_add_mot_cle_to_produits_table.php
  23. 34 0
      database/migrations/2023_06_19_080008_add_resume_seo_to_produits_table.php
  24. 34 0
      database/migrations/2023_06_19_082603_add_resume_seo_to_promotions_table.php
  25. 34 0
      database/migrations/2023_06_19_082626_add_mot_cle_to_promotions_table.php
  26. 34 0
      database/migrations/2023_06_19_082644_add_titre_seo_to_promotions_table.php
  27. 38 0
      database/migrations/2023_08_08_125149_create_devis_table.php
  28. 7 7
      public/frontend/css/style.css
  29. BIN
      public/frontend/images/banner.jpg
  30. BIN
      public/frontend/images/garantie.png
  31. BIN
      public/frontend/images/guider.png
  32. BIN
      public/frontend/images/livraison.png
  33. BIN
      public/frontend/images/sav.png
  34. BIN
      public/media/images.jpg
  35. BIN
      public/media/logo_1680778562.png
  36. BIN
      public/media/logo_1680778688.png
  37. BIN
      public/media/logo_1680779061.png
  38. BIN
      public/media/logo_1680780242.png
  39. 98 63
      resources/views/backend/category/add.blade.php
  40. 149 118
      resources/views/backend/category/edit.blade.php
  41. 14 14
      resources/views/backend/category/index.blade.php
  42. 15 5
      resources/views/backend/category/show.blade.php
  43. 2 1
      resources/views/backend/contact/add.blade.php
  44. 101 0
      resources/views/backend/devis/index.blade.php
  45. 77 0
      resources/views/backend/devis/show.blade.php
  46. 317 22
      resources/views/backend/partials/scriptIndex.blade.php
  47. 59 34
      resources/views/backend/presentation/add.blade.php
  48. 43 11
      resources/views/backend/presentation/edit.blade.php
  49. 2 11
      resources/views/backend/presentation/extensions/details.blade.php
  50. 8 12
      resources/views/backend/presentation/extensions/videos.blade.php
  51. 26 5
      resources/views/backend/presentation/show.blade.php
  52. 161 124
      resources/views/backend/produit/add.blade.php
  53. 142 105
      resources/views/backend/produit/edit.blade.php
  54. 119 87
      resources/views/backend/produit/show.blade.php
  55. 115 86
      resources/views/backend/promotion/Pack.blade.php
  56. 125 107
      resources/views/backend/promotion/add.blade.php
  57. 117 89
      resources/views/backend/promotion/edit.blade.php
  58. 138 106
      resources/views/backend/promotion/editPack.blade.php
  59. 1 1
      resources/views/backend/promotion/show.blade.php
  60. 1 1
      resources/views/backend/slide/show.blade.php
  61. BIN
      resources/views/frontend.zip
  62. 23 5
      resources/views/frontend/about.blade.php
  63. 7 4
      resources/views/frontend/contact/contact.blade.php
  64. 115 0
      resources/views/frontend/devis/devis.blade.php
  65. 15 0
      resources/views/frontend/devis/email-devis.blade.php
  66. 41 8
      resources/views/frontend/home.blade.php
  67. 36 25
      resources/views/frontend/layouts/navBar.blade.php
  68. 14 9
      resources/views/frontend/produits/produit.blade.php
  69. 1 1
      resources/views/frontend/produits/search.blade.php
  70. 537 16
      resources/views/home.blade.php
  71. 25 3
      resources/views/layouts/idara/panel.blade.php
  72. 15 1
      routes/web.php

+ 57 - 30
app/Http/Controllers/backend/CategorieController.php

@@ -16,9 +16,9 @@ class CategorieController extends Controller
 {
     public function __construct(){
         return $this->middleware(['auth','verified']);
-  
+
     }
-    
+
     public function Index(){
         $articles = Categorie::paginate(5);
 
@@ -28,67 +28,94 @@ class CategorieController extends Controller
 
      public function create(){
         return view('backend.category.add');
-       } 
+       }
      public function store( Request $request){
-   
+
         request()->validate([
             'nom' => 'required',
             'image' => 'required',
        ]);
              $tmp_file = temporaryFile::where('folder',$request->image)->first();
 
-        
+
         if($tmp_file){
             Storage::copy('image/tmp/'.$tmp_file->folder.'/'.$tmp_file->file,'image/'.$tmp_file->folder.'/'.$tmp_file->file);
-               
-           Categorie::create( 
+
+                   if ($request->filled('titre_seo')) {
+           Categorie::create(
                [
                    'nom' => $request->nom,
                    'image' => $tmp_file->folder . '/' . $tmp_file->file,
+                   'mot_cle' =>  $request->mot_cle,
+
+
+                   'titre_seo' => $request->titre_seo,
+
+
                    ],
                );
+            }
+            else{
+
+                    Categorie::create(
+                        [
+                            'nom' => $request->nom,
+                            'image' => $tmp_file->folder . '/' . $tmp_file->file,
+                            'image' => $tmp_file->folder . '/' . $tmp_file->file,
+                            'mot_cle' =>  $request->mot_cle,
+
+                            'titre_seo' => $request->nom,
+
+
+                            ],
+                        );
+            }
                Storage::deleteDirectory('image/tmp/'.$tmp_file->folder);
                $tmp_file->delete();
-        
+
            return redirect()->route('categories');
-   
+
     }
 }
-    
+
     public function show($id){
         $article=Categorie::find($id);
 
         return view('backend.category.show',['article'=>$article]);
     }
 
-    
-    
+
+
     public function edit($id) {
         $article = Categorie::find($id);
         return view('backend.category.edit',['article'=>$article]);
 
     }
+
+
+
     public function update(Request $request, $id) {
-        request()->validate([
-            'nom' => 'required',
-            'image' => 'required',
-       ]);
+
         $article = Categorie::find($id);
         $article->nom = $request->input('nom');
+        $article->mot_cle = $request->input('mot_cle');
+        $article->titre_seo = $request->input('titre_seo');
+
+
 
         $tmp_file = temporaryFile::where('folder',$request->image)->first();
 
         if($tmp_file){
             Storage::copy('image/tmp/'.$tmp_file->folder.'/'.$tmp_file->file,'image/'.$tmp_file->folder.'/'.$tmp_file->file);
-               
+
             $article->update([
-           
+
                 "image" => $tmp_file->folder . '/' . $tmp_file->file
             ]);
             Storage::deleteDirectory('image/tmp/'.$tmp_file->folder);
                 $tmp_file->delete();
            }
-          
+
 
           $article->created_at = \Carbon\Carbon::now();
         $article->save();
@@ -102,7 +129,7 @@ class CategorieController extends Controller
 
         // Produit::whereCategoryId($id)->update(['category_id' => null]);
         $products = Categorie::find($id)->produits;
-        
+
         if($products->isNotEmpty()){
             return redirect ()->route('categories')
                     ->with('message', 'Produit existe dans cette categorie');
@@ -113,7 +140,7 @@ class CategorieController extends Controller
             return Redirect::to('/idara/categories')
                         ->with('message', 'Categorie supprimée');
         }
-        
+
         return back();
     }
 
@@ -123,33 +150,33 @@ class CategorieController extends Controller
         $article = Categorie::find($request->Id);
         $article->etat = $request->etat;
         $article->save();
-  
+
         return response()->json(['success'=>'Status change successfully.']);
     }
 
 
 
     public function fileUpload(Request $request){
-   
+
         if($request->hasfile('image')){
-         
+
          $image = $request->file('image');
          $file = $image->getClientOriginalName();
          $folder = uniqid('post', 'true');
          $image->storeAs('image/tmp/' . $folder,$file,'public');
-           
+
 
            TemporaryFile::create([
              'folder' => $folder,
-             'file'=> $file           
+             'file'=> $file
              ]);
-       return  $folder;   
-            
-           
+       return  $folder;
+
+
         }
      return '';
 
-         
+
 }
 
 public function deleteUpload(){

+ 43 - 0
app/Http/Controllers/backend/DemandeDevisController.php

@@ -0,0 +1,43 @@
+<?php
+
+
+namespace App\Http\Controllers\backend;
+use App\Http\Controllers\Controller;
+use App\Models\Devi;
+
+use Illuminate\Http\Request;
+
+
+
+class DemandeDevisController extends Controller
+{
+
+    public function __construct(){
+        return $this->middleware(['auth','verified']);
+
+    }
+
+    public function index(){
+        $devis = Devi::paginate(15);
+
+        return view("backend.devis.index",compact('devis'));
+
+    }
+    public function show($id){
+
+        $devis=Devi::find($id);
+
+        return view('backend.devis.show',compact('devis'));
+    }
+
+
+    public function delete($id)
+    {
+        Devi::find($id)->delete();
+
+        return back();
+    }
+
+
+
+}

+ 94 - 52
app/Http/Controllers/backend/PresentationController.php

@@ -6,7 +6,7 @@ use App\Http\Controllers\Controller;
 use Illuminate\Http\Request;
 use App\Models\Presentation;
 use App\Models\Media;
-
+use Response;
 use Illuminate\Support\Facades\Storage;
 use App\Http\Traits\EditorTrait;
 
@@ -17,20 +17,20 @@ class PresentationController extends Controller
 
     public function __construct(){
         return $this->middleware(['auth','verified']);
-  
+
     }
           public function changeStatus(Request $request)
         {
             $article = Presentation::find($request->Id);
             $article->etat = $request->etat;
             $article->save();
-      
+
             return response()->json(['success'=>'Status change successfully.']);
         }
 
         public function admin(){
-            
-    
+
+
             return view("backend.dash");
          }
      public function Index(){
@@ -50,16 +50,34 @@ class PresentationController extends Controller
      }
      public function store(Request $request, Presentation $article) {
 
-        
+
         request()->validate([
             'titre' => 'required',
             'texte' => 'required',
        ]);
-       
+
         $article = new Presentation();
         $article->titre = $request->input('titre');
         $article->texte = $request->input('texte');
-        
+        $article->mot_cle = $request->input('mot_cle');
+
+
+        if ($request->filled('titre_seo')) {
+            $article->titre_seo = $request->input('titre_seo');
+
+        }else{
+            $article->titre_seo = $request->input('titre');
+
+        }
+        if ($request->filled('resume_seo')) {
+            $article->resume_seo = $request->input('resume_seo');
+
+        }else{
+            $article->resume_seo = strip_tags( $request->input('texte'));
+
+        }
+
+
 
         $article->save();
            return redirect()->route('presentations');
@@ -71,12 +89,18 @@ class PresentationController extends Controller
         return view('backend.presentation.show',['article'=>$article]);
     }
 
-       
+
     public function edit($id) {
         $article = Presentation::find($id);
         return view('backend.presentation.edit',['article'=>$article]);
 
     }
+
+
+
+
+
+
     public function update(Request $request, $id) {
         request()->validate([
             'titre' => 'required',
@@ -87,6 +111,24 @@ class PresentationController extends Controller
 
         $article->texte = $request->input('texte');
         $article->details = $request->input('details');
+        $article->mot_cle = $request->input('mot_cle');
+
+
+        if ($request->filled('titre_seo')) {
+            $article->titre_seo = $request->input('titre_seo');
+
+        }else{
+            $article->titre_seo = $request->input('titre');
+
+        }
+        if ($request->filled('resume_seo')) {
+            $article->resume_seo = $request->input('resume_seo');
+
+        }else{
+            $article->resume_seo = strip_tags( $request->input('texte'));
+
+        }
+
 
           $article->created_at = \Carbon\Carbon::now();
         $article->save();
@@ -96,11 +138,11 @@ class PresentationController extends Controller
      public function editImage($id) {
         $article = Presentation::find($id);
         return view('backend.presentation.extensions.image',['article'=>$article]);
-    } 
+    }
 
     public function updateImage(Request $request, $id) {
 
-        
+
 
        $article = Presentation::find($id);
 
@@ -109,37 +151,37 @@ class PresentationController extends Controller
 
        request()->validate([
         'image' => 'required',
-       
+
      ]);
 
        if($tmp_file){
         Storage::copy('image/tmp/'.$tmp_file->folder.'/'.$tmp_file->file,'image/'.$tmp_file->folder.'/'.$tmp_file->file);
-           
+
         $article->update([
-           
+
             "image" => $tmp_file->folder . '/' . $tmp_file->file
         ]);
         Storage::deleteDirectory('image/tmp/'.$tmp_file->folder);
                 $tmp_file->delete();
        }
-     
+
        $article->save();
-      
+
         return back()->with('success', 'Image Ajouter');
 
     }
-    
+
         public function deleteImage(Request $request) {
 
             $article = Presentation::find($request->id);
             Storage::disk('public')->delete($article->image);
             Presentation::where('image', $article->image)->update(['image' => (new \App\Models\Presentation)->defaultImage()]);
             // unlink("storage/".$presentation->image);
-    
+
             // Presentation::select("image", $presentation->image)->delete();
-    
+
             return back()->with("success", "Image deleted successfully.");
-    
+
         }
 
         public function destroyP(Request $request, $id){
@@ -149,23 +191,23 @@ class PresentationController extends Controller
 
             return back();
         }
-        
+
         public function editDetails($id) {
             $article = Presentation::find($id);
             return view('backend.presentation.extensions.details',['article'=>$article]);
-        } 
+        }
+
 
-        
        public function updateDetails(Request $request, $id) {
 
         request()->validate([
             'details' => 'required',
        ]);
-       
+
         $article = Presentation::find($id);
         $article->details = $request->input('details');
-        
-        
+
+
         $article->save();
         return redirect ()->route('presentations')->with('success','Ajouté');
 
@@ -174,11 +216,11 @@ class PresentationController extends Controller
     public function editVideo($id) {
         $article = Presentation::find($id);
         return view('backend.presentation.extensions.videos',['article'=>$article]);
-    } 
+    }
       public function uploadVideo(Request $request, $id)
             {
             $this->validate($request, [
-               
+
                 'videos' => 'required|file|mimetypes:video/mp4',
             ]);
                      $article = Presentation::find($id);
@@ -189,7 +231,8 @@ class PresentationController extends Controller
                 $article->videos = $path;
             }
             $article->save();
-            
+            return redirect()->route('presentation.show',['id'=>$id]);
+
         }
 
         public function deleteVideo(Request $request) {
@@ -198,46 +241,46 @@ class PresentationController extends Controller
             Storage::disk('public')->delete($article->videos);
             Presentation::where('videos', $article->videos)->update(['videos' => (new \App\Models\Presentation)->defaultVideo()]);
             // unlink("storage/".$presentation->image);
-    
+
             // Presentation::select("image", $presentation->image)->delete();
-    
+
             return back()->with("success", "Video deleted successfully.");
-    
+
         }
         public function test(Request $request, $id){
 
             $presentation = Presentation::find($request->presentationId);
             $presentation->etat = $request->etat;
             $presentation->save();
-      
+
             return response()->json(['success'=>'Status change successfully.']);
         }
-    
+
         public function fileUpload(Request $request){
-   
+
             if($request->hasfile('image')){
-             
+
              $image = $request->file('image');
              $file = $image->getClientOriginalName();
              $folder = uniqid('post', 'true');
              $image->storeAs('image/tmp/' . $folder,$file,'public');
-               
-    
+
+
                TemporaryFile::create([
                  'folder' => $folder,
-                 'file'=> $file           
+                 'file'=> $file
                  ]);
-           return  $folder;   
-                
-               
+           return  $folder;
+
+
             }
-         return '';
-    
-             
+         return ;
+
+
     }
-    
+
     public function deleteUpload(){
-    
+
      $tmp_file = TemporaryFile::where('folder',request()->getContent())->first();
      if($tmp_file){
          Storage::deleteDirectory('image/tmp/'.$tmp_file->folder);
@@ -246,8 +289,7 @@ class PresentationController extends Controller
      }
     }
 }
- 
-   
-        
-         
- 
+
+
+
+

+ 303 - 267
app/Http/Controllers/backend/ProduitController.php

@@ -1,6 +1,7 @@
 <?php
 
 namespace App\Http\Controllers\backend;
+
 use App\Http\Controllers\Controller;
 use Illuminate\Http\Request;
 use App\Models\Produit;
@@ -18,375 +19,410 @@ use Illuminate\Support\Facades\Storage;
 
 class ProduitController extends Controller
 {
-    public function __construct(){
-        return $this->middleware(['auth','verified']);
-  
+    public function __construct()
+    {
+        return $this->middleware(['auth', 'verified']);
     }
 
-    public function Index(){
+    public function Index()
+    {
 
         $articles = Produit::paginate(5);
 
-        return view("backend.produit.index",compact('articles'));
-     }
+        return view("backend.produit.index", compact('articles'));
+    }
+
+    public function create()
+    {
 
-     public function create(){
-        
         $categories = Categorie::select('nom', 'id')->oldest('nom')->get();
-        
 
-        return view('backend.produit.add',compact('categories'));
 
-       } 
-     public function store( Request $request){
+        return view('backend.produit.add', compact('categories'));
+    }
+    public function store(Request $request)
+    {
         request()->validate([
             'nom' => 'required',
             'description' => 'required',
-           
+
             'description' => 'required',
-            'image'=> 'required'
-       ]);
-        $tmp_file = temporaryFile::where('folder',$request->image)->first();
-        
-       
-        if($tmp_file){
-            Storage::copy('image/tmp/'.$tmp_file->folder.'/'.$tmp_file->file,'image/'.$tmp_file->folder.'/'.$tmp_file->file);
-               
-         $article =  Produit::create( 
-               [
-                   'nom' => $request->nom,
-                //    'category_id' => $request->input('categorie'),
-                   'description' => $request->description,
-                   'image' => $tmp_file->folder . '/' . $tmp_file->file,
-                   ],
-               );
-
-               $article->categories()->sync((array)$request->input('categories'));
-
-               Storage::deleteDirectory('diapo/tmp/'.$tmp_file->folder);
-               $tmp_file->delete();
-        
-           }
-           
-    
-           return redirect()->route('produits');
-   
+            'image' => 'required'
+        ]);
+        $tmp_file = temporaryFile::where('folder', $request->image)->first();
+
+
+        if ($tmp_file) {
+            Storage::copy('image/tmp/' . $tmp_file->folder . '/' . $tmp_file->file, 'image/' . $tmp_file->folder . '/' . $tmp_file->file);
+
+            if ($request->filled('titre_seo')) {
+                $article =  Produit::create(
+                    [
+                        'nom' => $request->nom,
+                        //    'category_id' => $request->input('categorie'),
+                        'description' => $request->description,
+                        'titre_seo' => $request->titre_seo,
+                        'resume_seo' => $request->resume_seo,
+                        'mot_cle' => $request->mot_cle,
+
+                        'image' => $tmp_file->folder . '/' . $tmp_file->file,
+                    ],
+                );
+            }else{
+                $article =  Produit::create(
+                    [
+                        'nom' => $request->nom,
+                        //    'category_id' => $request->input('categorie'),
+                        'description' => $request->description,
+                        'titre_seo' => $request->nom,
+                        'resume_seo' => strip_tags( $request->description),
+                        'mot_cle' => $request->mot_cle,
+
+                        'image' => $tmp_file->folder . '/' . $tmp_file->file,
+                    ],
+                );
+            }
+            $article->categories()->sync((array)$request->input('categories'));
+
+            Storage::deleteDirectory('diapo/tmp/' . $tmp_file->folder);
+            $tmp_file->delete();
+        }
+        return redirect()->route('produits');
     }
 
-    
-    public function show($id){
-       
 
-        $article=Produit::find($id);
-        $diapos=Media::where('produit_id','=',$article->id)->get();
-       
+    public function show($id)
+    {
+
+
+        $article = Produit::find($id);
+        $diapos = Media::where('produit_id', '=', $article->id)->get();
+
         if ($article->document != null) {
-            
 
-            $size = Storage::size('document/'.$article->document); 
-            $file_size = $size * 0.0009765625; 
-            $sizeFile = number_format($file_size,0);
-            
-            $infoPath = pathinfo(public_path('document/'.$article->document));
+
+            $size = Storage::size('document/' . $article->document);
+            $file_size = $size * 0.0009765625;
+            $sizeFile = number_format($file_size, 0);
+
+            $infoPath = pathinfo(public_path('document/' . $article->document));
             $extension = $infoPath['extension'];
-            
-            return view('backend.produit.show',compact('article','diapos','extension','sizeFile'));
+
+            return view('backend.produit.show', compact('article', 'diapos', 'extension', 'sizeFile'));
         }
-        
-  
 
-        return view('backend.produit.show',compact('article','diapos'));
 
+
+        return view('backend.produit.show', compact('article', 'diapos'));
     }
 
-    
 
-    
-    public function edit($id) {
-      
+
+
+    public function edit($id)
+    {
+
         $article = Produit::find($id);
         $categories = Categorie::select('nom', 'id')->oldest('nom')->get();
-        
-     
-        return view('backend.produit.edit',['article'=>$article],compact('categories'));
 
+
+        return view('backend.produit.edit', ['article' => $article], compact('categories'));
     }
-    public function update(Request $request, $id) {
+    public function update(Request $request, $id)
+    {
         request()->validate([
             'nom' => 'required',
-             'description' => 'required',
-            'categories'=> 'required',
-            
+            'description' => 'required',
+            'categories' => 'required',
+
+
 
-        
-       ]);
+        ]);
         $article = Produit::find($id);
         $article->nom = $request->input('nom');
-     
+
 
         $article->description = $request->input('description');
+        if ($request->filled('titre_seo')) {
+            $article->titre_seo = $request->input('titre_seo');
+
+        }else{
+            $article->titre_seo = $request->input('titre');
+
+        }
+        if ($request->filled('resume_seo')) {
+            $article->resume_seo = $request->input('resume_seo');
+
+        }else{
+            $article->resume_seo = strip_tags( $request->input('description'));
+
+        }
+        $article->mot_cle = $request->input('mot_cle');
+
 
         $article->categories()->sync((array)$request->input('categories'));
 
 
-        $tmp_file = temporaryFile::where('folder',$request->image)->first();
+        $tmp_file = temporaryFile::where('folder', $request->image)->first();
+
+        if ($tmp_file) {
+            Storage::copy('image/tmp/' . $tmp_file->folder . '/' . $tmp_file->file, 'image/' . $tmp_file->folder . '/' . $tmp_file->file);
 
-        if($tmp_file){
-            Storage::copy('image/tmp/'.$tmp_file->folder.'/'.$tmp_file->file,'image/'.$tmp_file->folder.'/'.$tmp_file->file);
-               
             $article->update([
-           
+
                 "image" => $tmp_file->folder . '/' . $tmp_file->file
             ]);
-            Storage::deleteDirectory('diapo/tmp/'.$tmp_file->folder);
-                $tmp_file->delete();
-           }
-          $article->created_at = \Carbon\Carbon::now();
+            Storage::deleteDirectory('diapo/tmp/' . $tmp_file->folder);
+            $tmp_file->delete();
+        }
+        $article->created_at = \Carbon\Carbon::now();
         $article->save();
-        return redirect ()->route('produits')->with('success','Modifié');
+        return redirect()->route('produits')->with('success', 'Modifié');
     }
 
-    
-    public function diapo($id) {
+
+    public function diapo($id)
+    {
         $article = Produit::find($id);
-        return view('backend.produit.extension.diapo',['article'=>$article]);
-    } 
+        return view('backend.produit.extension.diapo', ['article' => $article]);
+    }
+
+    public function updateDiapo(Request $request, $id)
+    {
 
-    public function updateDiapo(Request $request, $id) {
-        
         request()->validate([
-            
-            'diapo'=> 'required',
-
-        
-       ]);
-     
-        $tmp_file = temporaryFile::where('folder',$request->diapo)->first();
-    
-        
+
+            'diapo' => 'required',
+
+
+        ]);
+
+        $tmp_file = temporaryFile::where('folder', $request->diapo)->first();
+
+
         $article = Produit::find($id);
-         
-       
-  
-          if($tmp_file){
-            
-            Storage::copy('diapo/tmp/'.$tmp_file->folder.'/'.$tmp_file->file,'diapo/'.$tmp_file->folder.'/'.$tmp_file->file);
-           
-                Media::create( 
+
+
+
+        if ($tmp_file) {
+
+            Storage::copy('diapo/tmp/' . $tmp_file->folder . '/' . $tmp_file->file, 'diapo/' . $tmp_file->folder . '/' . $tmp_file->file);
+
+            Media::create(
                 [
                     'produit_id' => $article->id,
                     'diapo' => $tmp_file->folder . '/' . $tmp_file->file,
-                    ],
-                );
-                Storage::deleteDirectory('diapo/tmp/'.$tmp_file->folder);
-                $tmp_file->delete();
+                ],
+            );
+            Storage::deleteDirectory('diapo/tmp/' . $tmp_file->folder);
+            $tmp_file->delete();
 
-            
-        return back()->with('success', 'Image ajouter');
-          
-    }
-    $article->save();
 
-}
+            return back()->with('success', 'Image ajouter');
+        }
+        $article->save();
+    }
 
-public function destroyMedia(Request $request, $id){
+    public function destroyMedia(Request $request, $id)
+    {
 
-    $diapo = Media::find($id);
-    $diapo->delete();
+        $diapo = Media::find($id);
+        $diapo->delete();
 
-    return back();
-}
+        return back();
+    }
 
-public function destroyProduit(Request $request, $id){
+    public function destroyProduit(Request $request, $id)
+    {
 
 
-    // $article = Produit::find($id);
-    // $article->delete();
+        // $article = Produit::find($id);
+        // $article->delete();
 
-    // return back();
+        // return back();
 
-    $promo = Promotion::where('produit_id', $id)->count();
-        if($promo > 0){
-            return redirect ('idara/produits')
-                    ->with('message', 'Produit existe dans une promotion');
-        }
-        else{
+        $promo = Promotion::where('produit_id', $id)->count();
+        if ($promo > 0) {
+            return redirect('idara/produits')
+                ->with('message', 'Produit existe dans une promotion');
+        } else {
             $article = Produit::find($id);
 
             $article->delete();
             return Redirect::to('idara/produits')
-                        ->with('message', 'produit supprimée');
+                ->with('message', 'produit supprimée');
         }
-        
+
         return back();
-}
-    
-
-public function fileUploadProduit(Request $request){
-   
-    if($request->hasfile('image')){
-     
-     $image = $request->file('image');
-     $file = $image->getClientOriginalName();
-     $folder = uniqid('post', 'true');
-     $image->storeAs('image/tmp/' . $folder,$file,'public');
-       
-
-       TemporaryFile::create([
-         'folder' => $folder,
-         'file'=> $file           
-         ]);
-   return  $folder;   
-        
-       
     }
- return '';
 
-     
-}
 
-public function fileDeleteProduit(){
+    public function fileUploadProduit(Request $request)
+    {
 
-$tmp_file = TemporaryFile::where('folder',request()->getContent())->first();
-if($tmp_file){
- Storage::deleteDirectory('image/tmp/'.$tmp_file->folder);
- $tmp_file->delete();
- return response('');
-}
-}
+        if ($request->hasfile('image')) {
+
+            $image = $request->file('image');
+            $file = $image->getClientOriginalName();
+            $folder = uniqid('post', 'true');
+            $image->storeAs('image/tmp/' . $folder, $file, 'public');
+
+
+            TemporaryFile::create([
+                'folder' => $folder,
+                'file' => $file
+            ]);
+            return  $folder;
+        }
+        return '';
+    }
+
+    public function fileDeleteProduit()
+    {
+
+        $tmp_file = TemporaryFile::where('folder', request()->getContent())->first();
+        if ($tmp_file) {
+            Storage::deleteDirectory('image/tmp/' . $tmp_file->folder);
+            $tmp_file->delete();
+            return response('');
+        }
+    }
+
+    public function fileUpload(Request $request)
+    {
+
+        if ($request->hasfile('diapo')) {
 
-public function fileUpload(Request $request){
-   
-           if($request->hasfile('diapo')){
-            
             $diapo = $request->file('diapo');
             $file = $diapo->getClientOriginalName();
             $folder = uniqid('post', 'true');
-            $diapo->storeAs('diapo/tmp/' . $folder,$file,'public');
-              
+            $diapo->storeAs('diapo/tmp/' . $folder, $file, 'public');
+
 
-              TemporaryFile::create([
+            TemporaryFile::create([
                 'folder' => $folder,
-                'file'=> $file           
-                ]);
-          return  $folder;   
-               
-              
-           }
+                'file' => $file
+            ]);
+            return  $folder;
+        }
         return '';
+    }
 
-            
-}
+    public function deleteUpload()
+    {
 
-public function deleteUpload(){
+        $tmp_file = TemporaryFile::where('folder', request()->getContent())->first();
+        if ($tmp_file) {
+            Storage::deleteDirectory('diapo/tmp/' . $tmp_file->folder);
+            $tmp_file->delete();
+            return response('');
+        }
+    }
+    public function changeStatus(Request $request)
+    {
+        $article = Produit::find($request->Id);
+        $article->etat = $request->etat;
+        $article->save();
 
-    $tmp_file = TemporaryFile::where('folder',request()->getContent())->first();
-    if($tmp_file){
-        Storage::deleteDirectory('diapo/tmp/'.$tmp_file->folder);
-        $tmp_file->delete();
-        return response('');
+        return response()->json(['success' => 'Status change successfully.']);
     }
-}
-public function changeStatus(Request $request)
-{
-    $article = Produit::find($request->Id);
-    $article->etat = $request->etat;
-    $article->save();
 
-    return response()->json(['success'=>'Status change successfully.']);
-}
+    public function homeStatus(Request $request)
+    {
+        $article = Produit::find($request->Id);
+        $article->home = $request->home;
+        $article->save();
 
-public function homeStatus(Request $request)
-{
-    $article = Produit::find($request->Id);
-    $article->home = $request->home;
-    $article->save();
+        return response()->json(['success' => 'Status change successfully.']);
+    }
 
-    return response()->json(['success'=>'Status change successfully.']);
-}
 
+    //doc
+
+    public function editDoc($id)
+    {
+        $article = Produit::find($id);
+        return view('backend.produit.extension.document', ['article' => $article]);
+    }
+
+    public function updateDoc(Request $request, $id)
+    {
+
+        request()->validate([
 
-//doc
+            'document' => 'required',
 
-public function editDoc($id) {
-    $article = Produit::find($id);
-    return view('backend.produit.extension.document',['article'=>$article]);
-} 
 
-public function updateDoc(Request $request, $id) {
+        ]);
+
+        $tmp_file = temporaryFile::where('folder', $request->document)->first();
+
+
+        $article = Produit::find($id);
+
+        if ($tmp_file) {
+            Storage::copy('document/tmp/' . $tmp_file->folder . '/' . $tmp_file->file, 'document/' . $tmp_file->folder . '/' . $tmp_file->file);
+
+            $article->update([
+
+                "document" => $tmp_file->folder . '/' . $tmp_file->file
+            ]);
+            Storage::deleteDirectory('document/tmp/' . $tmp_file->folder);
+            $tmp_file->delete();
+        }
+
+        $article->save();
 
-    request()->validate([
-            
-        'document'=> 'required',
+        return redirect()->route('produit.idara.show', ['id' => $article])->with('success', 'Document Ajouter');
+    }
 
-    
-   ]);
+    public function docUpload(Request $request)
+    {
 
-    $tmp_file = temporaryFile::where('folder',$request->document)->first();
+        if ($request->hasfile('document')) {
 
+            $document = $request->file('document');
+            $file = $document->getClientOriginalName();
+            $folder = uniqid('post', 'true');
+            $document->storeAs('document/tmp/' . $folder, $file, 'public');
 
-$article = Produit::find($id);
 
-    if($tmp_file){
-     Storage::copy('document/tmp/'.$tmp_file->folder.'/'.$tmp_file->file,'document/'.$tmp_file->folder.'/'.$tmp_file->file);
-   
-         $article->update([
-        
-            "document" => $tmp_file->folder . '/' . $tmp_file->file
-          ]);
-          Storage::deleteDirectory('document/tmp/'.$tmp_file->folder);
-              $tmp_file->delete();
-              
+            TemporaryFile::create([
+                'folder' => $folder,
+                'file' => $file
+            ]);
+            return  $folder;
+        }
+        return '';
     }
-  
-    $article->save();
-   
-     return back()->with('success', 'Document Ajouter');
-
- }
-
-public function docUpload(Request $request){
-   
-    if($request->hasfile('document')){
-     
-     $document = $request->file('document');
-     $file = $document->getClientOriginalName();
-     $folder = uniqid('post', 'true');
-     $document->storeAs('document/tmp/' . $folder,$file,'public');
-       
-
-       TemporaryFile::create([
-         'folder' => $folder,
-         'file'=> $file           
-         ]);
-   return  $folder;   
-        
-       
+
+    public function docUploadDelete()
+    {
+
+        $tmp_file = TemporaryFile::where('folder', request()->getContent())->first();
+        if ($tmp_file) {
+            Storage::deleteDirectory('document/tmp/' . $tmp_file->folder);
+            $tmp_file->delete();
+            return response('');
+        }
     }
- return '';
+    public function downloadDoc(Produit $produit)
+    {
 
-     
-}
 
-public function docUploadDelete(){
+        return  Storage::download('document/' . $produit->document);
+    }
 
-$tmp_file = TemporaryFile::where('folder',request()->getContent())->first();
-if($tmp_file){
- Storage::deleteDirectory('document/tmp/'.$tmp_file->folder);
- $tmp_file->delete();
- return response('');
-}
-}
-public function downloadDoc(Produit $produit)
-{   
-    
-   
-    return  Storage::download('document/'.$produit->document);
-     
-     
-    
-}
-  
+    public function deleteDoc(Request $request)
+    {
+
+        $article = Produit::find($request->id);
+        Storage::disk('public')->delete($article->document);
+        Produit::where('document', $article->document)->update(['document' => (new \App\Models\Produit)->defaultDoc()]);
+        // unlink("storage/".$presentation->image);
 
+        // Presentation::select("image", $presentation->image)->delete();
 
-}
+        return back()->with("success", "Document deleted successfully.");
+    }
+}

+ 125 - 52
app/Http/Controllers/backend/PromotionController.php

@@ -17,18 +17,18 @@ class PromotionController extends Controller
       return $this->middleware(['auth','verified']);
 
   }
-  
+
 
     public function Index(){
 
         $articles = Promotion::paginate(5);
 
 
-       
+
         return view("backend.promotion.index",compact('articles'));
      }
 
-  
+
 
      public function create(){
         $produits = Produit::select('nom', 'id')->oldest('nom')->get();
@@ -38,77 +38,120 @@ class PromotionController extends Controller
      }
      public function store(Request $request) {
 
-         
+
       request()->validate([
-            
+
          'titre'=> 'required',
          'produits'=> 'required',
-         
+
          'description'=> 'required',
-         
-     
+
+
     ]);
         $article = new Promotion();
         $article->titre = $request->input('titre');
         $article->produit_id = $request->input('produits');
         $article->debut = $request->input('debut');
         $article->fin = $request->input('fin');
+        $article->mot_cle = $request->input('mot_cle');
+
+
+        if ($request->filled('titre_seo')) {
+            $article->titre_seo = $request->input('titre_seo');
 
+        }else{
+            $article->titre_seo = $request->input('titre');
+
+        }
+        if ($request->filled('resume_seo')) {
+            $article->resume_seo = $request->input('resume_seo');
+
+        }else{
+            $article->resume_seo = strip_tags( $request->input('texte'));
+
+        }
 
         $article->description = $request->input('description');
         $article->remise = $request->input('remise');
-        
+
 
         $article->save();
 
-        
-      
+
+
            return redirect()->route('promotions');
 
     }
-      
+
      public function createPack(){
-        
+
         return view('backend.promotion.Pack');
 
-        
+
      }
      public function storePack(Request $request) {
       request()->validate([
-            
+
          'titre'=> 'required',
-         
+
          'description'=> 'required',
-         
 
-     
+
+
     ]);
 
       $tmp_file = temporaryFile::where('folder',$request->image)->first();
 
-        
+
       if($tmp_file){
           Storage::copy('image/tmp/'.$tmp_file->folder.'/'.$tmp_file->file,'image/'.$tmp_file->folder.'/'.$tmp_file->file);
-             
-          Promotion::create( 
+
+
+          if ($request->filled('titre_seo')) {
+          Promotion::create(
              [
                'titre' => $request->input('titre'),
-     
+
              'debut' => $request->input('debut'),
                'fin' => $request->input('fin'),
-         
-         
+               'titre_seo' => $request->titre_seo,
+               'resume_seo' => $request->resume_seo,
+               'mot_cle' => $request->mot_cle,
+
              'description' => $request->input('description'),
                'remise' => $request->input('remise'),
                'photo' => $tmp_file->folder . '/' . $tmp_file->file,
-               
+
                  ],
              );
+
+            }else{
+                Promotion::create(
+                    [
+                      'titre' => $request->input('titre'),
+
+                    'debut' => $request->input('debut'),
+                      'fin' => $request->input('fin'),
+                      'titre_seo' => $request->titre,
+                        'resume_seo' => strip_tags( $request->description),
+                        'mot_cle' => $request->mot_cle,
+
+                    'description' => $request->input('description'),
+                      'remise' => $request->input('remise'),
+                      'photo' => $tmp_file->folder . '/' . $tmp_file->file,
+
+                        ],
+                    );
+            }
+
+
+
+
              Storage::deleteDirectory('image/tmp/'.$tmp_file->folder);
              $tmp_file->delete();
-      
+
          return redirect()->route('promotions');
- 
+
   }
 
   }
@@ -129,19 +172,34 @@ class PromotionController extends Controller
 
             public function update(Request $request,$id) {
 
-                  
-                  
+
+
                $article=Promotion::find($id);
 
                $article->titre = $request->input('titre');
                $article->produit_id = $request->input('produits');
                $article->debut = $request->input('debut');
                $article->fin = $request->input('fin');
+               if ($request->filled('titre_seo')) {
+                $article->titre_seo = $request->input('titre_seo');
+
+            }else{
+                $article->titre_seo = $request->input('titre');
+
+            }
+            if ($request->filled('resume_seo')) {
+                $article->resume_seo = $request->input('resume_seo');
+
+            }else{
+                $article->resume_seo = strip_tags( $request->input('texte'));
+
+            }
+
 
 
                $article->description = $request->input('description');
                $article->remise = $request->input('remise');
-               
+
                $article->created_at = \Carbon\Carbon::now();
 
                $article->save();
@@ -150,7 +208,7 @@ class PromotionController extends Controller
             }
             public function editPack($id) {
                $article = Promotion::find($id);
-             
+
                return view('backend.promotion.editPack',['article'=>$article]);
 
             }
@@ -159,69 +217,84 @@ class PromotionController extends Controller
                $tmp_file = temporaryFile::where('folder',$request->image)->first();
                $article = Promotion::find($id);
                $article->titre = $request->input('titre');
-           
+
                $article->debut = $request->input('debut');
                $article->fin = $request->input('fin');
+        $article->mot_cle = $request->input('mot_cle');
+
+               if ($request->filled('titre_seo')) {
+                $article->titre_seo = $request->input('titre_seo');
+
+            }else{
+                $article->titre_seo = $request->input('titre');
+
+            }
+            if ($request->filled('resume_seo')) {
+                $article->resume_seo = $request->input('resume_seo');
 
+            }else{
+                $article->resume_seo = strip_tags( $request->input('description'));
+
+            }
 
                $article->description = $request->input('description');
                $article->remise = $request->input('remise');
-                 
+
                if($tmp_file){
                    Storage::copy('image/tmp/'.$tmp_file->folder.'/'.$tmp_file->file,'image/'.$tmp_file->folder.'/'.$tmp_file->file);
-                      
-                   $article->update( 
+
+                   $article->update(
                       [
                         'photo' => $tmp_file->folder . '/' . $tmp_file->file,
-                        
+
                           ],
                       );
                       Storage::deleteDirectory('image/tmp/'.$tmp_file->folder);
                       $tmp_file->delete();
 
 
-          
+
            }
                     $article->created_at = \Carbon\Carbon::now();
                     $article->save();
-               
+
                   return redirect()->route('promotions')->with('success','modifié');
-         
+
            }
 
      public function DeleteAuto(){
-        
-        
+
+
           $stale_posts = Promotion::where('fin', '<',\Carbon\Carbon::now())->get();
 
           foreach ($stale_posts as $post) {
             $post->delete();
         }
-     
+
      }
 
 
      public function fileUploadPromotion(Request $request){
-   
+
       if($request->hasfile('image')){
-       
+
        $image = $request->file('image');
        $file = $image->getClientOriginalName();
        $folder = uniqid('post', 'true');
        $image->storeAs('image/tmp/' . $folder,$file ,'public');
-         
+
 
          TemporaryFile::create([
            'folder' => $folder,
-           'file'=> $file           
+           'file'=> $file
            ]);
-     return  $folder;   
-          
-         
+     return  $folder;
+
+
       }
    return '';
 
-       
+
 }
 
 public function deleteUploadPromotion(){
@@ -239,7 +312,7 @@ public function changeStatus(Request $request)
         $article = Promotion::find($request->Id);
         $article->etat = $request->etat;
         $article->save();
-  
+
         return response()->json(['success'=>'Status change successfully.']);
     }
 
@@ -249,7 +322,7 @@ public function changeStatus(Request $request)
 
       $article = Promotion::find($id);
       $article->delete();
-  
+
       return back();
   }
 

+ 23 - 0
app/Http/Controllers/backend/ckEditorController.php

@@ -0,0 +1,23 @@
+<?php
+
+namespace App\Http\Controllers\backend;
+use App\Http\Controllers\Controller;
+
+use Illuminate\Http\Request;
+
+class ckEditorController extends Controller
+{
+    public function uploadImg(Request $request) { 
+        if ($request->hasFile('upload')) {
+            $originName = $request->file('upload')->getClientOriginalName();
+            $fileName = pathinfo($originName, PATHINFO_FILENAME);
+            $extension = $request->file('upload')->getClientOriginalExtension();
+            $fileName = $fileName . '_' . time() . '.' . $extension;
+    
+            $request->file('upload')->move(public_path('media'), $fileName);
+    
+            $url = asset('media/' . $fileName);
+            return response()->json(['fileName' => $fileName, 'uploaded'=> 1, 'url' => $url]);
+        }
+     }
+}

+ 69 - 0
app/Http/Controllers/frontend/DeviController.php

@@ -0,0 +1,69 @@
+<?php
+
+
+namespace App\Http\Controllers\frontend;
+use App\Http\Controllers\Controller;
+use App\Models\Devi;
+use App\Models\Contact;
+use App\Models\Fromcontact;
+use App\Models\Categorie;
+use Illuminate\Support\Facades\Mail;
+
+
+use Illuminate\Http\Request;
+
+class DeviController extends Controller
+{
+    public function Index(){
+
+
+        $contacts = Contact::where('etat','1')->get();
+        $categories = Categorie::where('etat','1')->get();
+
+
+        return view('frontend/devis/devis',compact('contacts','categories'));
+
+    }
+    public function store(Request $request) {
+
+
+// dd($request);
+        $devis = new Devi;
+        $devis->nom = $request->nom;
+        $devis->email = $request->email;
+        $devis->telephone = $request->telephone;
+
+        $devis->objet = $request->objet;
+        $devis->message = $request->message;
+
+        $devis->save();
+
+
+
+          Mail::send('frontend/devis/email-devis',
+             array(
+                 'nom' => $request->get('nom'),
+                 'email' => $request->get('email'),
+                 'telephone' => $request->get('telephone'),
+
+                 'objet' => $request->get('objet'),
+
+                 'user_message' => $request->get('message'),
+             ),
+
+             function($msg) use ($request)
+               {
+
+
+                  $msg->from($request->email);
+                  $msg->to('test@gmail.coù');
+                  $msg->subject($request->objet);
+
+               });
+
+        return back()->with('success', 'Thank you for contact us!');
+
+
+
+    }
+}

+ 23 - 0
app/Http/Controllers/frontend/ErrorController.php

@@ -0,0 +1,23 @@
+<?php
+
+namespace App\Http\Controllers\frontend;
+use App\Http\Controllers\Controller;
+use App\Models\Contact;
+
+use App\Models\Categorie;
+
+use Illuminate\Http\Request;
+
+class ErrorController extends Controller
+{
+    public function Index(){
+
+        
+        $contacts = Contact::where('etat','1')->get();
+        $categories = Categorie::where('etat','1')->get();
+
+
+        return view('404',compact('contacts','categories'));
+
+    }
+}

+ 8 - 6
app/Http/Controllers/frontend/HomeController.php

@@ -17,18 +17,20 @@ class HomeController extends Controller
 {
     public function Index(){
         $presentations = Presentation::where('etat','1')->get();
-        
+
         $slides = slide::where('etat','1')->get();
-       
+
         $categories = Categorie::where('etat','1')->get();
-        
+        $logiciel = Categorie::where('etat','1')->where('nom','Logiciels')->first();
+
+
         $produits = Produit::where('home','1')->get();
         $promotions = Promotion::where('etat','1')->get();
         $contacts = Contact::where('etat','1')->get();
 
-       
 
-        
+
+
         return view('frontend.home',compact('presentations','slides','categories','produits','promotions','contacts'));
-    } 
+    }
 }

+ 6 - 2
app/Http/Controllers/frontend/ProduitController.php

@@ -27,12 +27,16 @@ class ProduitController extends Controller
       
          }
          $promotions = Promotion::where('etat','1') ->paginate(6);
+
+         $category = Categorie::find($categorieId);
+          
          
+
          $categories = Categorie::where('etat','1')->get();
         $contacts = Contact::where('etat','1')->get();
 
         
-        return view('frontend.produits.produit',compact('produits','categories','contacts','promotions'));
+        return view('frontend.produits.produit',compact('produits','categories','contacts','promotions','category'));
     } 
     public function search(){
 
@@ -66,7 +70,7 @@ class ProduitController extends Controller
        
         if ($produit->document != null) {
             
-
+ 
             $size = Storage::size('document/'.$produit->document); 
             $file_size = $size * 0.0009765625; 
             $sizeFile = number_format($file_size,0);

+ 3 - 3
app/Models/Categorie.php

@@ -11,11 +11,11 @@ class Categorie extends Model
     use HasFactory, SoftDeletes;
     protected $dates = ['deleted_at'];
 
-    protected $fillable = ['nom', 'image'];
+    protected $fillable = ['nom', 'image','titre_seo','mot_cle'];
 
     public function produits()
     {
-     return $this->belongsToMany(Produit::class,'categorie_produit');                 
+     return $this->belongsToMany(Produit::class,'categorie_produit');
     }
-   
+
 }

+ 11 - 0
app/Models/Devi.php

@@ -0,0 +1,11 @@
+<?php
+
+namespace App\Models;
+
+use Illuminate\Database\Eloquent\Factories\HasFactory;
+use Illuminate\Database\Eloquent\Model;
+
+class Devi extends Model
+{
+    use HasFactory;
+}

+ 13 - 9
app/Models/Produit.php

@@ -10,31 +10,35 @@ class Produit extends Model
 {
     use HasFactory, SoftDeletes;
     protected $dates = ['deleted_at'];
-    
-    protected $fillable = ['nom','document','description','image'];
 
-    
+    protected $fillable = ['nom','document','description','image','titre_seo','resume_seo','mot_cle'];
+
+
     public function diapos(){
-        return $this->hasMany(Media::class);    
+        return $this->hasMany(Media::class);
     }
 
     public function diapo()
     {
         return $this->hasMany(Media::class,'produit_id','id');
     }
-   
+
     public function remove_categorie($category_id){
-        $this->categorie()->detach($category_id);         
+        $this->categorie()->detach($category_id);
     }
-    
+
     public function categories()
     {
-     return $this->belongsToMany(Categorie::class,'categorie_produit');                 
+     return $this->belongsToMany(Categorie::class,'categorie_produit');
     }
 
     public function promotion()
     {
         return $this->hasOne(Promotion::class);
     }
-   
+
+    public function defaultDoc()
+    {
+        return null;
+    }
 }

+ 1 - 1
app/Models/Promotion.php

@@ -10,7 +10,7 @@ class Promotion extends Model
 {
     use HasFactory, SoftDeletes;
 
-    protected $fillable = ['titre', 'remise','description','debut','fin','photo'];
+    protected $fillable = ['titre', 'remise','description','debut','fin','photo','titre_seo','resume_seo','mot_cle'];
 
     public function produits()
     {

+ 33 - 0
config/app.php

@@ -194,4 +194,37 @@ return [
         // ...
     ])->toArray(),
 
+        // filepond config
+
+	  'IMG_WIDTH'=>1080,
+        'IMG_HEIGHT'=>607,
+       'IMG_QUALITY'=>0.75,
+       'IMG_RATIO'=>1.8,
+       'MAX_FILES'=>2,
+        'MAX_FILE_SIZE'=>"5M",
+      'INSTANT_UPLOAD'=>"false",
+
+      'IMG_WIDTH_SLIDE'=>1920,
+      'IMG_HEIGHT_SLIDE'=>655,
+
+     'IMG_RATIO_SLIDE'=>2.93,
+
+
+
+     'IMG_WIDTH_CAT'=>380,
+     'IMG_HEIGHT_CAT'=>262,
+
+    'IMG_RATIO_CAT'=>1.45,
+
+    'IMG_WIDTH_PRODUIT'=>220,
+    'IMG_HEIGHT_PRODUIT'=>160,
+
+   'IMG_RATIO_PRODUIT'=>1.37,
+
+   'IMG_WIDTH_DIAPO'=>530,
+   'IMG_HEIGHT_DIAPO'=>480,
+
+  'IMG_RATIO_DIAPO'=>1.10,
 ];
+
+

+ 34 - 0
database/migrations/2023_06_14_123023_add_titre_seo_to_presentations_table.php

@@ -0,0 +1,34 @@
+<?php
+
+use Illuminate\Database\Migrations\Migration;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Support\Facades\Schema;
+
+return new class extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::table('presentations', function (Blueprint $table) {
+            $table->text('titre_seo')->nullable()->after('titre');
+
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::table('presentations', function (Blueprint $table) {
+            $table->dropColumn('titre_seo');
+
+        });
+    }
+};

+ 34 - 0
database/migrations/2023_06_14_123217_add_resume_seo_to_presentations_table.php

@@ -0,0 +1,34 @@
+<?php
+
+use Illuminate\Database\Migrations\Migration;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Support\Facades\Schema;
+
+return new class extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::table('presentations', function (Blueprint $table) {
+            $table->text('resume_seo')->nullable()->after('texte');
+
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::table('presentations', function (Blueprint $table) {
+            $table->dropColumn('resume_seo');
+
+        });
+    }
+};

+ 34 - 0
database/migrations/2023_06_14_123739_add_mot_cle_to_presentations_table.php

@@ -0,0 +1,34 @@
+<?php
+
+use Illuminate\Database\Migrations\Migration;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Support\Facades\Schema;
+
+return new class extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::table('presentations', function (Blueprint $table) {
+            $table->text('mot_cle')->nullable()->after('resume_seo');
+
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::table('presentations', function (Blueprint $table) {
+            $table->dropColumn('mot_cle');
+
+        });
+    }
+};

+ 34 - 0
database/migrations/2023_06_14_134946_add_mot_cle_to_categories_table.php

@@ -0,0 +1,34 @@
+<?php
+
+use Illuminate\Database\Migrations\Migration;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Support\Facades\Schema;
+
+return new class extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::table('categories', function (Blueprint $table) {
+            $table->text('mot_cle')->nullable()->after('image');
+
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::table('categories', function (Blueprint $table) {
+            $table->dropColumn('mot_cle');
+
+        });
+    }
+};

+ 34 - 0
database/migrations/2023_06_14_135014_add_titre_seo_to_categories_table.php

@@ -0,0 +1,34 @@
+<?php
+
+use Illuminate\Database\Migrations\Migration;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Support\Facades\Schema;
+
+return new class extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::table('categories', function (Blueprint $table) {
+            $table->text('titre_seo')->nullable()->after('nom');
+
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::table('categories', function (Blueprint $table) {
+            $table->dropColumn('titre_seo');
+
+        });
+    }
+};

+ 34 - 0
database/migrations/2023_06_19_075907_add_titre_seo_to_produits_table.php

@@ -0,0 +1,34 @@
+<?php
+
+use Illuminate\Database\Migrations\Migration;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Support\Facades\Schema;
+
+return new class extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::table('produits', function (Blueprint $table) {
+            $table->text('titre_seo')->nullable()->after('nom');
+
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::table('produits', function (Blueprint $table) {
+            $table->dropColumn('titre_seo');
+
+        });
+    }
+};

+ 34 - 0
database/migrations/2023_06_19_075938_add_mot_cle_to_produits_table.php

@@ -0,0 +1,34 @@
+<?php
+
+use Illuminate\Database\Migrations\Migration;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Support\Facades\Schema;
+
+return new class extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::table('produits', function (Blueprint $table) {
+            $table->text('mot_cle')->nullable()->after('image');
+
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::table('produits', function (Blueprint $table) {
+            $table->dropColumn('mot_cle');
+
+        });
+    }
+};

+ 34 - 0
database/migrations/2023_06_19_080008_add_resume_seo_to_produits_table.php

@@ -0,0 +1,34 @@
+<?php
+
+use Illuminate\Database\Migrations\Migration;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Support\Facades\Schema;
+
+return new class extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::table('produits', function (Blueprint $table) {
+            $table->text('resume_seo')->nullable()->after('description');
+
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::table('produits', function (Blueprint $table) {
+            $table->dropColumn('resume_seo');
+
+        });
+    }
+};

+ 34 - 0
database/migrations/2023_06_19_082603_add_resume_seo_to_promotions_table.php

@@ -0,0 +1,34 @@
+<?php
+
+use Illuminate\Database\Migrations\Migration;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Support\Facades\Schema;
+
+return new class extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::table('promotions', function (Blueprint $table) {
+            $table->text('resume_seo')->nullable();
+
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::table('promotions', function (Blueprint $table) {
+            $table->dropColumn('resume_seo');
+
+        });
+    }
+};

+ 34 - 0
database/migrations/2023_06_19_082626_add_mot_cle_to_promotions_table.php

@@ -0,0 +1,34 @@
+<?php
+
+use Illuminate\Database\Migrations\Migration;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Support\Facades\Schema;
+
+return new class extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::table('promotions', function (Blueprint $table) {
+            $table->text('mot_cle')->nullable();
+
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::table('promotions', function (Blueprint $table) {
+            $table->dropColumn('mot_cle');
+
+        });
+    }
+};

+ 34 - 0
database/migrations/2023_06_19_082644_add_titre_seo_to_promotions_table.php

@@ -0,0 +1,34 @@
+<?php
+
+use Illuminate\Database\Migrations\Migration;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Support\Facades\Schema;
+
+return new class extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::table('promotions', function (Blueprint $table) {
+            $table->text('titre_seo')->nullable();
+
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::table('promotions', function (Blueprint $table) {
+            $table->dropColumn('titre_seo');
+
+        });
+    }
+};

+ 38 - 0
database/migrations/2023_08_08_125149_create_devis_table.php

@@ -0,0 +1,38 @@
+<?php
+
+use Illuminate\Database\Migrations\Migration;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Support\Facades\Schema;
+
+return new class extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::create('devis', function (Blueprint $table) {
+            $table->id();
+            $table->string('nom');
+            $table->string('telephone');
+            $table->string('email');
+            $table->string('objet');
+            $table->text('message');
+            $table->datetime('deleted_at')->nullable();
+
+            $table->timestamps();
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::dropIfExists('devis');
+    }
+};

+ 7 - 7
public/frontend/css/style.css

@@ -70,9 +70,9 @@
 */
 
 
-.owl-style-1:before{ 
+.owl-style-1:before{
 	/* content:url(frontend/images/promo.png) ; */
-	position:relative; 
+	position:relative;
 	left:-3px;
 	top:10px;
    }
@@ -13315,7 +13315,7 @@ html.rd-navbar-fixed-linked .page {
 .rd-navbar-corporate.rd-navbar-static .rd-navbar-main {
 	margin-left: auto;
 	margin-right: auto;
-	max-width: 1170px;
+	max-width: 1732px;
 }
 
 .rd-navbar-corporate.rd-navbar-static .rd-navbar-aside {
@@ -16738,14 +16738,14 @@ html:not(.ie-10):not(.ie-11):not(.ie-edge) .countdown-circle svg {
 	}
 }
 
-/* 
+/*
  * 	Owl Carousel - Auto Height Plugin
  */
 .owl-height {
 	transition: height 500ms ease-in-out;
 }
 
-/* 
+/*
  *  Core Owl Carousel CSS File
  */
 .owl-carousel {
@@ -16829,7 +16829,7 @@ html:not(.ie-10):not(.ie-11):not(.ie-edge) .countdown-circle svg {
 	display: block;
 }
 
-/* 
+/*
  * 	Owl Carousel - Lazy Load Plugin
  */
 .owl-carousel .owl-item .owl-lazy {
@@ -16837,7 +16837,7 @@ html:not(.ie-10):not(.ie-11):not(.ie-edge) .countdown-circle svg {
 	transition: opacity 400ms ease;
 }
 
-/* 
+/*
  * 	Owl Carousel - Video Plugin
  */
 .owl-carousel .owl-video-wrapper {

BIN
public/frontend/images/banner.jpg


BIN
public/frontend/images/garantie.png


BIN
public/frontend/images/guider.png


BIN
public/frontend/images/livraison.png


BIN
public/frontend/images/sav.png


BIN
public/media/images.jpg


BIN
public/media/logo_1680778562.png


BIN
public/media/logo_1680778688.png


BIN
public/media/logo_1680779061.png


BIN
public/media/logo_1680780242.png


+ 98 - 63
resources/views/backend/category/add.blade.php

@@ -4,87 +4,121 @@
 @section('content')
 
 
-<link href="https://unpkg.com/filepond@4.30.4/dist/filepond.min.css" rel="stylesheet" type="text/css" />
-<link href="https://unpkg.com/filepond-plugin-file-poster@2.5.1/dist/filepond-plugin-file-poster.min.css" rel="stylesheet" type="text/css" />
+    <link href="https://unpkg.com/filepond@4.30.4/dist/filepond.min.css" rel="stylesheet" type="text/css" />
+    <link href="https://unpkg.com/filepond-plugin-file-poster@2.5.1/dist/filepond-plugin-file-poster.min.css" rel="stylesheet"
+        type="text/css" />
 
-<link href="{{asset('pintura/pintura.scss')}}" rel="stylesheet" />
+    <link href="{{ asset('pintura/pintura.scss') }}" rel="stylesheet" />
 
-<!-- Custom css -->
-<link href="{{asset('css/custom.css')}}" rel="stylesheet" />
-@include('backend.partials.import')
+    <!-- Custom css -->
+    <link href="{{ asset('css/custom.css') }}" rel="stylesheet" />
+    @include('backend.partials.import')
 
-@include('backend.partials.features')
+    @include('backend.partials.features')
 
 
+    <form method="post" action="{{ url('categorie') }}" enctype="multipart/form-data">
+        <div class="card mt-4">
+            <div class="card-header">
+                Vous pouvez ajouter une categorie
+            </div>
+            <div class="card-body">
 
-    <div class="card mt-4">
-        <div class="card-header">
-            Vous pouvez ajouter une categorie
-        </div>
-        <div class="card-body">
-            
 
-            <div class="container">
-                @if(session('success'))
-                <div class="alert alert-success">
-                    {{ session('success') }}
-                </div>
-                @endif
-                @if (count($errors) > 0)
-                <div class="alert alert-danger">
-                    <strong>Whoops!</strong> Some problems with your input.<br><br>
-                    <ul>
-                        @foreach ($errors->all() as $error)
-                        <li>{{ $error }}</li>
-                        @endforeach
-                    </ul>
+                <div class="container">
+                    @if (session('success'))
+                        <div class="alert alert-success">
+                            {{ session('success') }}
+                        </div>
+                    @endif
+                    @if (count($errors) > 0)
+                        <div class="alert alert-danger">
+                            <strong>Whoops!</strong> Some problems with your input.<br><br>
+                            <ul>
+                                @foreach ($errors->all() as $error)
+                                    <li>{{ $error }}</li>
+                                @endforeach
+                            </ul>
+                        </div>
+                    @endif
                 </div>
-                @endif
 
-                <form method="post" action="{{url('categorie')}}" enctype="multipart/form-data">
-                    
 
-                    @csrf
-                 <div class="row">
-                      
+
+
+                @csrf
+                <div class="row">
+
                     <div class="form-group mt-4">
-                        <input type="text" class="form-control" id="" name="nom" placeholder="Nom" required>
+                        <label for=""> <STRong>Catégorie</STRong></label>
+                        <input type="text" class="form-control  mt-3" id="" name="nom" placeholder="Nom"  value="{{ old('nom') }}"
+                            required>
                     </div>
-                            <div class="input-group mt-4 control-group increment" >
-                                 <input type="file" name="image" class="my-pond form-control " required/>
-                    
-                            </div>
 
-                        </div>
+                    <div class="input-group mt-4 control-group increment">
+                        <input type="file" name="image" class="my-pond form-control " required />
+
                     </div>
-                    
-                        <div class="form-group col-md-4 mt-4">
-                            <button type="submit" class="btn btn-success" style="margin-top:10px">Confirmer</button>
-                        </div>
-                    
 
-                </form>
+                </div>
+
+
+
+
+
+
             </div>
         </div>
-    </div>
 
-</div>
 
+        <div class="card mt-4">
+            <div class="card-header">
+                Réferencement
+            </div>
+            <div class="card-body">
+                <div class="form-group">
+                    <label for="exampleFormControlInput1" class="mb-3"><strong>Titre(SEO)</strong></label>
+
+                    <input type="text" class="form-control"  name="titre_seo" placeholder="..."
+                        value="{{ old('titre_seo') }}">
+                </div>
+
+
+                <div class="form-group mt-4">
+                    <label for="exampleFormControlInput1" class="mb-3"><strong>Mot clé (SEO)</strong></label>
+
+                    <input type="text" class="form-control"  name="mot_cle" placeholder="..."
+                        value="{{ old('mot_cle') }}">
+                </div>
+
+            </div>
+        </div>
+        <div class="form-group  mt-4" style="text-align: end">
+            <button type="submit" class="btn btn-success" style="margin-top:10px">Confirmer</button>
+        </div>
+
+    </form>
 
 
 
 
-<script src="https://unpkg.com/filepond@4.30.4/dist/filepond.min.js"></script>
-<script src="https://unpkg.com/filepond-plugin-file-poster@2.5.1/dist/filepond-plugin-file-poster.min.js"></script>
-<script src="https://unpkg.com/filepond-plugin-file-validate-type@1.2.8/dist/filepond-plugin-file-validate-type.min.js"></script>
-<script src="https://unpkg.com/filepond-plugin-file-validate-size@2.2.8/dist/filepond-plugin-file-validate-size.min.js"></script>
-<script src="https://unpkg.com/filepond-plugin-image-exif-orientation@1.0.11/dist/filepond-plugin-image-exif-orientation.min.js"></script>
 
-<script  type="module">
-var  img_width = {{ config('app.IMG_HEIGHT') }} ;
-    var img_height = {{ config('app.IMG_HEIGHT') }};
+
+    <script src="https://unpkg.com/filepond@4.30.4/dist/filepond.min.js"></script>
+    <script src="https://unpkg.com/filepond-plugin-file-poster@2.5.1/dist/filepond-plugin-file-poster.min.js"></script>
+    <script src="https://unpkg.com/filepond-plugin-file-validate-type@1.2.8/dist/filepond-plugin-file-validate-type.min.js">
+    </script>
+    <script src="https://unpkg.com/filepond-plugin-file-validate-size@2.2.8/dist/filepond-plugin-file-validate-size.min.js">
+    </script>
+    <script
+        src="https://unpkg.com/filepond-plugin-image-exif-orientation@1.0.11/dist/filepond-plugin-image-exif-orientation.min.js">
+    </script>
+
+    <script  type="module">
+var  img_width = {{ config('app.IMG_WIDTH_CAT') }} ;
+    var img_height = {{ config('app.IMG_HEIGHT_CAT') }};
     var img_quality = {{ config('app.IMG_QUALITY') }};
-    var  img_ratio = {{ config('app.IMG_RATIO') }};
+    var  img_ratio = {{ config('app.IMG_RATIO_CAT') }};
     var  max_files  = {{ config('app.MAX_FILES') }};
     var  max_file_size  = "{{ config('app.MAX_FILE_SIZE') }}B";
     var  instant_upload = {{ config('app.INSTANT_UPLOAD') }};
@@ -92,12 +126,12 @@ var  img_width = {{ config('app.IMG_HEIGHT') }} ;
 import {
         FilePondPluginImageEditor,
     } from '/filepond/filepond-plugin-image-editor/FilePondPluginImageEditor.js';
-	
+
 // import Pintura Image Editor modules
 import {
     // Image editor
 
-    
+
     openEditor,
     processImage,
     createDefaultImageReader,
@@ -114,9 +148,9 @@ import {
 // French
 import fr_FR from '/filepond/locale/fr-fr.js';
 
-  
 
-    
+
+
 FilePond.setOptions(fr_FR);
 
 // Register plugins
@@ -141,7 +175,8 @@ FilePond.create(document.querySelector(pond_selector), {
     dropOnPage: true,
     dropOnElement: true,
     instantUpload: instant_upload,
-    
+    imageResizeUpscale: false,
+
     // FilePond Image Editor plugin properties
     imageEditor: {
         // Maps legacy data objects to new imageState objects (optional)
@@ -188,10 +223,10 @@ FilePond.create(document.querySelector(pond_selector), {
             server: {
                     process: '/file-upload-category',
                     revert: '/file-delete-category',
-                
+
                     headers:{
                         'X-CSRF-TOKEN': '{{ csrf_token() }}'}
-                    
+
                 },
             });
 

+ 149 - 118
resources/views/backend/category/edit.blade.php

@@ -14,8 +14,11 @@
 
 
 <div class="container">
-    
+
     @include('backend.partials.features')
+    <form action="{{url('categorie/'.$article->id)}}" method="post" enctype="multipart/form-data">
+    <input type="hidden" name="_method" value="PUT">
+    @csrf
     <div class="card mt-4">
         <h5 class="card-header">Modifier</h5>
         <div class="card-body">
@@ -24,148 +27,176 @@
                 @csrf
                 <div class="form-group">
                     <label for="exampleFormControlInput1"><strong>Nom de la catégorie : </strong></label>
-                    <input type="text" class="form-control" name="nom" placeholder="" value="{{$article->nom}}" required>
+                    <input type="text" class="form-control" name="nom" {{$article->nom== 'Logiciels' ? 'disabled' : '' }}  placeholder="" value="{{$article->nom}}" required>
                 </div>
                 <div class="form-group mt-4">
-             
+
                 <div class="input-group  control-group increment" >
                                  <input type="file" name="image" class="my-pond form-control " />
-                    
+
                             </div>
                         <img src="{{ asset('storage/image/'.$article->image) }} " style="width:200px" alt="description of myimage">
 
             </div>
 
-                <div class="form-group add mt-4">
-                    <button type="submit" class="btn btn-primary" value="">Modifier</button>
 
-                </div>
-            </form>
         </div>
     </div>
+
+    <div class="card mt-4">
+        <div class="card-header">
+            Réferencement
+        </div>
+        <div class="card-body">
+            <div class="form-group">
+                <label for="exampleFormControlInput1" class="mb-3"><strong>Titre(SEO)</strong></label>
+
+                <input type="text" class="form-control"  name="titre_seo" placeholder="..."
+                    value="{{$article->titre_seo }}">
+            </div>
+
+
+            <div class="form-group mt-4">
+                <label for="exampleFormControlInput1" class="mb-3"><strong>Mot clé (SEO)</strong></label>
+
+                <input type="text" class="form-control"  name="mot_cle" placeholder="..."
+                    value="{{$article->mot_cle }}">
+            </div>
+
+        </div>
+    </div>
+    <div class="form-group  mt-4" style="text-align: end">
+        <button type="submit" class="btn btn-success" style="margin-top:10px">Modifier</button>
+    </div>
+</form>
 </div>
 
+
+
 <script src="https://unpkg.com/filepond@4.30.4/dist/filepond.min.js"></script>
 <script src="https://unpkg.com/filepond-plugin-file-poster@2.5.1/dist/filepond-plugin-file-poster.min.js"></script>
 <script src="https://unpkg.com/filepond-plugin-file-validate-type@1.2.8/dist/filepond-plugin-file-validate-type.min.js"></script>
 <script src="https://unpkg.com/filepond-plugin-file-validate-size@2.2.8/dist/filepond-plugin-file-validate-size.min.js"></script>
 <script src="https://unpkg.com/filepond-plugin-image-exif-orientation@1.0.11/dist/filepond-plugin-image-exif-orientation.min.js"></script>
 
+
 <script  type="module">
-var  img_width = {{ config('app.IMG_HEIGHT') }} ;
-    var img_height = {{ config('app.IMG_HEIGHT') }};
+   var  img_width = {{ config('app.IMG_WIDTH_CAT') }} ;
+    var img_height = {{ config('app.IMG_HEIGHT_CAT') }};
     var img_quality = {{ config('app.IMG_QUALITY') }};
-    var  img_ratio = {{ config('app.IMG_RATIO') }};
+    var  img_ratio = {{ config('app.IMG_RATIO_CAT') }};
     var  max_files  = {{ config('app.MAX_FILES') }};
     var  max_file_size  = "{{ config('app.MAX_FILE_SIZE') }}B";
     var  instant_upload = {{ config('app.INSTANT_UPLOAD') }};
     var   pond_selector = '.my-pond';
-import {
-        FilePondPluginImageEditor,
-    } from '/filepond/filepond-plugin-image-editor/FilePondPluginImageEditor.js';
-	
-// import Pintura Image Editor modules
-import {
-    // Image editor
-
-    
-    openEditor,
-    processImage,
-    createDefaultImageReader,
-    createDefaultImageWriter,
-    createDefaultImageOrienter,
-
-    // Only needed if loading legacy image editor data
-    legacyDataToImageState,
-
-    // Import the editor default configuration
-    getEditorDefaults,
-} from '/pintura/pintura.js';
-
-// French
-import fr_FR from '/filepond/locale/fr-fr.js';
-
-  
-
-    
-FilePond.setOptions(fr_FR);
-
-// Register plugins
-FilePond.registerPlugin(
-    FilePondPluginImageEditor,
-    FilePondPluginFilePoster,
-    FilePondPluginImageExifOrientation,
-    FilePondPluginFileValidateType,
-    FilePondPluginFileValidateSize,
-);
-
-
-
-FilePond.create(document.querySelector(pond_selector), {
-    // Attributes
-    name: 'image',
-    maxFiles: max_files,
-    allowFileSizeValidation: true,
-    maxFileSize: max_file_size,
-    allowBrowse: true,
-    acceptedFileTypes: ['image/*'],
-    dropOnPage: true,
-    dropOnElement: true,
-    instantUpload: instant_upload,
-    
-    // FilePond Image Editor plugin properties
-    imageEditor: {
-        // Maps legacy data objects to new imageState objects (optional)
-        legacyDataToImageState: legacyDataToImageState,
-
-        // Used to create the editor (required)
-        createEditor: openEditor,
-
-        // Used for reading the image data. See JavaScript installation for details on the `imageReader` property (required)
-        imageReader: [
-            createDefaultImageReader,
-            {
-                // createDefaultImageReader options here
-            },
-        ],
-
-        // Required when generating a preview thumbnail and/or output image
-        imageWriter: [
-            createDefaultImageWriter,
-            {
-                // We'll resize images to fit a 512 × 512 square
-                targetSize: {
-                    width: img_width,
-                    height: img_height,
-                },
-                quality: img_quality,
-            },
-        ],
-
-        // Used to create poster and output images, runs an invisible "headless" editor instance
-        imageProcessor: processImage,
-
-        // Pintura Image Editor options
-        editorOptions: {
-            // Pass the editor default configuration options
-            ...getEditorDefaults(),
-
-            // This will set a square crop aspect ratio
-            imageCropAspectRatio: img_ratio,
-        }
-    }
-});
-            FilePond.setOptions({
-            server: {
-                    process: '/file-upload-slide',
-                    revert: '/file-delete-slide',
-                
-                    headers:{
-                        'X-CSRF-TOKEN': '{{ csrf_token() }}'}
-                    
-                },
-            });
-
-</script>
+   import {
+           FilePondPluginImageEditor,
+       } from '/filepond/filepond-plugin-image-editor/FilePondPluginImageEditor.js';
+
+   // import Pintura Image Editor modules
+   import {
+       // Image editor
+
+
+       openEditor,
+       processImage,
+       createDefaultImageReader,
+       createDefaultImageWriter,
+       createDefaultImageOrienter,
+
+       // Only needed if loading legacy image editor data
+       legacyDataToImageState,
+
+       // Import the editor default configuration
+       getEditorDefaults,
+   } from '/pintura/pintura.js';
+
+   // French
+   import fr_FR from '/filepond/locale/fr-fr.js';
+
+
+
+
+   FilePond.setOptions(fr_FR);
+
+   // Register plugins
+   FilePond.registerPlugin(
+       FilePondPluginImageEditor,
+       FilePondPluginFilePoster,
+       FilePondPluginImageExifOrientation,
+       FilePondPluginFileValidateType,
+       FilePondPluginFileValidateSize,
+   );
+
+
+
+   FilePond.create(document.querySelector(pond_selector), {
+       // Attributes
+       name: 'image',
+       maxFiles: max_files,
+       allowFileSizeValidation: true,
+       maxFileSize: max_file_size,
+       allowBrowse: true,
+       acceptedFileTypes: ['image/*'],
+       dropOnPage: true,
+       dropOnElement: true,
+       instantUpload: instant_upload,
+       imageResizeUpscale: false,
+
+       // FilePond Image Editor plugin properties
+       imageEditor: {
+           // Maps legacy data objects to new imageState objects (optional)
+           legacyDataToImageState: legacyDataToImageState,
+
+           // Used to create the editor (required)
+           createEditor: openEditor,
+
+           // Used for reading the image data. See JavaScript installation for details on the `imageReader` property (required)
+           imageReader: [
+               createDefaultImageReader,
+               {
+                   // createDefaultImageReader options here
+               },
+           ],
+
+           // Required when generating a preview thumbnail and/or output image
+           imageWriter: [
+               createDefaultImageWriter,
+               {
+                   // We'll resize images to fit a 512 × 512 square
+                   targetSize: {
+                       width: img_width,
+                       height: img_height,
+                   },
+                   quality: img_quality,
+               },
+           ],
+
+           // Used to create poster and output images, runs an invisible "headless" editor instance
+           imageProcessor: processImage,
+
+           // Pintura Image Editor options
+           editorOptions: {
+               // Pass the editor default configuration options
+               ...getEditorDefaults(),
+
+               // This will set a square crop aspect ratio
+               imageCropAspectRatio: img_ratio,
+           }
+       }
+   });
+               FilePond.setOptions({
+               server: {
+                       process: '/file-upload-category',
+                       revert: '/file-delete-category',
+
+                       headers:{
+                           'X-CSRF-TOKEN': '{{ csrf_token() }}'}
+
+                   },
+               });
+
+   </script>
+
 
 @endsection

+ 14 - 14
resources/views/backend/category/index.blade.php

@@ -18,10 +18,10 @@
             </div>
             <div class="card-body">
 
-                
+
                 <a href="{{route('categorie.add')}}" class="btn btn-primary">+ Ajouter</a>
 
-              
+
                 <a href="javascript:window.location.href=window.location.href" class="btn btn-secondary"><i class="fa-solid fa-arrows-rotate"></i>Actualiser</a>
 
 
@@ -45,7 +45,7 @@
                  </ul>
                </div>
                @endif
-    
+
             @if (Session::has('message'))
            <div class="alert alert-info">{{ Session::get('message') }}</div>
          @endif
@@ -102,17 +102,17 @@
                                                     <Tooltip title="Afficher">
 
                                                         <input data-id="{{$article->id}}" class="toggle-class" type="checkbox"  data-onstyle="success"  data-offstyle="danger" data-toggle="toggle" data-on="✔" data-off="⊘" {{ $article->etat ? 'checked' : '' }}>
-    
-    
-                                                    </Tooltip>  
-                                                
+
+
+                                                    </Tooltip>
+
                                                 @endif
                                             <Tooltip title="Voir Plus"> <a href="{{ route('category.show',['id'=>$article]) }}" class="btn btn-xs btn-primary"><i class="fa fa-sign-out" aria-hidden="true"></i></a></Tooltip>
 
 
 
                                             <input name="_method" type="hidden" value="DELETE">
-                                            <Tooltip title="Supprimer"> <button type="submit" class="btn btn-xs btn-danger btn-flat show_confirm" data-toggle="tooltip" ref="{{ url('slide/'.$article->id) }}"><i class="fa-solid fa-trash" aria-hidden="true"></i></button></Tooltip>
+                                            <Tooltip title="Supprimer"> <button type="submit" class="btn btn-xs btn-danger btn-flat show_confirm" data-toggle="tooltip" {{$article->nom== 'Logiciels' ? 'style=display:none' : '' }}  ref="{{ url('slide/'.$article->id) }} "><i class="fa-solid fa-trash" aria-hidden="true"></i></button></Tooltip>
 
 
                                         </form>
@@ -129,14 +129,14 @@
                         </tbody>
                     </table>
                     {!! $articles->links() !!}
-                    
-                      </div> 
+
+                      </div>
                  </div>
-                 
-             
+
+
             </div>
-  
- 
+
+
 
 
 

+ 15 - 5
resources/views/backend/category/show.blade.php

@@ -25,7 +25,7 @@
                                     <i class="fa fa-gears"></i> Actions
                                 </button>
                                 <ul class="dropdown-menu">
-                                    <a href="{{url('/test')}}">
+                                    <a href="/">
                                         <li><button class="dropdown-item" type="button"><i class="fas fa-eye" aria-hidden="true"></i> Visualiser</button></li>
 
                                     </a>
@@ -35,7 +35,7 @@
 
                                 </ul>
                             </div>
-                      
+
                         </div>
 
                     </div>
@@ -47,7 +47,7 @@
                     <div><i class="fa-solid fa-calendar-days"></i> <strong>Date de mise à jour : </strong> {{$article->created_at}}</div>
 
                     <br>
-                   
+
 
                 </div>
             </div>
@@ -71,7 +71,7 @@
                     <div class="showImage">
 
                         <img src="{{ asset('storage/image/'.$article->image) }}" alt="description of myimage">
-                        
+
                     </div>
                 </div>
             </div>
@@ -80,6 +80,16 @@
         </section>
 
 
-    </div>
+        <div class="card mt-4">
+            <div class="card-header">
+                Optimisation pour les moteurs de recherche
+            </div>
+            <div class="card-body">
+                <div class="mt-4">  <strong>Titre ( SEO ): </strong> <div class="mt-2">{{$article->titre_seo}}</div> </div>
+                <div class="mt-4">  <strong>Mot clé ( SEO ): </strong> <div class="mt-2">{{$article->mot_cle}}</div> </div>
+
+
+            </div>
+        </div>
 
     @endsection

+ 2 - 1
resources/views/backend/contact/add.blade.php

@@ -183,9 +183,10 @@
 
 
         if (option == 4) {
-            document.getElementById("hiddenDivInput").style.visibility = "visible";
 
             document.getElementById("hiddenDiv").style.visibility = "visible";
+            document.getElementById("hiddenDivInput").style.visibility = "visible";
+
 
         } else {
             document.getElementById("hiddenDiv").style.visibility = "hidden";

+ 101 - 0
resources/views/backend/devis/index.blade.php

@@ -0,0 +1,101 @@
+@extends('layouts.idara.panel')
+
+
+@section('content')
+
+<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.3/jquery.min.js" integrity="sha512-STof4xm1wgkfm7heWqFJVn58Hm3EtS31XFaagaa8VMReCXAkQnJZ+jEy8PCC/iT18dFy95WcExNHFTqLyp72eQ==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
+
+<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-toggle/2.2.2/js/bootstrap-toggle.min.js" integrity="sha512-F636MAkMAhtTplahL9F6KmTfxTmYcAcjcCkyu0f0voT3N/6vzAuJ4Num55a0gEJ+hRLHhdz3vDvZpf6kqgEa5w==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
+
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-toggle/2.2.2/css/bootstrap-toggle.min.css" integrity="sha512-hievggED+/IcfxhYRSr4Auo1jbiOczpqpLZwfTVL/6hFACdbI3WQ8S9NCX50gsM9QVE+zLk/8wb9TlgriFbX+Q==" crossorigin="anonymous" referrerpolicy="no-referrer" />
+@include('backend.partials.import')
+
+<section style="margin-bottom: 44px;">
+
+    <div class="card">
+        <div class="card-header">
+            Demande de devis
+        </div>
+        <div class="card-body">
+
+            <a href="<?php echo $_SERVER["REQUEST_URI"]; ?>" class="btn btn-secondary"><i class="fa-solid fa-arrows-rotate"></i>Actualiser</a>
+
+
+
+        </div>
+    </div>
+</section>
+
+<section>
+    <div class="card">
+        <div class="card-header">
+            Demande de Devis
+        </div>
+        <div class="card-body">
+
+            <div class="table-responsive">
+                <table class="table table-bordered">
+                    <thead>
+                        <tr>
+                            <th scope="col">Objet</th>
+                            <th scope="col">Nom</th>
+                            <th scope="col">Détails</th>
+
+                        </tr>
+                    </thead>
+                    <tbody>
+                        @foreach($devis as $devi)
+
+
+                        <tr>
+                            <th scope="row">
+
+                                {{$devi->objet}}
+
+                            </th>
+                            <th scope="row">
+
+                                {{$devi->nom}}
+
+
+                            </th>
+
+                            <th scope="row" class="buttonOffOut">
+
+
+                                <div>
+
+                                    <form method="POST" action="{{ url('devis', $devi->id) }}">
+                                        @csrf
+                                        <a class="btn btn-primary" href="{{url('devis/'.$devi->id)}}">Details</a>
+
+                                        <input name="_method" type="hidden" value="DELETE">
+                                        <Tooltip title="Supprimer"> <button type="submit" class="btn btn-xs btn-danger btn-flat show_confirm" data-toggle="tooltip" ref="{{ url('devis/'.$devi->id) }}">delete</button></Tooltip>
+
+
+
+                                    </form>
+
+
+
+
+
+                                </div>
+
+                            </th>
+                        </tr>
+
+                        @endforeach
+                    </tbody>
+                </table>
+                {!! $devis->links() !!}
+
+
+            </div>
+
+
+        </div>
+    </div>
+</section>
+
+@endsection

+ 77 - 0
resources/views/backend/devis/show.blade.php

@@ -0,0 +1,77 @@
+@extends('layouts.idara.panel')
+
+
+@section('content')
+
+<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.3/jquery.min.js" integrity="sha512-STof4xm1wgkfm7heWqFJVn58Hm3EtS31XFaagaa8VMReCXAkQnJZ+jEy8PCC/iT18dFy95WcExNHFTqLyp72eQ==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
+
+<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-toggle/2.2.2/js/bootstrap-toggle.min.js" integrity="sha512-F636MAkMAhtTplahL9F6KmTfxTmYcAcjcCkyu0f0voT3N/6vzAuJ4Num55a0gEJ+hRLHhdz3vDvZpf6kqgEa5w==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
+
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-toggle/2.2.2/css/bootstrap-toggle.min.css" integrity="sha512-hievggED+/IcfxhYRSr4Auo1jbiOczpqpLZwfTVL/6hFACdbI3WQ8S9NCX50gsM9QVE+zLk/8wb9TlgriFbX+Q==" crossorigin="anonymous" referrerpolicy="no-referrer" />
+@include('backend.partials.import')
+
+
+<section class="presentationSection">
+    <div class="card">
+        <div class="card-header">
+            Reference
+        </div>
+        <div class="card-body">
+
+            <a href="<?php echo $_SERVER["REQUEST_URI"]; ?>" class="btn btn-secondary"><i class="fa-solid fa-arrows-rotate"></i>Actualiser</a>
+            <a href="javascript:history.back()" class="btn btn-primary">Retour</a>
+
+
+        </div>
+    </div>
+</section>
+
+<section>
+    <div class="card">
+        <h5 class="card-header">Demande de devis</h5>
+        <div class="card-body">
+
+            <div>
+                <strong>Nom :</strong> {{$devi->nom}}
+            </div>
+            <div>
+                <strong>Email :</strong> {{$devi->email}}
+            </div>
+
+            <div>
+                <strong>Telephone :</strong> {{$devi->telephone}}
+            </div>
+            <div>
+                <strong>Category :</strong> {{$devi->category}}
+            </div>
+            <div>
+                <strong>Lieu :</strong> {{$devi->lieu}}
+            </div>
+            <div>
+                <strong>Objet :</strong> {{$devi->objet}}
+            </div>
+            <div>
+                <strong>Message :</strong> {{$devi->message}}
+            </div>
+
+
+
+
+
+            <a href="javascript:history.back()" class="btn btn-primary">Retour</a>
+
+
+        </div>
+
+    </div>
+
+</section>
+
+<style>
+    div {
+        line-height: 60px;
+    }
+
+</style>
+
+@endsection

+ 317 - 22
resources/views/backend/partials/scriptIndex.blade.php

@@ -1,23 +1,318 @@
+<!DOCTYPE html>
+<html lang="en">
+    <head>
+        <meta charset="UTF-8">
+    </head>
+    <body>
+        <style>
+            #container {
+                width: 1000px;
+                margin: 20px auto;
+            }
+            .ck-editor__editable[role="textbox"] {
+                /* editing area */
+                min-height: 200px;
+            }
+            .ck-content .image {
+                /* block images */
+                max-width: 80%;
+                margin: 20px auto;
+            }
+        </style>
+       
+        <!--
+            The "super-build" of CKEditor 5 served via CDN contains a large set of plugins and multiple editor types.
+            See https://ckeditor.com/docs/ckeditor5/latest/installation/getting-started/quick-start.html#running-a-full-featured-editor-from-cdn
+        -->
+        <script src="https://cdn.ckeditor.com/ckeditor5/37.0.1/super-build/ckeditor.js"></script>
+        <!--
+            Uncomment to load the Spanish translation
+            <script src="https://cdn.ckeditor.com/ckeditor5/37.0.1/super-build/translations/es.js"></script>
+        -->
+        <script>
+            // This sample still does not showcase all CKEditor 5 features (!)
+            // Visit https://ckeditor.com/docs/ckeditor5/latest/features/index.html to browse all the features.
+            CKEDITOR.ClassicEditor.create(document.getElementById("presentation"), {
+                // https://ckeditor.com/docs/ckeditor5/latest/features/toolbar/toolbar.html#extended-toolbar-configuration-format
+                toolbar: {
+                    items: [
+                        'exportPDF','exportWord', '|',
+                        'findAndReplace', 'selectAll', '|',
+                        'heading', '|',
+                        'bold', 'italic', 'strikethrough', 'underline', 'code', 'subscript', 'superscript', 'removeFormat', '|',
+                        'bulletedList', 'numberedList', 'todoList', '|',
+                        'outdent', 'indent', '|',
+                        'undo', 'redo',
+                        '-',
+                        'fontSize', 'fontFamily', 'fontColor', 'fontBackgroundColor', 'highlight', '|',
+                        'alignment', '|',
+                        'link', 'insertImage', 'blockQuote', 'insertTable', 'mediaEmbed', 'codeBlock', 'htmlEmbed', '|',
+                        'specialCharacters', 'horizontalLine', 'pageBreak', '|',
+                        'textPartLanguage', '|',
+                        'sourceEditing'
+                    ],
+                    shouldNotGroupWhenFull: true
+                },
+                // Changing the language of the interface requires loading the language file using the <script> tag.
+                // language: 'es',
+                list: {
+                    properties: {
+                        styles: true,
+                        startIndex: true,
+                        reversed: true
+                    }
+                },
+                // https://ckeditor.com/docs/ckeditor5/latest/features/headings.html#configuration
+                heading: {
+                    options: [
+                        { model: 'paragraph', title: 'Paragraph', class: 'ck-heading_paragraph' },
+                        { model: 'heading1', view: 'h1', title: 'Heading 1', class: 'ck-heading_heading1' },
+                        { model: 'heading2', view: 'h2', title: 'Heading 2', class: 'ck-heading_heading2' },
+                        { model: 'heading3', view: 'h3', title: 'Heading 3', class: 'ck-heading_heading3' },
+                        { model: 'heading4', view: 'h4', title: 'Heading 4', class: 'ck-heading_heading4' },
+                        { model: 'heading5', view: 'h5', title: 'Heading 5', class: 'ck-heading_heading5' },
+                        { model: 'heading6', view: 'h6', title: 'Heading 6', class: 'ck-heading_heading6' }
+                    ]
+                },
+                // https://ckeditor.com/docs/ckeditor5/latest/features/editor-placeholder.html#using-the-editor-configuration
+                placeholder: 'Welcome to CKEditor 5!',
+                // https://ckeditor.com/docs/ckeditor5/latest/features/font.html#configuring-the-font-family-feature
+                fontFamily: {
+                    options: [
+                        'default',
+                        'Arial, Helvetica, sans-serif',
+                        'Courier New, Courier, monospace',
+                        'Georgia, serif',
+                        'Lucida Sans Unicode, Lucida Grande, sans-serif',
+                        'Tahoma, Geneva, sans-serif',
+                        'Times New Roman, Times, serif',
+                        'Trebuchet MS, Helvetica, sans-serif',
+                        'Verdana, Geneva, sans-serif'
+                    ],
+                    supportAllValues: true
+                },
+                // https://ckeditor.com/docs/ckeditor5/latest/features/font.html#configuring-the-font-size-feature
+                fontSize: {
+                    options: [ 10, 12, 14, 'default', 18, 20, 22 ],
+                    supportAllValues: true
+                },
+                // Be careful with the setting below. It instructs CKEditor to accept ALL HTML markup.
+                // https://ckeditor.com/docs/ckeditor5/latest/features/general-html-support.html#enabling-all-html-features
+                htmlSupport: {
+                    allow: [
+                        {
+                            name: /.*/,
+                            attributes: true,
+                            classes: true,
+                            styles: true
+                        }
+                    ]
+                },
+                // Be careful with enabling previews
+                // https://ckeditor.com/docs/ckeditor5/latest/features/html-embed.html#content-previews
+                htmlEmbed: {
+                    showPreviews: true
+                },
+                // https://ckeditor.com/docs/ckeditor5/latest/features/link.html#custom-link-attributes-decorators
+                link: {
+                    decorators: {
+                        addTargetToExternalLinks: true,
+                        defaultProtocol: 'https://',
+                        toggleDownloadable: {
+                            mode: 'manual',
+                            label: 'Downloadable',
+                            attributes: {
+                                download: 'file'
+                            }
+                        }
+                    }
+                },
+                // https://ckeditor.com/docs/ckeditor5/latest/features/mentions.html#configuration
+                mention: {
+                    feeds: [
+                        {
+                            marker: '@',
+                            feed: [
+                                '@apple', '@bears', '@brownie', '@cake', '@cake', '@candy', '@canes', '@chocolate', '@cookie', '@cotton', '@cream',
+                                '@cupcake', '@danish', '@donut', '@dragée', '@fruitcake', '@gingerbread', '@gummi', '@ice', '@jelly-o',
+                                '@liquorice', '@macaroon', '@marzipan', '@oat', '@pie', '@plum', '@pudding', '@sesame', '@snaps', '@soufflé',
+                                '@sugar', '@sweet', '@topping', '@wafer'
+                            ],
+                            minimumCharacters: 1
+                        }
+                    ]
+                },
+                // The "super-build" contains more premium features that require additional configuration, disable them below.
+                // Do not turn them on unless you read the documentation and know how to configure them and setup the editor.
+                removePlugins: [
+                    // These two are commercial, but you can try them out without registering to a trial.
+                    // 'ExportPdf',
+                    // 'ExportWord',
+                    'CKBox',
+                    'CKFinder',
+                    'EasyImage',
+                    // This sample uses the Base64UploadAdapter to handle image uploads as it requires no configuration.
+                    // https://ckeditor.com/docs/ckeditor5/latest/features/images/image-upload/base64-upload-adapter.html
+                    // Storing images as Base64 is usually a very bad idea.
+                    // Replace it on production website with other solutions:
+                    // https://ckeditor.com/docs/ckeditor5/latest/features/images/image-upload/image-upload.html
+                    // 'Base64UploadAdapter',
+                    'RealTimeCollaborativeComments',
+                    'RealTimeCollaborativeTrackChanges',
+                    'RealTimeCollaborativeRevisionHistory',
+                    'PresenceList',
+                    'Comments',
+                    'TrackChanges',
+                    'TrackChangesData',
+                    'RevisionHistory',
+                    'Pagination',
+                    'WProofreader',
+                    // Careful, with the Mathtype plugin CKEditor will not load when loading this sample
+                    // from a local file system (file://) - load this site via HTTP server if you enable MathType
+                    'MathType'
+                ]
+            });
 
-
-
-<script src="https://cdn.ckeditor.com/ckeditor5/36.0.0/classic/ckeditor.js"></script>
-<script>
-    ClassicEditor
-    
-        .create(document.querySelector('#presentation'))
-        .then(editor => {
-            window.editor = editor;
-        })
-        .catch(error => {
-            console.error('There was a problem initializing the editor.', error);
-        });
-        ClassicEditor
-        .create(document.querySelector('#details'))
-        .then(editor => {
-            window.editor = editor;
-        })
-        .catch(error => {
-            console.error('There was a problem initializing the editor.', error);
-        });
-</script>
+            CKEDITOR.ClassicEditor.create(document.getElementById("details"), {
+                // https://ckeditor.com/docs/ckeditor5/latest/features/toolbar/toolbar.html#extended-toolbar-configuration-format
+                toolbar: {
+                    items: [
+                        'exportPDF','exportWord', '|',
+                        'findAndReplace', 'selectAll', '|',
+                        'heading', '|',
+                        'bold', 'italic', 'strikethrough', 'underline', 'code', 'subscript', 'superscript', 'removeFormat', '|',
+                        'bulletedList', 'numberedList', 'todoList', '|',
+                        'outdent', 'indent', '|',
+                        'undo', 'redo',
+                        '-',
+                        'fontSize', 'fontFamily', 'fontColor', 'fontBackgroundColor', 'highlight', '|',
+                        'alignment', '|',
+                        'link', 'insertImage', 'blockQuote', 'insertTable', 'mediaEmbed', 'codeBlock', 'htmlEmbed', '|',
+                        'specialCharacters', 'horizontalLine', 'pageBreak', '|',
+                        'textPartLanguage', '|',
+                        'sourceEditing'
+                    ],
+                    shouldNotGroupWhenFull: true
+                },
+                // Changing the language of the interface requires loading the language file using the <script> tag.
+                // language: 'es',
+                list: {
+                    properties: {
+                        styles: true,
+                        startIndex: true,
+                        reversed: true
+                    }
+                },
+                // https://ckeditor.com/docs/ckeditor5/latest/features/headings.html#configuration
+                heading: {
+                    options: [
+                        { model: 'paragraph', title: 'Paragraph', class: 'ck-heading_paragraph' },
+                        { model: 'heading1', view: 'h1', title: 'Heading 1', class: 'ck-heading_heading1' },
+                        { model: 'heading2', view: 'h2', title: 'Heading 2', class: 'ck-heading_heading2' },
+                        { model: 'heading3', view: 'h3', title: 'Heading 3', class: 'ck-heading_heading3' },
+                        { model: 'heading4', view: 'h4', title: 'Heading 4', class: 'ck-heading_heading4' },
+                        { model: 'heading5', view: 'h5', title: 'Heading 5', class: 'ck-heading_heading5' },
+                        { model: 'heading6', view: 'h6', title: 'Heading 6', class: 'ck-heading_heading6' }
+                    ]
+                },
+                // https://ckeditor.com/docs/ckeditor5/latest/features/editor-placeholder.html#using-the-editor-configuration
+                placeholder: 'Welcome to CKEditor 5!',
+                // https://ckeditor.com/docs/ckeditor5/latest/features/font.html#configuring-the-font-family-feature
+                fontFamily: {
+                    options: [
+                        'default',
+                        'Arial, Helvetica, sans-serif',
+                        'Courier New, Courier, monospace',
+                        'Georgia, serif',
+                        'Lucida Sans Unicode, Lucida Grande, sans-serif',
+                        'Tahoma, Geneva, sans-serif',
+                        'Times New Roman, Times, serif',
+                        'Trebuchet MS, Helvetica, sans-serif',
+                        'Verdana, Geneva, sans-serif'
+                    ],
+                    supportAllValues: true
+                },
+                // https://ckeditor.com/docs/ckeditor5/latest/features/font.html#configuring-the-font-size-feature
+                fontSize: {
+                    options: [ 10, 12, 14, 'default', 18, 20, 22 ],
+                    supportAllValues: true
+                },
+                // Be careful with the setting below. It instructs CKEditor to accept ALL HTML markup.
+                // https://ckeditor.com/docs/ckeditor5/latest/features/general-html-support.html#enabling-all-html-features
+                htmlSupport: {
+                    allow: [
+                        {
+                            name: /.*/,
+                            attributes: true,
+                            classes: true,
+                            styles: true
+                        }
+                    ]
+                },
+                // Be careful with enabling previews
+                // https://ckeditor.com/docs/ckeditor5/latest/features/html-embed.html#content-previews
+                htmlEmbed: {
+                    showPreviews: true
+                },
+                // https://ckeditor.com/docs/ckeditor5/latest/features/link.html#custom-link-attributes-decorators
+                link: {
+                    decorators: {
+                        addTargetToExternalLinks: true,
+                        defaultProtocol: 'https://',
+                        toggleDownloadable: {
+                            mode: 'manual',
+                            label: 'Downloadable',
+                            attributes: {
+                                download: 'file'
+                            }
+                        }
+                    }
+                },
+                // https://ckeditor.com/docs/ckeditor5/latest/features/mentions.html#configuration
+                mention: {
+                    feeds: [
+                        {
+                            marker: '@',
+                            feed: [
+                                '@apple', '@bears', '@brownie', '@cake', '@cake', '@candy', '@canes', '@chocolate', '@cookie', '@cotton', '@cream',
+                                '@cupcake', '@danish', '@donut', '@dragée', '@fruitcake', '@gingerbread', '@gummi', '@ice', '@jelly-o',
+                                '@liquorice', '@macaroon', '@marzipan', '@oat', '@pie', '@plum', '@pudding', '@sesame', '@snaps', '@soufflé',
+                                '@sugar', '@sweet', '@topping', '@wafer'
+                            ],
+                            minimumCharacters: 1
+                        }
+                    ]
+                },
+                // The "super-build" contains more premium features that require additional configuration, disable them below.
+                // Do not turn them on unless you read the documentation and know how to configure them and setup the editor.
+                removePlugins: [
+                    // These two are commercial, but you can try them out without registering to a trial.
+                    // 'ExportPdf',
+                    // 'ExportWord',
+                    'CKBox',
+                    'CKFinder',
+                    'EasyImage',
+                    // This sample uses the Base64UploadAdapter to handle image uploads as it requires no configuration.
+                    // https://ckeditor.com/docs/ckeditor5/latest/features/images/image-upload/base64-upload-adapter.html
+                    // Storing images as Base64 is usually a very bad idea.
+                    // Replace it on production website with other solutions:
+                    // https://ckeditor.com/docs/ckeditor5/latest/features/images/image-upload/image-upload.html
+                    // 'Base64UploadAdapter',
+                    'RealTimeCollaborativeComments',
+                    'RealTimeCollaborativeTrackChanges',
+                    'RealTimeCollaborativeRevisionHistory',
+                    'PresenceList',
+                    'Comments',
+                    'TrackChanges',
+                    'TrackChangesData',
+                    'RevisionHistory',
+                    'Pagination',
+                    'WProofreader',
+                    // Careful, with the Mathtype plugin CKEditor will not load when loading this sample
+                    // from a local file system (file://) - load this site via HTTP server if you enable MathType
+                    'MathType'
+                ]
+            });
+        </script>
+    </body>
+</html>

+ 59 - 34
resources/views/backend/presentation/add.blade.php

@@ -3,64 +3,89 @@
 
 @section('content')
 
-@include('backend.partials.import')
+    @include('backend.partials.import')
 
-@include('backend.partials.features')
+    @include('backend.partials.features')
 
+    <form action="{{ route('presentation') }}" method="post">
+        <section>
+            <div class="card mt-4">
+                <h5 class="card-header">Présentation Tifawt</h5>
+                <div class="card-body">
+                    @if (count($errors) > 0)
+                        <div class="alert alert-danger">
+                            <strong>Whoops!</strong> Some problems with your input.<br><br>
+                            <ul>
+                                @foreach ($errors->all() as $error)
+                                    <li>{{ $error }}</li>
+                                @endforeach
+                            </ul>
+                        </div>
+                    @endif
 
-    <section>
-        <div class="card mt-4">
-            <h5 class="card-header">Présentation Tifawt</h5>
-            <div class="card-body">
-                @if (count($errors) > 0)
-                <div class="alert alert-danger">
-                    <strong>Whoops!</strong> Some problems with your input.<br><br>
-                    <ul>
-                        @foreach ($errors->all() as $error)
-                        <li>{{ $error }}</li>
-                        @endforeach
-                    </ul>
-                </div>
-                @endif
 
-                <form action="{{route('presentation')}}" method="post">
 
                     @csrf
                     <div class="form-group">
-                        <label for="exampleFormControlInput1"><strong>Titre de la présentation</strong></label>
+                        <label for="exampleFormControlInput1" class="mb-3"><strong>Titre de la présentation</strong></label>
 
-                        <input type="text" class="form-control" id="titre" name="titre" placeholder="titre" value="{{old('titre')}}" required>
+                        <input type="text" class="form-control" id="titre" name="titre" placeholder="titre"
+                            value="{{ old('titre') }}" required>
                     </div>
 
                     <div class="form-group mt-4">
-                        <label for="exampleFormControlTextarea1"><strong>Resume</strong></label>
-                        <textarea class="form-control" id="presentation" name="texte" rows="6" value="{{old('texte')}}"></textarea>
+                        <label for="exampleFormControlTextarea1" class="mb-3"><strong>Resume</strong></label>
+                        <textarea class="form-control" id="presentation" name="texte" rows="6" value="{{ old('texte') }}"></textarea>
                     </div>
 
 
+                </div>
+            </div>
+        </section>
 
-                    <div class="form-group mt-4 add">
 
-                        <button type="submit" class="btn btn-primary" value="Ajouter">Ajouter</button>
+        <div class="card mt-4">
+            <div class="card-header">
+                Réferencement
+            </div>
+            <div class="card-body">
+                <div class="form-group">
+                    <label for="exampleFormControlInput1" class="mb-3"><strong>Titre(SEO)</strong></label>
 
-                    </div>
+                    <input type="text" class="form-control"  name="titre_seo" placeholder="..."
+                        value="{{ old('titre_seo') }}">
+                </div>
+                <div class="form-group mt-4">
+                    <label for="exampleFormControlInput1" class="mb-3"><strong>Resume(SEO)</strong></label>
+                      <textarea name="resume_seo" id=""  style="width: 100%" rows="10" value="{{ old('resume_seo') }}"></textarea>
+
+                </div>
+
+                <div class="form-group mt-4">
+                    <label for="exampleFormControlInput1" class="mb-3"><strong>Mot clé (SEO)</strong></label>
 
+                    <input type="text" class="form-control"  name="mot_cle" placeholder="..."
+                        value="{{ old('mot_cle') }}">
+                </div>
 
-                </form>
             </div>
         </div>
-    </section>
 
-</div>
+        <div class="form-group mt-4 add" style="text-align:end">
+
+            <button type="submit" class="btn btn-success" value="Ajouter">Ajouter</button>
+
+        </div>
+    </form>
 
-<style>
-    .ck.ck-editor__main>.ck-editor__editable:not(.ck-focused) {
-        border-color: var(--ck-color-base-border);
-        height: 300px;
-    }
 
-</style>
-@include('backend.partials.scriptIndex')
+    <style>
+        .ck.ck-editor__main>.ck-editor__editable:not(.ck-focused) {
+            border-color: var(--ck-color-base-border);
+            height: 300px;
+        }
+    </style>
+    @include('backend.partials.scriptIndex')
 
 
 @endsection

+ 43 - 11
resources/views/backend/presentation/edit.blade.php

@@ -7,10 +7,12 @@
 @include('backend.partials.import')
 
 
-<div class="container"> 
+<div class="container">
 
     @include('backend.partials.features')
-
+    <form action="{{url('presentation/'.$article->id)}}" method="post">
+        <input type="hidden" name="_method" value="PUT">
+        @csrf
     <div class="card  mt-4">
         <h5 class="card-header">Modifier la présentation</h5>
         <div class="card-body">
@@ -29,9 +31,7 @@
                 </ul>
             </div>
             @endif
-            <form action="{{url('presentation/'.$article->id)}}" method="post">
-                <input type="hidden" name="_method" value="PUT">
-                @csrf
+
                 <div class="form-group">
                     <label for="exampleFormControlInput1"><strong>Titre :</strong> </label>
                     <input type="text" class="form-control" name="titre" placeholder="titre" value="{{$article->titre}}" required>
@@ -46,14 +46,46 @@
                     <label for="exampleFormControlTextarea1"><strong>Détails :</strong></label>
                     <textarea class="form-control" id="details" name="details" rows="3">{!! html_entity_decode   ($article->details)!!}</textarea>
                 </div>
-                
-                <div class="form-group add mt-4">
-                    <button type="submit" class="btn btn-danger" value="">Modifier</button>
 
-                </div>
-            </form>
+
+        </div>
+    </div>
+
+    <div class="card mt-4">
+        <div class="card-header">
+            Réferencement
+        </div>
+        <div class="card-body">
+            <div class="form-group">
+                <label for="exampleFormControlInput1" class="mb-3"><strong>Titre(SEO)</strong></label>
+
+                <input type="text" class="form-control"  name="titre_seo" placeholder="..."
+                    value="{{$article->titre_seo}}">
+            </div>
+            <div class="form-group mt-4">
+                <label for="exampleFormControlInput1" class="mb-3"><strong>Resume(SEO)</strong></label>
+
+                <textarea name="resume_seo" id="" style="width: 100%" rows="10" value="">{!!$article->resume_seo!!}</textarea>
+
+            </div>
+
+            <div class="form-group mt-4">
+                <label for="exampleFormControlInput1" class="mb-3"><strong>Mot clé (SEO)</strong></label>
+
+                <input type="text" class="form-control"  name="mot_cle" placeholder="..."
+                    value="{{$article->mot_cle}}">
+            </div>
+
         </div>
     </div>
+
+    <div class="form-group add mt-4" style="text-align:end">
+        <button type="submit" class="btn btn-danger" value="">Modifier</button>
+
+    </div>
+
+</form>
+
 </div>
 
 <style>
@@ -71,7 +103,7 @@
 
     }
 
-    
+
 
     .ck.ck-editor__main>.ck-editor__editable:not(.ck-focused) {
         border-color: var(--ck-color-base-border);

+ 2 - 11
resources/views/backend/presentation/extensions/details.blade.php

@@ -65,16 +65,7 @@
 
 </style>
 <script src="https://cdn.ckeditor.com/ckeditor5/36.0.0/classic/ckeditor.js"></script>
-<script>
-    ClassicEditor
-        .create(document.querySelector('#presentation'))
-        .then(editor => {
-            window.editor = editor;
-        })
-        .catch(error => {
-            console.error('There was a problem initializing the editor.', error);
-        });
-
-</script>
+@include('backend.partials.scriptIndex')
+
 
 @endsection

+ 8 - 12
resources/views/backend/presentation/extensions/videos.blade.php

@@ -29,7 +29,7 @@
             Featured
         </div>
         <div class="card-body">
-            <h5 class="card-title">Vous pouvez ajouter une image ou la modifier</h5>
+            <h5 class="card-title">Ajouter une vidéo</h5>
 
             <div class="container">
                 @if(session('success'))
@@ -53,22 +53,18 @@
 
                     @csrf
                     <div class="row">
-                        <div class="col-md-4"></div>
-                        <div class="form-group col-md-4">
-                            <input type="file" name="videos" id="profile_image" onchange="loadPreview(this);" class="form-control">
-
-                            <label for="profile_image"></label>
-                            <img id="preview_img" src="https://w3adda.com/wp-content/uploads/2019/09/No_Image-128.png" class="" width="200" height="150" />
 
+                        <div class="form-group mt-4">
+                            <input type="file" name="videos" id="profile_image" class="form-control">
 
                         </div>
                     </div>
-                    <div class="row">
-                        <div class="col-md-4"></div>
-                        <div class="form-group col-md-4">
-                            <button type="submit" class="btn btn-success" style="margin-top:10px">Upload Image</button>
+
+
+                        <div class="form-group d-flex justify-content-end">
+                            <button type="submit" class="btn btn-success" style="margin-top:10px">Upload</button>
                         </div>
-                    </div>
+
 
                 </form>
             </div>

+ 26 - 5
resources/views/backend/presentation/show.blade.php

@@ -30,7 +30,7 @@
                                     <i class="fa fa-gears"></i> Actions
                                 </button>
                                 <ul class="dropdown-menu">
-                                    <a href="{{url('/clean')}}">
+                                    <a href="{{route('tifawt.index')}}">
                                         <li><button class="dropdown-item" type="button"><i class="fas fa-eye" aria-hidden="true"></i> Visualiser</button></li>
 
                                     </a>
@@ -51,9 +51,9 @@
                                     <a href="{{route('presentation.editImage', ['id'=> $article])}}">
                                         <li><button class="dropdown-item" type="button"> <i class="fa fa-camera"></i> image</button></li>
                                     </a>
-                                    {{-- <a href="{{url('presentations/'.$article->id.'/editVideo')}}">
+                                    <a href="{{url('presentations/'.$article->id.'/editVideo')}}">
                                         <li><button class="dropdown-item" type="button"> <i class="fa fa-camera"></i> Video</button></li>
-                                    </a> --}}
+                                    </a>
                                     <a href="{{route('presentation.editDetails', ['id'=> $article])}}">
                                         <li><button class="dropdown-item" type="button"> <i class="fa fa-camera"></i> Details</button></li>
                                     </a>
@@ -72,6 +72,7 @@
 
                     <br>
                     <div> {!! html_entity_decode ($article->texte)!!}</div>
+                    <div class="mt-4">  <strong>Détails : </strong> <div class="mt-4">{!! html_entity_decode ($article->details)!!}</div> </div>
 
                 </div>
             </div>
@@ -80,7 +81,7 @@
         </section>
         <section>
 
-            
+
             @if(empty($article->image))
 
             @else
@@ -99,7 +100,7 @@
                                 @method('DELETE')
                                 <input type="hidden" name="id" value="{{$article->id}}" />
                                 <button type="submit" class="btn btn-sm btn-secondary ml-2"><i class="fa-solid fa-x"></i></button>
-  
+
                             </form>
                         </Tooltip>
                     </div>
@@ -141,6 +142,26 @@
 
 </section>
 
+<div class="card mt-4">
+    <div class="card-header">
+        Optimisation pour les moteurs de recherche
+    </div>
+    <div class="card-body">
+        <div class="mt-4">  <strong>Titre ( SEO ): </strong> <div class="mt-2">{{$article->titre_seo}}</div> </div>
+        <div class="mt-4">  <strong>Resume ( SEO ): </strong> <div class="mt-2">{{$article->resume_seo}}</div> </div>
+        <div class="mt-4">  <strong>Mot clé ( SEO ): </strong> <div class="mt-2">{{$article->mot_cle}}</div> </div>
+
+
+    </div>
+</div>
+
+
+
     </div>
 
+    <style>
+        figure.image img{
+            width: 300px !important
+        }
+    </style>
     @endsection

+ 161 - 124
resources/views/backend/produit/add.blade.php

@@ -3,160 +3,198 @@
 
 @section('content')
 
-<link
-  rel="stylesheet"
-  href="https://cdnjs.cloudflare.com/ajax/libs/selectize.js/0.15.2/css/selectize.default.min.css""
-/>
-<link href="https://unpkg.com/filepond@4.30.4/dist/filepond.min.css" rel="stylesheet" type="text/css" />
-<link href="https://unpkg.com/filepond-plugin-file-poster@2.5.1/dist/filepond-plugin-file-poster.min.css" rel="stylesheet" type="text/css" />
+    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/selectize.js/0.15.2/css/selectize.default.min.css" />
+    <link href="https://unpkg.com/filepond@4.30.4/dist/filepond.min.css" rel="stylesheet" type="text/css" />
+    <link href="https://unpkg.com/filepond-plugin-file-poster@2.5.1/dist/filepond-plugin-file-poster.min.css" rel="stylesheet"
+        type="text/css" />
 
-<link href="{{asset('pintura/pintura.scss')}}" rel="stylesheet" />
+    <link href="{{ asset('pintura/pintura.scss') }}" rel="stylesheet" />
 
-<!-- Custom css -->
-<link href="{{asset('css/custom.css')}}" rel="stylesheet" />
+    <!-- Custom css -->
+    <link href="{{ asset('css/custom.css') }}" rel="stylesheet" />
 
-@include('backend.partials.import')
+    @include('backend.partials.import')
 
-@include('backend.partials.features')
-          
+    @include('backend.partials.features')
 
 
-    <div class="card mt-4">
-        <div class="card-header">
-        Vous pouvez ajouter un produit
-        </div>
-        <div class="card-body">
-            
 
-            <div class="container">
-                @if(session('success'))
-                <div class="alert alert-success">
-                    {{ session('success') }}
-                </div>
-                @endif
-                @if (count($errors) > 0)
-                <div class="alert alert-danger">
-                    <strong>Whoops!</strong> Some problems with your input.<br><br>
-                    <ul>
-                        @foreach ($errors->all() as $error)
-                        <li>{{ $error }}</li>
-                        @endforeach
-                    </ul>
-                </div>
-                @endif
+    <form method="post" action="{{ url('produit') }}" enctype="multipart/form-data">
+@csrf
+        <div class="card mt-4">
+            <div class="card-header">
+                Vous pouvez ajouter un produit
+            </div>
+            <div class="card-body">
 
-                <form method="post" action="{{url('produit')}}" enctype="multipart/form-data">
-                    
 
-                    @csrf
+                <div class="container">
+                    @if (session('success'))
+                        <div class="alert alert-success">
+                            {{ session('success') }}
+                        </div>
+                    @endif
+                    @if (count($errors) > 0)
+                        <div class="alert alert-danger">
+                            <strong>Whoops!</strong> Some problems with your input.<br><br>
+                            <ul>
+                                @foreach ($errors->all() as $error)
+                                    <li>{{ $error }}</li>
+                                @endforeach
+                            </ul>
+                        </div>
+                    @endif
+
+
+                    
                     <div class="row">
-                      
-                    <div class="form-group mt-4">
-                    <label for="exampleFormControlTextarea1"><strong>Nom du produit :</strong></label>
 
-                        <input type="text" class="form-control" id="" name="nom" placeholder="Nom" value="{{old('nom')}}" required>
-                    </div>
+                        <div class="form-group mt-4">
+                            <label for="exampleFormControlTextarea1"><strong>Nom du produit :</strong></label>
 
-                    <div class="form-group categorie mt-4" id="categorie">
+                            <input type="text" class="form-control" id="" name="nom" placeholder="Nom"
+                                value="{{ old('nom') }}" required>
+                        </div>
 
+                        <div class="form-group categorie mt-4" id="categorie">
 
-                        <label class="" for="exampleFormControlInput1"><strong>Categorie</strong> :</label>
-                        <br>
-                        <select multiple onchange="optionCheck()"  class="form-control" name="categories[]" id="categories" class=" select seletizeData categorie"    aria-describedby="validationServer04Feedback" style=" margin-bottom: 40px;" required>
 
+                            <label class="" for="exampleFormControlInput1"><strong>Categorie</strong> :</label>
+                            <br>
+                            <select multiple onchange="optionCheck()" class="form-control" name="categories[]"
+                                id="categories" class=" select seletizeData categorie"
+                                aria-describedby="validationServer04Feedback" style=" margin-bottom: 40px;" required>
 
-                        {{-- <option value=''></option> --}}
 
-                        @if(! empty(old('categories')))
-                            @foreach (old('categories') as $categorie)
+                                {{-- <option value=''></option> --}}
 
+                                @if (!empty(old('categories')))
+                                    @foreach (old('categories') as $categorie)
+                                        <option value="{{ $categorie }}" selected>
+                                            {{ $categories->where('id', $categorie)->first()->nom }}</option>
+                                    @endforeach
+                                @endif
+                                @foreach ($categories as $categorie)
+                                    <option value="{{ $categorie->id }}"
+                                        {{ old('categorie') == $categorie->id ? 'selected' : '' }}> {{ $categorie->nom }}
+                                    </option>
+                                @endforeach
 
-                                <option value="{{ $categorie }}" selected> {{ $categories->where('id', $categorie)->first()->nom }}</option>
-                        
-                            
-                            @endforeach
 
-                       @endif
-                            @foreach ($categories as $categorie)
+                            </select>
 
 
-                            <option value="{{ $categorie->id }}" {{ old('categorie') == $categorie->id  ? 'selected' : '' }}>   {{ $categorie->nom }}</option>
-                        
-                            
-                            @endforeach
-                
+                        </div>
 
-                        </select>
+                        <div class="form-group mt-4">
+                            <label for="exampleFormControlTextarea1"><strong>description :</strong></label>
+                            <textarea class="form-control" id="presentation" name="description" rows="6" value="">{{ old('description') }}</textarea>
+                        </div>
 
+                        <div class="input-group mt-4 control-group increment">
+                            <input type="file" name="image" class="my-pond form-control" required />
 
+                        </div>
                     </div>
 
-                    <div class="form-group mt-4">
-                        <label for="exampleFormControlTextarea1"><strong>description :</strong></label>
-                        <textarea class="form-control" id="presentation" name="description" rows="6" value="" >{{old('description')}}</textarea>
-                    </div>
 
-                    <div class="input-group mt-4 control-group increment" >
-                                 <input type="file" name="image" class="my-pond form-control" required/>
-                    
-                            </div>
-                    </div>
-                    
-                        <div class="form-group col-md-4 mt-4">
-                            <button type="submit" class="btn btn-success" style="margin-top:10px">Confirmer</button>
-                        </div>
-                    
 
-                </form>
+
+                </div>
             </div>
         </div>
-    </div>
 
-</div>
 
 
+        <div class="card mt-4">
+            <div class="card-header">
+                Réferencement
+            </div>
+            <div class="card-body">
+                <div class="form-group">
+                    <label for="exampleFormControlInput1" class="mb-3"><strong>Titre(SEO)</strong></label>
 
+                    <input type="text" class="form-control" name="titre_seo" placeholder="..."
+                        value="{{ old('titre_seo') }}">
+                </div>
+                <div class="form-group mt-4">
+                    <label for="exampleFormControlInput1" class="mb-3"><strong>description(SEO)</strong></label>
+                    <textarea name="resume_seo" id="" style="width: 100%" rows="10" value="{{ old('resume_seo') }}"></textarea>
 
-<style>
-    .ck.ck-editor__main>.ck-editor__editable:not(.ck-focused) {
-        border-color: var(--ck-color-base-border);
-        height: 300px;
-    }
+                </div>
 
-</style>
-@include('backend.partials.scriptIndex')
+                <div class="form-group mt-4">
+                    <label for="exampleFormControlInput1" class="mb-3"><strong>Mot clé (SEO)</strong></label>
 
+                    <input type="text" class="form-control" name="mot_cle" placeholder="..."
+                        value="{{ old('mot_cle') }}">
+                </div>
 
-<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.4/jquery.min.js" integrity="sha512-pumBsjNRGGqkPzKHndZMaAG+bir374sORyzM3uulLV14lN5LyykqNk8eEeUlUkB3U0M4FApyaHraT65ihJhDpQ==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
+            </div>
+        </div>
 
-<script src="https://cdnjs.cloudflare.com/ajax/libs/selectize.js/0.15.2/js/selectize.min.js"></script>
-<script src="https://unpkg.com/filepond@4.30.4/dist/filepond.min.js"></script>
-<script src="https://unpkg.com/filepond-plugin-file-poster@2.5.1/dist/filepond-plugin-file-poster.min.js"></script>
-<script src="https://unpkg.com/filepond-plugin-file-validate-type@1.2.8/dist/filepond-plugin-file-validate-type.min.js"></script>
-<script src="https://unpkg.com/filepond-plugin-file-validate-size@2.2.8/dist/filepond-plugin-file-validate-size.min.js"></script>
-<script src="https://unpkg.com/filepond-plugin-image-exif-orientation@1.0.11/dist/filepond-plugin-image-exif-orientation.min.js"></script>
+        <div class="form-group mt-4 add" style="text-align:end">
 
+            <button type="submit" class="btn btn-success" value="Ajouter">Ajouter</button>
 
+        </div>
 
+    </form>
 
-<script  type="module">
-     var  img_width = {{ env('IMG_HEIGHT') }} ;
-    var img_height = {{ env('IMG_HEIGHT') }};
-    var img_quality = {{ env('IMG_QUALITY') }};
-    var  img_ratio = {{ env('IMG_RATIO') }};
-    var  max_files  = {{ env('MAX_FILES') }};
-    var  max_file_size  = "{{ env('MAX_FILE_SIZE') }}B";
-    var  instant_upload = {{ env('INSTANT_UPLOAD') }};
+
+    <style>
+        .ck.ck-editor__main>.ck-editor__editable:not(.ck-focused) {
+            border-color: var(--ck-color-base-border);
+            height: 300px;
+        }
+    </style>
+    @include('backend.partials.scriptIndex')
+
+
+    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.4/jquery.min.js"
+        integrity="sha512-pumBsjNRGGqkPzKHndZMaAG+bir374sORyzM3uulLV14lN5LyykqNk8eEeUlUkB3U0M4FApyaHraT65ihJhDpQ=="
+        crossorigin="anonymous" referrerpolicy="no-referrer"></script>
+
+    <script src="https://cdnjs.cloudflare.com/ajax/libs/selectize.js/0.15.2/js/selectize.min.js"></script>
+    <script src="https://unpkg.com/filepond@4.30.4/dist/filepond.min.js"></script>
+    <script src="https://unpkg.com/filepond-plugin-file-poster@2.5.1/dist/filepond-plugin-file-poster.min.js"></script>
+    <script src="https://unpkg.com/filepond-plugin-file-validate-type@1.2.8/dist/filepond-plugin-file-validate-type.min.js">
+    </script>
+    <script src="https://unpkg.com/filepond-plugin-file-validate-size@2.2.8/dist/filepond-plugin-file-validate-size.min.js">
+    </script>
+    <script
+        src="https://unpkg.com/filepond-plugin-image-exif-orientation@1.0.11/dist/filepond-plugin-image-exif-orientation.min.js">
+    </script>
+
+
+
+
+    <script  type="module">
+    //     var  img_width = {{ env('IMG_WIDTH') }} ;
+    // var img_height = {{ env('IMG_HEIGHT') }};
+    // var img_quality = {{ env('IMG_QUALITY') }};
+    // var  img_ratio = {{ env('IMG_RATIO') }};
+    // var  max_files  = {{ env('MAX_FILES') }};
+    // var  max_file_size  = "{{ env('MAX_FILE_SIZE') }}B";
+    // var  instant_upload = {{ env('INSTANT_UPLOAD') }};
+    // var   pond_selector = '.my-pond';
+  var  img_width = {{ config('app.IMG_HEIGHT') }} ;
+    var img_height = {{ config('app.IMG_HEIGHT') }};
+    var img_quality = {{ config('app.IMG_QUALITY') }};
+    var  img_ratio = {{ config('app.IMG_RATIO') }};
+    var  max_files  = {{ config('app.MAX_FILES') }};
+    var  max_file_size  = "{{ config('app.MAX_FILE_SIZE') }}B";
+    var  instant_upload = {{ config('app.INSTANT_UPLOAD') }};
     var   pond_selector = '.my-pond';
 import {
         FilePondPluginImageEditor,
     } from '/filepond/filepond-plugin-image-editor/FilePondPluginImageEditor.js';
-	
+
 // import Pintura Image Editor modules
 import {
     // Image editor
 
-    
+
     openEditor,
     processImage,
     createDefaultImageReader,
@@ -173,9 +211,9 @@ import {
 // French
 import fr_FR from '/filepond/locale/fr-fr.js';
 
-  
 
-    
+
+
 FilePond.setOptions(fr_FR);
 
 // Register plugins
@@ -200,7 +238,7 @@ FilePond.create(document.querySelector(pond_selector), {
     dropOnPage: true,
     dropOnElement: true,
     instantUpload: instant_upload,
-    
+
     // FilePond Image Editor plugin properties
     imageEditor: {
         // Maps legacy data objects to new imageState objects (optional)
@@ -247,30 +285,29 @@ FilePond.create(document.querySelector(pond_selector), {
             server: {
                     process: '/file-upload-produit',
                     revert: '/file-delete-produit',
-                
+
                     headers:{
                         'X-CSRF-TOKEN': '{{ csrf_token() }}'}
-                    
+
                 },
             });
 
 </script>
 
 
-<script>
-    $(function () {
-      $("#categories").selectize({
-    plugins: ["remove_button"],
-    delimiter: ",",
-    persist: false,
-    create: function (input) {
-      return {
-          value: input,
-          text: input,
-      };
-    },
-  });
-    });
-   
-  </script>
-@endsection
+    <script>
+        $(function() {
+            $("#categories").selectize({
+                plugins: ["remove_button"],
+                delimiter: ",",
+                persist: false,
+                create: function(input) {
+                    return {
+                        value: input,
+                        text: input,
+                    };
+                },
+            });
+        });
+    </script>
+@endsection

+ 142 - 105
resources/views/backend/produit/edit.blade.php

@@ -2,128 +2,166 @@
 
 
 @section('content')
-<link
-  rel="stylesheet"
-  href="https://cdnjs.cloudflare.com/ajax/libs/selectize.js/0.15.2/css/selectize.default.min.css""
-/>
-<link href="https://unpkg.com/filepond@4.30.4/dist/filepond.min.css" rel="stylesheet" type="text/css" />
-<link href="https://unpkg.com/filepond-plugin-file-poster@2.5.1/dist/filepond-plugin-file-poster.min.css" rel="stylesheet" type="text/css" />
-
-<link href="{{asset('pintura/pintura.scss')}}" rel="stylesheet" />
-
-<!-- Custom css -->
-<link href="{{asset('css/custom.css')}}" rel="stylesheet" />
-<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/css/bootstrap.min.css" integrity="sha384-rbsA2VBKQhggwzxH7pPCaAqO46MgnOM80zW1RWuH61DGLwZJEdK2Kadq2F9CUG65" crossorigin="anonymous">
-
-
-<div class="container">
-    @include('backend.partials.features')
-    <div class="card mt-4">
-        <h5 class="card-header">Modifier</h5>
-        <div class="card-body">
-            <form action="{{url('produit/'.$article->id)}}" method="post" enctype="multipart/form-data">
-                <input type="hidden" name="_method" value="PUT">
-                @csrf
-                <div class="form-group">
-                    <label for="exampleFormControlInput1"><strong>Nom : </strong></label>
-                    <input type="text" class="form-control" name="nom" placeholder="" value="{{$article->nom}}" required>
-                </div>
+    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/selectize.js/0.15.2/css/selectize.default.min.css"" />
+    <link href="https://unpkg.com/filepond@4.30.4/dist/filepond.min.css" rel="stylesheet" type="text/css" />
+    <link href="https://unpkg.com/filepond-plugin-file-poster@2.5.1/dist/filepond-plugin-file-poster.min.css" rel="stylesheet"
+        type="text/css" />
+
+    <link href="{{ asset('pintura/pintura.scss') }}" rel="stylesheet" />
+
+    <!-- Custom css -->
+    <link href="{{ asset('css/custom.css') }}" rel="stylesheet" />
+    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/css/bootstrap.min.css"
+        integrity="sha384-rbsA2VBKQhggwzxH7pPCaAqO46MgnOM80zW1RWuH61DGLwZJEdK2Kadq2F9CUG65" crossorigin="anonymous">
+
+    <form action="{{ url('produit/' . $article->id) }}" method="post" enctype="multipart/form-data">
+         <input type="hidden" name="_method" value="PUT">
+                    @csrf
+        <div class="container">
+            @include('backend.partials.features')
+            <div class="card mt-4">
+                <h5 class="card-header">Modifier</h5>
+                <div class="card-body">
+
 
+                    <div class="form-group">
+                        <label for="exampleFormControlInput1"><strong>Nom : </strong></label>
+                        <input type="text" class="form-control" name="nom" placeholder="" value="{{ $article->nom }}"
+                            required>
+                    </div>
 
-                <div class="form-group mt-4">
-                    <label for="exampleFormControlInput1"><strong>Categorie : </strong></label>
-                <select multiple onchange="optionCheck()" class="form-control" name="categories[]" id="categories" class="categorie" aria-describedby="validationServer04Feedback" style=" margin-bottom: 40px;" required>
 
-                           @foreach ($article->categories as $singleTag)
-                           
-                               
-                                <option value="" selected>  {{ $singleTag->nom }}</option> 
-                           @endforeach
+                    <div class="form-group mt-4">
+                        <label for="exampleFormControlInput1"><strong>Categorie : </strong></label>
+                        <select multiple onchange="optionCheck()" class="form-control" name="categories[]" id="categories"
+                            class="categorie" aria-describedby="validationServer04Feedback" style=" margin-bottom: 40px;"
+                            required>
 
+                            @foreach ($article->categories as $singleTag)
+                                <option value="" selected> {{ $singleTag->nom }}</option>
+                            @endforeach
 
-                          
 
 
-                              @foreach ($categories as $categorie)
-            
-                              @if($article->categories->contains($categorie->id) )
-                              <option value="{{ $categorie->id }}" selected>  {{ $categorie->nom }}</option> 
+
+
+                            @foreach ($categories as $categorie)
+                                @if ($article->categories->contains($categorie->id))
+                                    <option value="{{ $categorie->id }}" selected> {{ $categorie->nom }}</option>
                                 @else
-                          <option value="{{ $categorie->id }}" {{ old('categorie') == $categorie->id  ? 'selected' : '' }}>{{ $categorie->nom }}</option>
+                                    <option value="{{ $categorie->id }}"
+                                        {{ old('categorie') == $categorie->id ? 'selected' : '' }}>{{ $categorie->nom }}
+                                    </option>
+                                @endif
+                            @endforeach
+
+
+                        </select>
+                    </div>
+
+                    <div class="form-group  mt-4">
+
+                        <label for="exampleFormControlTextarea1"><strong>description : </strong></label>
+                        <textarea class="form-control" id="presentation" name="description" rows="3">{!! html_entity_decode($article->description) !!}</textarea>
+
+                    </div>
+
+                    <div class="form-group  mt-4">
+                        <label for="exampleFormControlInput1"><strong> image : </strong></label>
+
+                        <div class="input-group mt-4 control-group increment">
+                            <input type="file" name="image" class="my-pond form-control " />
+
+                        </div>
+                        <img src="{{ asset('storage/image/' . $article->image) }} " style="width:200px"
+                            alt="description of myimage">
+
+                    </div>
 
-                                 @endif
-                             @endforeach
 
 
-                </select>
                 </div>
+            </div>
 
-                <div class="form-group  mt-4">
-                   
-                <label for="exampleFormControlTextarea1"><strong>description : </strong></label>
-                <textarea class="form-control" id="presentation" name="description" rows="3">{!! html_entity_decode   ($article->description)!!}</textarea>
-            
+            <div class="card mt-4">
+                <div class="card-header">
+                    Réferencement
                 </div>
+                <div class="card-body">
+                    <div class="form-group">
+                        <label for="exampleFormControlInput1" class="mb-3"><strong>Titre(SEO)</strong></label>
 
-                <div class="form-group  mt-4">
-                <label for="exampleFormControlInput1"><strong> image : </strong></label>
-                
-                <div class="input-group mt-4 control-group increment" >
-                                 <input type="file" name="image" class="my-pond form-control " />
-                    
-                            </div>
-                        <img src="{{ asset('storage/image/'.$article->image) }} " style="width:200px" alt="description of myimage">
+                        <input type="text" class="form-control"  name="titre_seo" placeholder="..."
+                            value="{{$article->titre_seo}}">
+                    </div>
+                    <div class="form-group mt-4">
+                        <label for="exampleFormControlInput1" class="mb-3"><strong>Description(SEO)</strong></label>
 
-            </div>
+                        <textarea name="resume_seo" id="" style="width: 100%" rows="10" value="">{!!$article->resume_seo!!}</textarea>
+
+                    </div>
 
-                <div class="form-group add mt-4">
-                    <button type="submit" class="btn btn-primary" value="">Modifier</button>
+                    <div class="form-group mt-4">
+                        <label for="exampleFormControlInput1" class="mb-3"><strong>Mot clé (SEO)</strong></label>
+
+                        <input type="text" class="form-control"  name="mot_cle" placeholder="..."
+                            value="{{$article->mot_cle}}">
+                    </div>
 
                 </div>
-            </form>
-        </div>
-    </div>
-</div>
+            </div>
+
+            <div class="form-group add mt-4" style="text-align:end">
+                <button type="submit" class="btn btn-danger" value="">Modifier</button>
+
+            </div>
 
+        </div>
 
 
+    </form>
 
 
 
-<style>
-    .ck.ck-editor__main>.ck-editor__editable:not(.ck-focused) {
-        border-color: var(--ck-color-base-border);
-        height: 300px;
-    }
-</style>    
-
-@include('backend.partials.scriptIndex')
-
-<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.4/jquery.min.js" integrity="sha512-pumBsjNRGGqkPzKHndZMaAG+bir374sORyzM3uulLV14lN5LyykqNk8eEeUlUkB3U0M4FApyaHraT65ihJhDpQ==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
-<script src="https://cdnjs.cloudflare.com/ajax/libs/selectize.js/0.15.2/js/selectize.min.js"></script>
-<script src="https://unpkg.com/filepond@4.30.4/dist/filepond.min.js"></script>
-<script src="https://unpkg.com/filepond-plugin-file-poster@2.5.1/dist/filepond-plugin-file-poster.min.js"></script>
-<script src="https://unpkg.com/filepond-plugin-file-validate-type@1.2.8/dist/filepond-plugin-file-validate-type.min.js"></script>
-<script src="https://unpkg.com/filepond-plugin-file-validate-size@2.2.8/dist/filepond-plugin-file-validate-size.min.js"></script>
-<script src="https://unpkg.com/filepond-plugin-image-exif-orientation@1.0.11/dist/filepond-plugin-image-exif-orientation.min.js"></script>
-
-<script>
-    $(function () {
-      $("#categories").selectize({
-    plugins: ["remove_button"],
-    delimiter: ",",
-    persist: false,
-    create: function (input) {
-      return {
-          value: input,
-          text: input,
-      };
-    },
-  });
-    });
-   
-  </script>
-<script  type="module">
+    <style>
+        .ck.ck-editor__main>.ck-editor__editable:not(.ck-focused) {
+            border-color: var(--ck-color-base-border);
+            height: 300px;
+        }
+    </style>
+
+    @include('backend.partials.scriptIndex')
+
+    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.4/jquery.min.js"
+        integrity="sha512-pumBsjNRGGqkPzKHndZMaAG+bir374sORyzM3uulLV14lN5LyykqNk8eEeUlUkB3U0M4FApyaHraT65ihJhDpQ=="
+        crossorigin="anonymous" referrerpolicy="no-referrer"></script>
+    <script src="https://cdnjs.cloudflare.com/ajax/libs/selectize.js/0.15.2/js/selectize.min.js"></script>
+    <script src="https://unpkg.com/filepond@4.30.4/dist/filepond.min.js"></script>
+    <script src="https://unpkg.com/filepond-plugin-file-poster@2.5.1/dist/filepond-plugin-file-poster.min.js"></script>
+    <script src="https://unpkg.com/filepond-plugin-file-validate-type@1.2.8/dist/filepond-plugin-file-validate-type.min.js">
+    </script>
+    <script src="https://unpkg.com/filepond-plugin-file-validate-size@2.2.8/dist/filepond-plugin-file-validate-size.min.js">
+    </script>
+    <script
+        src="https://unpkg.com/filepond-plugin-image-exif-orientation@1.0.11/dist/filepond-plugin-image-exif-orientation.min.js">
+    </script>
+
+    <script>
+        $(function() {
+            $("#categories").selectize({
+                plugins: ["remove_button"],
+                delimiter: ",",
+                persist: false,
+                create: function(input) {
+                    return {
+                        value: input,
+                        text: input,
+                    };
+                },
+            });
+        });
+    </script>
+    <script  type="module">
 var  img_width = {{ config('app.IMG_HEIGHT') }} ;
     var img_height = {{ config('app.IMG_HEIGHT') }};
     var img_quality = {{ config('app.IMG_QUALITY') }};
@@ -135,12 +173,12 @@ var  img_width = {{ config('app.IMG_HEIGHT') }} ;
 import {
         FilePondPluginImageEditor,
     } from '/filepond/filepond-plugin-image-editor/FilePondPluginImageEditor.js';
-	
+
 // import Pintura Image Editor modules
 import {
     // Image editor
 
-    
+
     openEditor,
     processImage,
     createDefaultImageReader,
@@ -157,9 +195,9 @@ import {
 // French
 import fr_FR from '/filepond/locale/fr-fr.js';
 
-  
 
-    
+
+
 FilePond.setOptions(fr_FR);
 
 // Register plugins
@@ -184,7 +222,7 @@ FilePond.create(document.querySelector(pond_selector), {
     dropOnPage: true,
     dropOnElement: true,
     instantUpload: instant_upload,
-    
+
     // FilePond Image Editor plugin properties
     imageEditor: {
         // Maps legacy data objects to new imageState objects (optional)
@@ -231,13 +269,12 @@ FilePond.create(document.querySelector(pond_selector), {
             server: {
                     process: '/file-upload-slide',
                     revert: '/file-delete-slide',
-                
+
                     headers:{
                         'X-CSRF-TOKEN': '{{ csrf_token() }}'}
-                    
+
                 },
             });
 
 </script>
-
 @endsection

+ 119 - 87
resources/views/backend/produit/show.blade.php

@@ -2,137 +2,169 @@
 
 
 @section('content')
-<link rel="stylesheet" href="{{ asset('backend/css/idara.css') }}">
-<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.3.0/css/all.min.css" integrity="sha512-SzlrxWUlpfuzQ+pcUCosxcglQRNAq/DZjVsC0lE40xsADsfeQoEypE+enwcOiGjk/bSuGGKHEyjSoQ1zVisanQ==" crossorigin="anonymous" referrerpolicy="no-referrer" />
+    <link rel="stylesheet" href="{{ asset('backend/css/idara.css') }}">
+    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.3.0/css/all.min.css"
+        integrity="sha512-SzlrxWUlpfuzQ+pcUCosxcglQRNAq/DZjVsC0lE40xsADsfeQoEypE+enwcOiGjk/bSuGGKHEyjSoQ1zVisanQ=="
+        crossorigin="anonymous" referrerpolicy="no-referrer" />
 
-@include('backend.partials.import')
+    @include('backend.partials.import')
 
-@include('backend.partials.features')
+    @include('backend.partials.features')
 
 
-        <section class="mt-4">
-            <div class="card">
-                <div class="card-header actionTitle">
+    <section class="mt-4">
+        <div class="card">
+            <div class="card-header actionTitle">
 
-                    <div class="row">
-                        <div class="col">
-                            <strong><i class="fa fa-ellipsis-v" aria-hidden="true"></i> {{$article->nom}}</strong>
+                <div class="row">
+                    <div class="col">
+                        <strong><i class="fa fa-ellipsis-v" aria-hidden="true"></i> {{ $article->nom }}</strong>
 
+                    </div>
+                    <div class="col flexBtn">
+                        <div class="dropdown">
+                            <button class="btn  dropdown-toggle" type="button" data-bs-toggle="dropdown"
+                                aria-expanded="false">
+                                <i class="fa fa-gears"></i> Actions
+                            </button>
+                            <ul class="dropdown-menu">
+                                <a href="{{ route('produit.show', ['id' => $article]) }}">
+                                    <li><button class="dropdown-item" type="button"><i class="fas fa-eye"
+                                                aria-hidden="true"></i> Visualiser</button></li>
+
+                                </a>
+                                <a href="{{ route('produit.edit', ['id' => $article]) }}">
+                                    <li><button class="dropdown-item" type="button"> <i
+                                                class="fa-solid fa-pen-to-square"></i> Modifier</button></li>
+                                </a>
+
+                            </ul>
                         </div>
-                        <div class="col flexBtn">
-                            <div class="dropdown">
-                                <button class="btn  dropdown-toggle" type="button" data-bs-toggle="dropdown" aria-expanded="false">
-                                    <i class="fa fa-gears"></i> Actions
-                                </button>
-                                <ul class="dropdown-menu">
-                                    <a href="{{ route('produit.show',['id'=>$article]) }}">
-                                        <li><button class="dropdown-item" type="button"><i class="fas fa-eye" aria-hidden="true"></i> Visualiser</button></li>
-
-                                    </a>
-                                    <a href="{{ route('produit.edit',['id'=>$article]) }}">
-                                        <li><button class="dropdown-item" type="button"> <i class="fa-solid fa-pen-to-square"></i> Modifier</button></li>
-                                    </a>
-
-                                </ul>
-                            </div>
-                            <div class="dropdown ">
-                            <button class="btn  dropdown-toggle" type="button" data-bs-toggle="dropdown" aria-expanded="false">
+                        <div class="dropdown ">
+                            <button class="btn  dropdown-toggle" type="button" data-bs-toggle="dropdown"
+                                aria-expanded="false">
                                 <i class="fa fa-puzzle-piece"></i> Extensions
                             </button>
                             <ul class="dropdown-menu">
-                                <a href="{{ route('produit.editDoc',['id'=>$article]) }}">
+                                <a href="{{ route('produit.editDoc', ['id' => $article]) }}">
 
-                                    <li><button class="dropdown-item" type="button"><i class="fa-solid fa-pen"></i> Ducument</button></li>
+                                    <li><button class="dropdown-item" type="button"><i class="fa-solid fa-pen"></i>
+                                            Ducument</button></li>
                                 </a>
-                               
-                                <a href="{{ route('produit.editDiapo',['id'=>$article]) }}">
 
-                                    <li><button class="dropdown-item" type="button"> <i class="fa fa-camera"></i>photo Produit</button></li>
+                                <a href="{{ route('produit.editDiapo', ['id' => $article]) }}">
+
+                                    <li><button class="dropdown-item" type="button"> <i class="fa fa-camera"></i>photo
+                                            Produit</button></li>
                                 </a>
 
 
                             </ul>
                         </div>
-                        </div>
-                      
                     </div>
 
-
                 </div>
 
-                <div class="card-body">
-                    <div><i class="fa-solid fa-calendar-days"></i> <strong>Date de mise à jour : </strong> {{$article->created_at}}</div>
 
-                       <div class="mt-4">  @foreach ($article->categories as $singleTag)
+            </div>
+
+            <div class="card-body">
+                <div><i class="fa-solid fa-calendar-days"></i> <strong>Date de mise à jour : </strong>
+                    {{ $article->created_at }}</div>
+
+                <div class="mt-4">
+                    @foreach ($article->categories as $singleTag)
                         <strong>Categorie : </strong> {{ $singleTag->nom }}</span>
-                    @endforeach</div>
-                   
-                    <div class="mt-3"><i class="fa-solid fa-circle-info"></i> <strong>Descritpion : </strong> {!! html_entity_decode ($article->description)!!}</div>
+                    @endforeach
+                </div>
 
-                    <div class=" mt-3 showImage">
+                <div class="mt-3"><i class="fa-solid fa-circle-info"></i> <strong>Descritpion : </strong>
+                    {!! html_entity_decode($article->description) !!}</div>
 
-                        <img src="{{ asset('storage/image/'.$article->image) }}" alt="description of myimage">
-                        
-                    </div>
+                <div class=" mt-3 showImage">
+
+                    <img src="{{ asset('storage/image/' . $article->image) }}" alt="description of myimage">
 
                 </div>
+
             </div>
+        </div>
 
 
-        </section>
-        <section>
+    </section>
+    <section>
 
-            
-            <div class="card mt-4">
-                <h5 class="card-header">Image</h5>
-                <div class="card-body">
 
-                  
+        <div class="card mt-4">
+            <h5 class="card-header">Image</h5>
+            <div class="card-body">
 
-                       <div class="row">
-                     
-                         @foreach($diapos as $diapo)
-                         <div class="col-md-3 mt-4" style="margin-left:74px">
-                         <form action="{{url('deleteMedia/'.$diapo->id)}}" method="post">
+
+
+                <div class="row">
+
+                    @foreach ($diapos as $diapo)
+                        <div class="col-md-3 mt-4" style="margin-left:74px">
+                            <form action="{{ url('deleteMedia/' . $diapo->id) }}" method="post">
 
                                 @csrf
                                 @method('DELETE')
                                 <div>
-                            <img src="{{ asset('storage/diapo/'.$diapo->diapo) }}" alt="description of myimage" style="    height: 200px;">
-                            </div>
-                            <div>
-                                <input type="hidden" name="id" value="{{$diapo->id}}" />
-                               <button type="submit" class="btn btn-sm btn-secondary ml-2"><i class="fa-solid fa-x"></i></button>
-                               </div>
-                         </form>
-                         </div>
-                            @endforeach
-                        
-                      
-                </div>
+                                    <img src="{{ asset('storage/diapo/' . $diapo->diapo) }}" alt="description of myimage"
+                                        style="    height: 200px;">
+                                </div>
+                                <div>
+                                    <input type="hidden" name="id" value="{{ $diapo->id }}" />
+                                    <button type="submit" class="btn btn-sm btn-secondary ml-2"><i
+                                            class="fa-solid fa-x"></i></button>
+                                </div>
+                            </form>
+                        </div>
+                    @endforeach
+
+
                 </div>
-                  
+            </div>
+
+        </div>
+
+
+        @if ($article->document != null)
+            <div class="card mt-4">
+                <div class="card-header">
+                    Featured
                 </div>
-          
-               
-                @if ($article->document !=null)
-                    
-               
-                <div class="card mt-4">
-                    <div class="card-header">
-                        Featured
-                    </div>
-                    <div class="card-body">
-                    <a href="{{ route('doc.download', $article->id) }}" class="btn btn-secondary"><i class="fa fa-download"></i>Fiche Technique.  {{$extension}} .{{  $sizeFile}} kB</a> 
+                <div class="card-body">
+                    <a href="{{ route('doc.download', $article->id) }}" class="btn btn-secondary"><i
+                            class="fa fa-download"></i>Fiche Technique. {{ $extension }} .{{ $sizeFile }} kB</a>
+                    <Tooltip title="suprrimer">
 
+                        <form action="{{ url('deleteDoc/' . $article->id) }}" method="post">
 
-                    </div>
-             </div>
-              @endif
+                            @csrf
+                            @method('DELETE')
+                            <input type="hidden" name="id" value="{{ $article->id }}" />
+                            <button type="submit" class="btn btn-sm btn-danger ml-2"><i class="fa-solid fa-x"></i></button>
 
-        </section>
+                        </form>
+                    </Tooltip>
 
+                </div>
+            </div>
+        @endif
+
+    </section>
 
+    <div class="card mt-4">
+    <div class="card-header">
+        Optimisation pour les moteurs de recherche
     </div>
+    <div class="card-body">
+        <div class="mt-4">  <strong>Titre ( SEO ): </strong> <div class="mt-2">{{$article->titre_seo}}</div> </div>
+        <div class="mt-4">  <strong>Description ( SEO ): </strong> <div class="mt-2">{{$article->resume_seo}}</div> </div>
+        <div class="mt-4">  <strong>Mot clé ( SEO ): </strong> <div class="mt-2">{{$article->mot_cle}}</div> </div>
 
-    @endsection
+
+    </div>
+</div>
+@endsection

+ 115 - 86
resources/views/backend/promotion/Pack.blade.php

@@ -3,115 +3,147 @@
 
 @section('content')
 
-<link href="https://unpkg.com/filepond@4.30.4/dist/filepond.min.css" rel="stylesheet" type="text/css" />
-<link href="https://unpkg.com/filepond-plugin-file-poster@2.5.1/dist/filepond-plugin-file-poster.min.css" rel="stylesheet" type="text/css" />
+    <link href="https://unpkg.com/filepond@4.30.4/dist/filepond.min.css" rel="stylesheet" type="text/css" />
+    <link href="https://unpkg.com/filepond-plugin-file-poster@2.5.1/dist/filepond-plugin-file-poster.min.css" rel="stylesheet"
+        type="text/css" />
 
-<link href="{{asset('pintura/pintura.scss')}}" rel="stylesheet" />
+    <link href="{{ asset('pintura/pintura.scss') }}" rel="stylesheet" />
 
-<!-- Custom css -->
-<link href="{{asset('css/custom.css')}}" rel="stylesheet" />
-@include('backend.partials.import')
+    <!-- Custom css -->
+    <link href="{{ asset('css/custom.css') }}" rel="stylesheet" />
+    @include('backend.partials.import')
 
-@include('backend.partials.features')
+    @include('backend.partials.features')
+    <form method="post" action="{{ url('promotion/produitPack') }}" enctype="multipart/form-data">
 
 
+        @csrf
 
-    <div class="card mt-4">
-        <div class="card-header">
-        Vous pouvez ajouter un pack promo
-        </div>
-        <div class="card-body">
-            
 
-            <div class="container">
-                @if(session('success'))
-                <div class="alert alert-success">
-                    {{ session('success') }}
-                </div>
-                @endif
-                @if (count($errors) > 0)
-                <div class="alert alert-danger">
-                    <strong>Whoops!</strong> Some problems with your input.<br><br>
-                    <ul>
-                        @foreach ($errors->all() as $error)
-                        <li>{{ $error }}</li>
-                        @endforeach
-                    </ul>
-                </div>
-                @endif
+        <div class="card mt-4">
+            <div class="card-header">
+                Vous pouvez ajouter un pack promo
+            </div>
+            <div class="card-body">
+
+
+                <div class="container">
+                    @if (session('success'))
+                        <div class="alert alert-success">
+                            {{ session('success') }}
+                        </div>
+                    @endif
+                    @if (count($errors) > 0)
+                        <div class="alert alert-danger">
+                            <strong>Whoops!</strong> Some problems with your input.<br><br>
+                            <ul>
+                                @foreach ($errors->all() as $error)
+                                    <li>{{ $error }}</li>
+                                @endforeach
+                            </ul>
+                        </div>
+                    @endif
 
-                <form method="post" action="{{url('promotion/produitPack')}}" enctype="multipart/form-data">
-                    
 
-                    @csrf
                     <div class="row">
-                      
-                    <div class="form-group mt-4">
-                    <label for="exampleFormControlTextarea1"><strong>Titre de la promotion :</strong></label>
 
-                        <input type="text" class="form-control" id="" name="titre" placeholder="" required>
-                    </div>
-                    <div class="form-group mt-4">
-                    <label for="exampleFormControlTextarea1"><strong>Remise :</strong></label>
-  
-                            <input type="text" class="form-control" id="" name="remise" placeholder="la remise">
-                      </div>
-                      <div class="row">
+                        <div class="form-group mt-4">
+                            <label for="exampleFormControlTextarea1"><strong>Titre de la promotion :</strong></label>
+
+                            <input type="text" class="form-control" id="" name="titre" placeholder=""
+                                required>
+                        </div>
+                        <div class="form-group mt-4">
+                            <label for="exampleFormControlTextarea1"><strong>Remise :</strong></label>
+
+                            <input type="text" class="form-control" id="" name="remise"
+                                placeholder="la remise">
+                        </div>
+                        <div class="row">
                             <div class="form-group mt-4 col-6">
-                            <label for="exampleFormControlTextarea1"><strong>Début de la promotion :</strong></label>
+                                <label for="exampleFormControlTextarea1"><strong>Début de la promotion :</strong></label>
 
-                            <input  class="form-control" type="datetime-local" id="debut" name="debut" >
+                                <input class="form-control" type="datetime-local" id="debut" name="debut">
                             </div>
 
                             <div class="form-group mt-4 col-6">
-                            <label for="exampleFormControlTextarea1"><strong>Fin de la promotion :</strong></label>
+                                <label for="exampleFormControlTextarea1"><strong>Fin de la promotion :</strong></label>
 
-                            <input  class="form-control" type="datetime-local" id="fin" name="fin" >
+                                <input class="form-control" type="datetime-local" id="fin" name="fin">
                             </div>
-                      </div>
-                    <div class="form-group mt-4">
-                        <label for="exampleFormControlTextarea1"><strong>Description :</strong></label>
-                        <textarea class="form-control" id="presentation" name="description" rows="6"></textarea>
-                    </div>
+                        </div>
+                        <div class="form-group mt-4">
+                            <label for="exampleFormControlTextarea1"><strong>Description :</strong></label>
+                            <textarea class="form-control" id="presentation" name="description" rows="6"></textarea>
+                        </div>
+
+                        <div class="input-group mt-4 control-group increment">
+                            <input type="file" name="image" class="my-pond form-control" required />
 
-                    <div class="input-group mt-4 control-group increment" >
-                                 <input type="file" name="image" class="my-pond form-control"  required/>
-                    
-                            </div>
-                    </div>
-                    
-                        <div class="form-group col-md-4 mt-4">
-                            <button type="submit" class="btn btn-success" style="margin-top:10px">Confirmer</button>
                         </div>
-                    
+                    </div>
+
+                </div>
+            </div>
+        </div>
+
+        <div class="card mt-4">
+            <div class="card-header">
+                Réferencement
+            </div>
+            <div class="card-body">
+                <div class="form-group">
+                    <label for="exampleFormControlInput1" class="mb-3"><strong>Titre(SEO)</strong></label>
+
+                    <input type="text" class="form-control" name="titre_seo" placeholder="..."
+                        value="{{ old('titre_seo') }}">
+                </div>
+                <div class="form-group mt-4">
+                    <label for="exampleFormControlInput1" class="mb-3"><strong>description(SEO)</strong></label>
+                    <textarea name="resume_seo" id="" style="width: 100%" rows="10" value="{{ old('resume_seo') }}"></textarea>
+
+                </div>
+
+                <div class="form-group mt-4">
+                    <label for="exampleFormControlInput1" class="mb-3"><strong>Mot clé (SEO)</strong></label>
+
+                    <input type="text" class="form-control" name="mot_cle" placeholder="..."
+                        value="{{ old('mot_cle') }}">
+                </div>
 
-                </form>
             </div>
         </div>
-    </div>
 
-</div>
+        <div class="form-group mt-4 add" style="text-align:end">
 
-@include('backend.partials.scriptIndex')
+            <button type="submit" class="btn btn-success" value="Ajouter">Ajouter</button>
 
-<style>
-    .ck.ck-editor__main>.ck-editor__editable:not(.ck-focused) {
-        border-color: var(--ck-color-base-border);
-        height: 300px;
-    }
+        </div>
+    </form>
 
-</style>
+    @include('backend.partials.scriptIndex')
 
-<script src="https://unpkg.com/filepond@4.30.4/dist/filepond.min.js"></script>
-<script src="https://unpkg.com/filepond-plugin-file-poster@2.5.1/dist/filepond-plugin-file-poster.min.js"></script>
-<script src="https://unpkg.com/filepond-plugin-file-validate-type@1.2.8/dist/filepond-plugin-file-validate-type.min.js"></script>
-<script src="https://unpkg.com/filepond-plugin-file-validate-size@2.2.8/dist/filepond-plugin-file-validate-size.min.js"></script>
-<script src="https://unpkg.com/filepond-plugin-image-exif-orientation@1.0.11/dist/filepond-plugin-image-exif-orientation.min.js"></script>
+    <style>
+        .ck.ck-editor__main>.ck-editor__editable:not(.ck-focused) {
+            border-color: var(--ck-color-base-border);
+            height: 300px;
+        }
+    </style>
+
+    <script src="https://unpkg.com/filepond@4.30.4/dist/filepond.min.js"></script>
+    <script src="https://unpkg.com/filepond-plugin-file-poster@2.5.1/dist/filepond-plugin-file-poster.min.js"></script>
+    <script src="https://unpkg.com/filepond-plugin-file-validate-type@1.2.8/dist/filepond-plugin-file-validate-type.min.js">
+    </script>
+    <script src="https://unpkg.com/filepond-plugin-file-validate-size@2.2.8/dist/filepond-plugin-file-validate-size.min.js">
+    </script>
+    <script
+        src="https://unpkg.com/filepond-plugin-image-exif-orientation@1.0.11/dist/filepond-plugin-image-exif-orientation.min.js">
+    </script>
 
 
 
 
-<script  type="module">
+    <script  type="module">
    var  img_width = {{ env('IMG_HEIGHT') }} ;
     var img_height = {{ env('IMG_HEIGHT') }};
     var img_quality = {{ env('IMG_QUALITY') }};
@@ -123,7 +155,7 @@
 import {
         FilePondPluginImageEditor,
     } from '/filepond/filepond-plugin-image-editor/FilePondPluginImageEditor.js';
-	
+
 // import Pintura Image Editor modules
 import {
     // Image editor
@@ -143,9 +175,9 @@ import {
 // French
 import fr_FR from '/filepond/locale/fr-fr.js';
 
-  
 
-    
+
+
 FilePond.setOptions(fr_FR);
 
 // Register plugins
@@ -170,7 +202,7 @@ FilePond.create(document.querySelector(pond_selector), {
     dropOnPage: true,
     dropOnElement: true,
     instantUpload: instant_upload,
-    
+
     // FilePond Image Editor plugin properties
     imageEditor: {
         // Maps legacy data objects to new imageState objects (optional)
@@ -217,16 +249,13 @@ FilePond.create(document.querySelector(pond_selector), {
             server: {
                     process: '/file-upload-promotion',
                     revert: '/file-delete-promotion',
-                
+
                     headers:{
                         'X-CSRF-TOKEN': '{{ csrf_token() }}'}
-                    
+
                 },
             });
 
 </script>
 
 @endsection
-
-
-

+ 125 - 107
resources/views/backend/promotion/add.blade.php

@@ -3,149 +3,167 @@
 
 @section('content')
 
-<link
-  rel="stylesheet"
-  href="https://cdnjs.cloudflare.com/ajax/libs/selectize.js/0.15.2/css/selectize.default.min.css"
-  integrity="sha512-pTaEn+6gF1IeWv3W1+7X7eM60TFu/agjgoHmYhAfLEU8Phuf6JKiiE8YmsNC0aCgQv4192s4Vai8YZ6VNM6vyQ=="
-  crossorigin="anonymous"
-  referrerpolicy="no-referrer"
-/>
-@include('backend.partials.import')
+    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/selectize.js/0.15.2/css/selectize.default.min.css"
+        integrity="sha512-pTaEn+6gF1IeWv3W1+7X7eM60TFu/agjgoHmYhAfLEU8Phuf6JKiiE8YmsNC0aCgQv4192s4Vai8YZ6VNM6vyQ=="
+        crossorigin="anonymous" referrerpolicy="no-referrer" />
+    @include('backend.partials.import')
 
-@include('backend.partials.features')
+    @include('backend.partials.features')
 
 
+    <form method="post" action="{{ url('promotion/produit') }}" enctype="multipart/form-data">
 
-    <div class="card mt-4">
-        <div class="card-header">
-            Vous pouvez ajouter une promotion
-        </div>
-        <div class="card-body">
-            
-
-            <div class="container">
-                @if(session('success'))
-                <div class="alert alert-success">
-                    {{ session('success') }}
-                </div>
-                @endif
-                @if (count($errors) > 0)
-                <div class="alert alert-danger">
-                    <strong>Whoops!</strong> Some problems with your input.<br><br>
-                    <ul>
-                        @foreach ($errors->all() as $error)
-                        <li>{{ $error }}</li>
-                        @endforeach
-                    </ul>
-                </div>
-                @endif
+        @csrf
+        <div class="card mt-4">
+            <div class="card-header">
+                Vous pouvez ajouter une promotion
+            </div>
+            <div class="card-body">
 
-                <form method="post" action="{{url('promotion/produit')}}" enctype="multipart/form-data">
-                    
 
-                    @csrf
-                    <div class="row">
-                      
-                    <div class="form-group mt-4">
-                    <label for="exampleFormControlTextarea1"><strong>Titre de la promotion :</strong></label>
+                <div class="container">
+                    @if (session('success'))
+                        <div class="alert alert-success">
+                            {{ session('success') }}
+                        </div>
+                    @endif
+                    @if (count($errors) > 0)
+                        <div class="alert alert-danger">
+                            <strong>Whoops!</strong> Some problems with your input.<br><br>
+                            <ul>
+                                @foreach ($errors->all() as $error)
+                                    <li>{{ $error }}</li>
+                                @endforeach
+                            </ul>
+                        </div>
+                    @endif
 
-                        <input type="text" class="form-control" id="" name="titre" placeholder="titre" value="{{old('titre')}}"required>
-                    </div>
 
-                    <div class="form-group categorie mt-4" id="categorie">
+                    <div class="row">
 
+                        <div class="form-group mt-4">
+                            <label for="exampleFormControlTextarea1"><strong>Titre de la promotion :</strong></label>
 
-                        <label class="" for="exampleFormControlInput1"><strong>Produit</strong> :</label>
-                        <br>
-                        <select  onchange="optionCheck()"  class="form-control" name="produits" id="produits" class=" select seletizeData" aria-placeholder="votre produit" aria-describedby="validationServer04Feedback" style=" margin-bottom: 40px;" >
+                            <input type="text" class="form-control" id="" name="titre" placeholder="titre"
+                                value="{{ old('titre') }}"required>
+                        </div>
 
-                            @if(! empty(old('produits')))
-                            
+                        <div class="form-group categorie mt-4" id="categorie">
 
-                                <option value="{{ old('produits') }}" selected> {{ $produit->produits->nom }}</option>
-                           
-                                 
-                             @else
-                             <option></option>
-                                 
-                             @endif
-                            
 
+                            <label class="" for="exampleFormControlInput1"><strong>Produit</strong> :</label>
+                            <br>
+                            <select onchange="optionCheck()" class="form-control" name="produits" id="produits"
+                                class=" select seletizeData" aria-placeholder="votre produit"
+                                aria-describedby="validationServer04Feedback" style=" margin-bottom: 40px;">
 
-                        @foreach ($produits as $produit)
+                                @if (!empty(old('produits')))
+                                    <option value="{{ old('produits') }}" selected> {{ $produit->produits->nom }}</option>
+                                @else
+                                    <option></option>
+                                @endif
 
 
-                        <option value="{{ $produit->id }}" {{ old('produit') == $produit->id  ? 'selected' : '' }}>  {{ $produit->nom }}</option>
 
+                                @foreach ($produits as $produit)
+                                    <option value="{{ $produit->id }}"
+                                        {{ old('produit') == $produit->id ? 'selected' : '' }}> {{ $produit->nom }}
+                                    </option>
+                                @endforeach
 
-                        @endforeach
 
 
 
+                            </select>
 
-                        </select>
 
+                        </div>
+                        <div class="form-group mt-4">
+                            <label for="exampleFormControlTextarea1"><strong>Remise :</strong></label>
 
-                    </div>
-                    <div class="form-group mt-4">
-                    <label for="exampleFormControlTextarea1"><strong>Remise :</strong></label>
-  
-                            <input type="text" class="form-control" id="" name="remise" placeholder="la remise" value="{{old('remise')}}" >
-                      </div>
-                      <div class="row">
+                            <input type="text" class="form-control" id="" name="remise" placeholder="la remise"
+                                value="{{ old('remise') }}">
+                        </div>
+                        <div class="row">
                             <div class="form-group mt-4 col-6">
-                            <label for="exampleFormControlTextarea1"><strong>Début de la promotion :</strong></label>
+                                <label for="exampleFormControlTextarea1"><strong>Début de la promotion :</strong></label>
 
-                            <input  class="form-control" type="datetime-local" id="debut" name="debut" value="{{old('debut')}}" >
+                                <input class="form-control" type="datetime-local" id="debut" name="debut"
+                                    value="{{ old('debut') }}">
                             </div>
 
                             <div class="form-group mt-4 col-6">
-                            <label for="exampleFormControlTextarea1"><strong>Fin de la promotion :</strong></label>
+                                <label for="exampleFormControlTextarea1"><strong>Fin de la promotion :</strong></label>
 
-                            <input  class="form-control" type="datetime-local" id="fin" name="fin" value="{{old('fin')}}" >
+                                <input class="form-control" type="datetime-local" id="fin" name="fin"
+                                    value="{{ old('fin') }}">
                             </div>
-                      </div>
+                        </div>
+
+                        <div class="form-group mt-4">
+                            <label for="exampleFormControlTextarea1"><strong>description :</strong></label>
+                            <textarea class="form-control" id="presentation" name="description" rows="6" value="">{{ old('description') }}</textarea>
+                        </div>
+
 
-                    <div class="form-group mt-4">
-                        <label for="exampleFormControlTextarea1"><strong>description :</strong></label>
-                        <textarea class="form-control" id="presentation" name="description" rows="6" value="">{{old('description')}}</textarea>
                     </div>
+                </div>
+            </div>
 
-                    <div class="form-group col-md-4 mt-4">
-                            <button type="submit" class="btn btn-success" style="margin-top:10px">Confirmer</button>
-                        </div>
-                    
+        </div>
+        <div class="card mt-4">
+            <div class="card-header">
+                Réferencement
+            </div>
+            <div class="card-body">
+                <div class="form-group">
+                    <label for="exampleFormControlInput1" class="mb-3"><strong>Titre(SEO)</strong></label>
+
+                    <input type="text" class="form-control" name="titre_seo" placeholder="..."
+                        value="{{ old('titre_seo') }}">
+                </div>
+                <div class="form-group mt-4">
+                    <label for="exampleFormControlInput1" class="mb-3"><strong>description(SEO)</strong></label>
+                    <textarea name="resume_seo" id="" style="width: 100%" rows="10" value="{{ old('resume_seo') }}"></textarea>
+
+                </div>
+
+                <div class="form-group mt-4">
+                    <label for="exampleFormControlInput1" class="mb-3"><strong>Mot clé (SEO)</strong></label>
+
+                    <input type="text" class="form-control" name="mot_cle" placeholder="..."
+                        value="{{ old('mot_cle') }}">
+                </div>
 
-                </form>
             </div>
         </div>
-    </div>
-
-</div>
-
-@include('backend.partials.scriptIndex')
-<style>
-    .ck.ck-editor__main>.ck-editor__editable:not(.ck-focused) {
-        border-color: var(--ck-color-base-border);
-        height: 300px;
-    }
-
-</style>
-<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.4/jquery.min.js" integrity="sha512-pumBsjNRGGqkPzKHndZMaAG+bir374sORyzM3uulLV14lN5LyykqNk8eEeUlUkB3U0M4FApyaHraT65ihJhDpQ==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
-
-<script
-  src="https://cdnjs.cloudflare.com/ajax/libs/selectize.js/0.15.2/js/selectize.min.js"
-  integrity="sha512-IOebNkvA/HZjMM7MxL0NYeLYEalloZ8ckak+NDtOViP7oiYzG5vn6WVXyrJDiJPhl4yRdmNAG49iuLmhkUdVsQ=="
-  crossorigin="anonymous"
-  referrerpolicy="no-referrer"
-></script>
-<script>
-  $(function () {
-    $("#produits").selectize({
-  plugins: ["auto_select_on_type"],
-});
-  });
- 
-</script>
+
+        <div class="form-group mt-4 add" style="text-align:end">
+
+            <button type="submit" class="btn btn-success" value="Ajouter">Ajouter</button>
+
+        </div>
+    </form>
+    @include('backend.partials.scriptIndex')
+    <style>
+        .ck.ck-editor__main>.ck-editor__editable:not(.ck-focused) {
+            border-color: var(--ck-color-base-border);
+            height: 300px;
+        }
+    </style>
+    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.4/jquery.min.js"
+        integrity="sha512-pumBsjNRGGqkPzKHndZMaAG+bir374sORyzM3uulLV14lN5LyykqNk8eEeUlUkB3U0M4FApyaHraT65ihJhDpQ=="
+        crossorigin="anonymous" referrerpolicy="no-referrer"></script>
+
+    <script src="https://cdnjs.cloudflare.com/ajax/libs/selectize.js/0.15.2/js/selectize.min.js"
+        integrity="sha512-IOebNkvA/HZjMM7MxL0NYeLYEalloZ8ckak+NDtOViP7oiYzG5vn6WVXyrJDiJPhl4yRdmNAG49iuLmhkUdVsQ=="
+        crossorigin="anonymous" referrerpolicy="no-referrer"></script>
+    <script>
+        $(function() {
+            $("#produits").selectize({
+                plugins: ["auto_select_on_type"],
+            });
+        });
+    </script>
 
 @endsection

+ 117 - 89
resources/views/backend/promotion/edit.blade.php

@@ -3,139 +3,167 @@
 
 @section('content')
 
-<link
-  rel="stylesheet"
-  href="https://cdnjs.cloudflare.com/ajax/libs/selectize.js/0.15.2/css/selectize.default.min.css"
-  integrity="sha512-pTaEn+6gF1IeWv3W1+7X7eM60TFu/agjgoHmYhAfLEU8Phuf6JKiiE8YmsNC0aCgQv4192s4Vai8YZ6VNM6vyQ=="
-  crossorigin="anonymous"
-  referrerpolicy="no-referrer"
-/>
-@include('backend.partials.import')
-
-@include('backend.partials.features')
+    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/selectize.js/0.15.2/css/selectize.default.min.css"
+        integrity="sha512-pTaEn+6gF1IeWv3W1+7X7eM60TFu/agjgoHmYhAfLEU8Phuf6JKiiE8YmsNC0aCgQv4192s4Vai8YZ6VNM6vyQ=="
+        crossorigin="anonymous" referrerpolicy="no-referrer" />
+    @include('backend.partials.import')
 
+    @include('backend.partials.features')
 
+    <form action="{{ url('promotion/' . $article->id) }}" method="post" enctype="multipart/form-data">
+        <input type="hidden" name="_method" value="PUT">
+        @csrf
 
     <div class="card mt-4">
         <div class="card-header">
             Vous pouvez modifier
         </div>
         <div class="card-body">
-            
+
 
             <div class="container">
-                @if(session('success'))
-                <div class="alert alert-success">
-                    {{ session('success') }}
-                </div>
+                @if (session('success'))
+                    <div class="alert alert-success">
+                        {{ session('success') }}
+                    </div>
                 @endif
                 @if (count($errors) > 0)
-                <div class="alert alert-danger">
-                    <strong>Whoops!</strong> Some problems with your input.<br><br>
-                    <ul>
-                        @foreach ($errors->all() as $error)
-                        <li>{{ $error }}</li>
-                        @endforeach
-                    </ul>
-                </div>
+                    <div class="alert alert-danger">
+                        <strong>Whoops!</strong> Some problems with your input.<br><br>
+                        <ul>
+                            @foreach ($errors->all() as $error)
+                                <li>{{ $error }}</li>
+                            @endforeach
+                        </ul>
+                    </div>
                 @endif
 
-                <form action="{{url('promotion/'.$article->id)}}" method="post" enctype="multipart/form-data">
-                <input type="hidden" name="_method" value="PUT">
-                @csrf
+
                     <div class="row">
-                      
-                    <div class="form-group mt-4">
-                    <label for="exampleFormControlTextarea1"><strong>Titre de la promotion :</strong></label>
 
-                        <input type="text" class="form-control" id="" name="titre" placeholder="titre" value="{{$article->titre}}" required>
-                    </div>
+                        <div class="form-group mt-4">
+                            <label for="exampleFormControlTextarea1"><strong>Titre de la promotion :</strong></label>
+
+                            <input type="text" class="form-control" id="" name="titre" placeholder="titre"
+                                value="{{ $article->titre }}" required>
+                        </div>
 
-                    <div class="form-group categorie mt-4" id="categorie">
+                        <div class="form-group categorie mt-4" id="categorie">
 
 
-                        <label class="" for="exampleFormControlInput1"><strong>Produit</strong> :</label>
-                        <br>
-                        <select  onchange="optionCheck()"  class="form-control" name="produits" id="produits" class=" select seletizeData" aria-placeholder="votre produit" aria-describedby="validationServer04Feedback" style=" margin-bottom: 40px;" >
+                            <label class="" for="exampleFormControlInput1"><strong>Produit</strong> :</label>
+                            <br>
+                            <select onchange="optionCheck()" class="form-control" name="produits" id="produits"
+                                class=" select seletizeData" aria-placeholder="votre produit"
+                                aria-describedby="validationServer04Feedback" style=" margin-bottom: 40px;">
 
 
-                        
-                        
 
-                        @foreach ($produits as $produit)
-<option  value="{{ $article->produit_id }}">{{ $produit->nom }}</option>
 
-                        <option value="{{ $produit->id }}" {{ old('produit') == $produit->id  ? 'selected' : '' }}>   {{ $produit->nom }}</option>
 
+                                @foreach ($produits as $produit)
+                                    <option value="{{ $article->produit_id }}">{{ $produit->nom }}</option>
 
-                        @endforeach
+                                    <option value="{{ $produit->id }}"
+                                        {{ old('produit') == $produit->id ? 'selected' : '' }}> {{ $produit->nom }}
+                                    </option>
+                                @endforeach
 
 
 
 
-                        </select>
+                            </select>
 
 
-                    </div>
-                    <div class="form-group mt-4">
-                    <label for="exampleFormControlTextarea1"><strong>Remise :</strong></label>
-  
-                            <input type="text" class="form-control" id="" name="remise" placeholder="la remise" value="{{$article->remise}}" >
-                      </div>
-                      <div class="row">
+                        </div>
+                        <div class="form-group mt-4">
+                            <label for="exampleFormControlTextarea1"><strong>Remise :</strong></label>
+
+                            <input type="text" class="form-control" id="" name="remise" placeholder="la remise"
+                                value="{{ $article->remise }}">
+                        </div>
+                        <div class="row">
                             <div class="form-group mt-4 col-6">
-                            <label for="exampleFormControlTextarea1"><strong>Début de la promotion :</strong></label>
+                                <label for="exampleFormControlTextarea1"><strong>Début de la promotion :</strong></label>
 
-                            <input  class="form-control" type="datetime-local" id="debut" name="debut" value="{{$article->debut}}">
+                                <input class="form-control" type="datetime-local" id="debut" name="debut"
+                                    value="{{ $article->debut }}">
                             </div>
 
                             <div class="form-group mt-4 col-6">
-                            <label for="exampleFormControlTextarea1"><strong>Fin de la promotion :</strong></label>
+                                <label for="exampleFormControlTextarea1"><strong>Fin de la promotion :</strong></label>
 
-                            <input  class="form-control" type="datetime-local" id="fin" name="fin" value="{{$article->fin}}">
+                                <input class="form-control" type="datetime-local" id="fin" name="fin"
+                                    value="{{ $article->fin }}">
                             </div>
-                      </div>
-
-                    <div class="form-group mt-4">
-                        <label for="exampleFormControlTextarea1"><strong>description :</strong></label>
-                        <textarea class="form-control" id="presentation" name="description" rows="6">{{$article->description}}</textarea>
-                    </div>
+                        </div>
 
-                    <div class="form-group col-md-4 mt-4">
-                            <button type="submit" class="btn btn-success" style="margin-top:10px">Confirmer</button>
+                        <div class="form-group mt-4">
+                            <label for="exampleFormControlTextarea1"><strong>description :</strong></label>
+                            <textarea class="form-control" id="presentation" name="description" rows="6">{{ $article->description }}</textarea>
                         </div>
-                    
 
-                </form>
+
+            </div>
+        </div>
+    </div>
+
+    </div>
+
+    <div class="card mt-4">
+        <div class="card-header">
+            Réferencement
+        </div>
+        <div class="card-body">
+            <div class="form-group">
+                <label for="exampleFormControlInput1" class="mb-3"><strong>Titre(SEO)</strong></label>
+
+                <input type="text" class="form-control"  name="titre_seo" placeholder="..."
+                    value="{{$article->titre_seo}}">
             </div>
+            <div class="form-group mt-4">
+                <label for="exampleFormControlInput1" class="mb-3"><strong>Description(SEO)</strong></label>
+
+                <textarea name="resume_seo" id="" style="width: 100%" rows="10" value="">{!!$article->resume_seo!!}</textarea>
+
+            </div>
+
+            <div class="form-group mt-4">
+                <label for="exampleFormControlInput1" class="mb-3"><strong>Mot clé (SEO)</strong></label>
+
+                <input type="text" class="form-control"  name="mot_cle" placeholder="..."
+                    value="{{$article->mot_cle}}">
+            </div>
+
         </div>
     </div>
 
-</div>
-
-@include('backend.partials.scriptIndex')
-<style>
-    .ck.ck-editor__main>.ck-editor__editable:not(.ck-focused) {
-        border-color: var(--ck-color-base-border);
-        height: 300px;
-    }
-
-</style>
-<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.4/jquery.min.js" integrity="sha512-pumBsjNRGGqkPzKHndZMaAG+bir374sORyzM3uulLV14lN5LyykqNk8eEeUlUkB3U0M4FApyaHraT65ihJhDpQ==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
-
-<script
-  src="https://cdnjs.cloudflare.com/ajax/libs/selectize.js/0.15.2/js/selectize.min.js"
-  integrity="sha512-IOebNkvA/HZjMM7MxL0NYeLYEalloZ8ckak+NDtOViP7oiYzG5vn6WVXyrJDiJPhl4yRdmNAG49iuLmhkUdVsQ=="
-  crossorigin="anonymous"
-  referrerpolicy="no-referrer"
-></script>
-<script>
-  $(function () {
-    $("#produits").selectize({
-  plugins: ["auto_select_on_type"],
-});
-  });
- 
-</script>
+    <div class="form-group add mt-4" style="text-align:end">
+        <button type="submit" class="btn btn-danger" value="">Modifier</button>
+
+    </div>
+</form>
+
+    @include('backend.partials.scriptIndex')
+    <style>
+        .ck.ck-editor__main>.ck-editor__editable:not(.ck-focused) {
+            border-color: var(--ck-color-base-border);
+            height: 300px;
+        }
+    </style>
+    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.4/jquery.min.js"
+        integrity="sha512-pumBsjNRGGqkPzKHndZMaAG+bir374sORyzM3uulLV14lN5LyykqNk8eEeUlUkB3U0M4FApyaHraT65ihJhDpQ=="
+        crossorigin="anonymous" referrerpolicy="no-referrer"></script>
+
+    <script src="https://cdnjs.cloudflare.com/ajax/libs/selectize.js/0.15.2/js/selectize.min.js"
+        integrity="sha512-IOebNkvA/HZjMM7MxL0NYeLYEalloZ8ckak+NDtOViP7oiYzG5vn6WVXyrJDiJPhl4yRdmNAG49iuLmhkUdVsQ=="
+        crossorigin="anonymous" referrerpolicy="no-referrer"></script>
+    <script>
+        $(function() {
+            $("#produits").selectize({
+                plugins: ["auto_select_on_type"],
+            });
+        });
+    </script>
 
 @endsection

+ 138 - 106
resources/views/backend/promotion/editPack.blade.php

@@ -3,145 +3,178 @@
 
 @section('content')
 
-<link href="https://unpkg.com/filepond@4.30.4/dist/filepond.min.css" rel="stylesheet" type="text/css" />
-<link href="https://unpkg.com/filepond-plugin-file-poster@2.5.1/dist/filepond-plugin-file-poster.min.css" rel="stylesheet" type="text/css" />
+    <link href="https://unpkg.com/filepond@4.30.4/dist/filepond.min.css" rel="stylesheet" type="text/css" />
+    <link href="https://unpkg.com/filepond-plugin-file-poster@2.5.1/dist/filepond-plugin-file-poster.min.css" rel="stylesheet"
+        type="text/css" />
 
-<link href="{{asset('pintura/pintura.scss')}}" rel="stylesheet" />
+    <link href="{{ asset('pintura/pintura.scss') }}" rel="stylesheet" />
 
-<!-- Custom css -->
-<link href="{{asset('css/custom.css')}}" rel="stylesheet" />
-<link
-  rel="stylesheet"
-  href="https://cdnjs.cloudflare.com/ajax/libs/selectize.js/0.15.2/css/selectize.default.min.css"
-  integrity="sha512-pTaEn+6gF1IeWv3W1+7X7eM60TFu/agjgoHmYhAfLEU8Phuf6JKiiE8YmsNC0aCgQv4192s4Vai8YZ6VNM6vyQ=="
-  crossorigin="anonymous"
-  referrerpolicy="no-referrer"
-/>
-@include('backend.partials.import')
+    <!-- Custom css -->
+    <link href="{{ asset('css/custom.css') }}" rel="stylesheet" />
+    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/selectize.js/0.15.2/css/selectize.default.min.css"
+        integrity="sha512-pTaEn+6gF1IeWv3W1+7X7eM60TFu/agjgoHmYhAfLEU8Phuf6JKiiE8YmsNC0aCgQv4192s4Vai8YZ6VNM6vyQ=="
+        crossorigin="anonymous" referrerpolicy="no-referrer" />
+    @include('backend.partials.import')
 
-@include('backend.partials.features')
+    @include('backend.partials.features')
 
+    <form action="{{ url('promotion/pack/' . $article->id) }}" method="post" enctype="multipart/form-data">
+        <input type="hidden" name="_method" value="PUT">
+        @csrf
 
+        <div class="card mt-4">
+            <div class="card-header">
+                Vous pouvez modifier
+            </div>
+            <div class="card-body">
 
-    <div class="card mt-4">
-        <div class="card-header">
-        Vous pouvez modifier
-        </div>
-        <div class="card-body">
-            
 
-            <div class="container">
-                @if(session('success'))
-                <div class="alert alert-success">
-                    {{ session('success') }}
-                </div>
-                @endif
-                @if (count($errors) > 0)
-                <div class="alert alert-danger">
-                    <strong>Whoops!</strong> Some problems with your input.<br><br>
-                    <ul>
-                        @foreach ($errors->all() as $error)
-                        <li>{{ $error }}</li>
-                        @endforeach
-                    </ul>
-                </div>
-                @endif
+                <div class="container">
+                    @if (session('success'))
+                        <div class="alert alert-success">
+                            {{ session('success') }}
+                        </div>
+                    @endif
+                    @if (count($errors) > 0)
+                        <div class="alert alert-danger">
+                            <strong>Whoops!</strong> Some problems with your input.<br><br>
+                            <ul>
+                                @foreach ($errors->all() as $error)
+                                    <li>{{ $error }}</li>
+                                @endforeach
+                            </ul>
+                        </div>
+                    @endif
+
 
-                <form action="{{url('promotion/pack/'.$article->id)}}" method="post" enctype="multipart/form-data">
-                <input type="hidden" name="_method" value="PUT">
-                @csrf
                     <div class="row">
-                      
-                    <div class="form-group mt-4">
-                    <label for="exampleFormControlTextarea1"><strong>Titre de la promotion :</strong></label>
 
-                        <input type="text" class="form-control" id="" name="titre" placeholder="titre" value="{{$article->titre}}" required>
-                    </div>
+                        <div class="form-group mt-4">
+                            <label for="exampleFormControlTextarea1"><strong>Titre de la promotion :</strong></label>
+
+                            <input type="text" class="form-control" id="" name="titre" placeholder="titre"
+                                value="{{ $article->titre }}" required>
+                        </div>
 
 
 
                     </div>
                     <div class="form-group mt-4">
-                    <label for="exampleFormControlTextarea1"><strong>Remise :</strong></label>
-  
-                            <input type="text" class="form-control" id="" name="remise" placeholder="la remise" value="{{$article->remise}}" required>
-                      </div>
-                      <div class="row">
-                            <div class="form-group mt-4 col-6">
+                        <label for="exampleFormControlTextarea1"><strong>Remise :</strong></label>
+
+                        <input type="text" class="form-control" id="" name="remise" placeholder="la remise"
+                            value="{{ $article->remise }}" required>
+                    </div>
+                    <div class="row">
+                        <div class="form-group mt-4 col-6">
                             <label for="exampleFormControlTextarea1"><strong>Début de la promotion :</strong></label>
 
-                            <input  class="form-control" type="datetime-local" id="debut" name="debut" value="{{$article->debut}}">
-                            </div>
+                            <input class="form-control" type="datetime-local" id="debut" name="debut"
+                                value="{{ $article->debut }}">
+                        </div>
 
-                            <div class="form-group mt-4 col-6">
+                        <div class="form-group mt-4 col-6">
                             <label for="exampleFormControlTextarea1"><strong>Fin de la promotion :</strong></label>
 
-                            <input  class="form-control" type="datetime-local" id="fin" name="fin" value="{{$article->fin}}">
-                            </div>
-                      </div>
+                            <input class="form-control" type="datetime-local" id="fin" name="fin"
+                                value="{{ $article->fin }}">
+                        </div>
+                    </div>
 
                     <div class="form-group mt-4">
                         <label for="exampleFormControlTextarea1"><strong>description :</strong></label>
-                        <textarea class="form-control" id="presentation" name="description" rows="6">{{$article->description}}</textarea>
+                        <textarea class="form-control" id="presentation" name="description" rows="6">{{ $article->description }}</textarea>
                     </div>
-                    <div class="input-group mt-4 control-group increment" >
-                        <input type="file" name="image" class="my-pond form-control"  />
-           
-                   </div>
-                   <img src="{{ asset('storage/image/'.$article->image) }} " style="width:200px" alt="description of myimage">
-
-           </div>
-                    <div class="form-group col-md-4 mt-4">
-                            <button type="submit" class="btn btn-success" style="margin-top:10px">Confirmer</button>
-                        </div>
-                    
+                    <div class="input-group mt-4 control-group increment">
+                        <input type="file" name="image" class="my-pond form-control" />
+
+                    </div>
+                    <img src="{{ asset('storage/image/' . $article->photo) }}" style="width:200px"
+                        alt="description of myimage">
+
+                </div>
+
 
-                </form>
+
+
+    </div>
+    </div>
+
+    <div class="card mt-4">
+        <div class="card-header">
+            Réferencement
+        </div>
+        <div class="card-body">
+            <div class="form-group">
+                <label for="exampleFormControlInput1" class="mb-3"><strong>Titre(SEO)</strong></label>
+
+                <input type="text" class="form-control"  name="titre_seo" placeholder="..."
+                    value="{{$article->titre_seo}}">
             </div>
+            <div class="form-group mt-4">
+                <label for="exampleFormControlInput1" class="mb-3"><strong>Description(SEO)</strong></label>
+
+                <textarea name="resume_seo" id="" style="width: 100%" rows="10" value="">{!!$article->resume_seo!!}</textarea>
+
+            </div>
+
+            <div class="form-group mt-4">
+                <label for="exampleFormControlInput1" class="mb-3"><strong>Mot clé (SEO)</strong></label>
+
+                <input type="text" class="form-control"  name="mot_cle" placeholder="..."
+                    value="{{$article->mot_cle}}">
+            </div>
+
         </div>
     </div>
 
-</div>
+    <div class="form-group add mt-4" style="text-align:end">
+        <button type="submit" class="btn btn-danger" value="">Modifier</button>
 
-@include('backend.partials.scriptIndex')
+    </div>
+</form>
+    </div>
 
-<style>
-    .ck.ck-editor__main>.ck-editor__editable:not(.ck-focused) {
-        border-color: var(--ck-color-base-border);
-        height: 300px;
-    }
+    @include('backend.partials.scriptIndex')
 
-</style>
-<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.4/jquery.min.js" integrity="sha512-pumBsjNRGGqkPzKHndZMaAG+bir374sORyzM3uulLV14lN5LyykqNk8eEeUlUkB3U0M4FApyaHraT65ihJhDpQ==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
-
-<script
-  src="https://cdnjs.cloudflare.com/ajax/libs/selectize.js/0.15.2/js/selectize.min.js"
-  integrity="sha512-IOebNkvA/HZjMM7MxL0NYeLYEalloZ8ckak+NDtOViP7oiYzG5vn6WVXyrJDiJPhl4yRdmNAG49iuLmhkUdVsQ=="
-  crossorigin="anonymous"
-  referrerpolicy="no-referrer"
-></script>
-<script>
-  $(function () {
-    $("#produits").selectize({
-  plugins: ["auto_select_on_type"],
-});
-  });
- 
-</script>
+    <style>
+        .ck.ck-editor__main>.ck-editor__editable:not(.ck-focused) {
+            border-color: var(--ck-color-base-border);
+            height: 300px;
+        }
+    </style>
+    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.4/jquery.min.js"
+        integrity="sha512-pumBsjNRGGqkPzKHndZMaAG+bir374sORyzM3uulLV14lN5LyykqNk8eEeUlUkB3U0M4FApyaHraT65ihJhDpQ=="
+        crossorigin="anonymous" referrerpolicy="no-referrer"></script>
+
+    <script src="https://cdnjs.cloudflare.com/ajax/libs/selectize.js/0.15.2/js/selectize.min.js"
+        integrity="sha512-IOebNkvA/HZjMM7MxL0NYeLYEalloZ8ckak+NDtOViP7oiYzG5vn6WVXyrJDiJPhl4yRdmNAG49iuLmhkUdVsQ=="
+        crossorigin="anonymous" referrerpolicy="no-referrer"></script>
+    <script>
+        $(function() {
+            $("#produits").selectize({
+                plugins: ["auto_select_on_type"],
+            });
+        });
+    </script>
 
 
 
-<script src="https://unpkg.com/filepond@4.30.4/dist/filepond.min.js"></script>
-<script src="https://unpkg.com/filepond-plugin-file-poster@2.5.1/dist/filepond-plugin-file-poster.min.js"></script>
-<script src="https://unpkg.com/filepond-plugin-file-validate-type@1.2.8/dist/filepond-plugin-file-validate-type.min.js"></script>
-<script src="https://unpkg.com/filepond-plugin-file-validate-size@2.2.8/dist/filepond-plugin-file-validate-size.min.js"></script>
-<script src="https://unpkg.com/filepond-plugin-image-exif-orientation@1.0.11/dist/filepond-plugin-image-exif-orientation.min.js"></script>
+    <script src="https://unpkg.com/filepond@4.30.4/dist/filepond.min.js"></script>
+    <script src="https://unpkg.com/filepond-plugin-file-poster@2.5.1/dist/filepond-plugin-file-poster.min.js"></script>
+    <script src="https://unpkg.com/filepond-plugin-file-validate-type@1.2.8/dist/filepond-plugin-file-validate-type.min.js">
+    </script>
+    <script src="https://unpkg.com/filepond-plugin-file-validate-size@2.2.8/dist/filepond-plugin-file-validate-size.min.js">
+    </script>
+    <script
+        src="https://unpkg.com/filepond-plugin-image-exif-orientation@1.0.11/dist/filepond-plugin-image-exif-orientation.min.js">
+    </script>
 
 
 
 
 
-<script  type="module">
+    <script  type="module">
     var  img_width = {{ config('app.IMG_HEIGHT') }} ;
     var img_height = {{ config('app.IMG_HEIGHT') }};
     var img_quality = {{ config('app.IMG_QUALITY') }};
@@ -153,7 +186,7 @@
 import {
         FilePondPluginImageEditor,
     } from '/filepond/filepond-plugin-image-editor/FilePondPluginImageEditor.js';
-	
+
 // import Pintura Image Editor modules
 import {
     // Image editor
@@ -173,9 +206,9 @@ import {
 // French
 import fr_FR from '/filepond/locale/fr-fr.js';
 
-  
 
-    
+
+
 FilePond.setOptions(fr_FR);
 
 // Register plugins
@@ -200,7 +233,7 @@ FilePond.create(document.querySelector(pond_selector), {
     dropOnPage: true,
     dropOnElement: true,
     instantUpload: instant_upload,
-    
+
     // FilePond Image Editor plugin properties
     imageEditor: {
         // Maps legacy data objects to new imageState objects (optional)
@@ -247,14 +280,13 @@ FilePond.create(document.querySelector(pond_selector), {
             server: {
                     process: '/file-upload-promotion',
                     revert: '/file-delete-promotion',
-                
+
                     headers:{
                         'X-CSRF-TOKEN': '{{ csrf_token() }}'}
-                    
+
                 },
             });
 
 </script>
 
 @endsection
-

+ 1 - 1
resources/views/backend/promotion/show.blade.php

@@ -25,7 +25,7 @@
                                     <i class="fa fa-gears"></i> Actions
                                 </button>
                                 <ul class="dropdown-menu">
-                                    <a href="{{url('/test')}}">
+                                    <a href="{{route('promo.show',['id'=>$article])}}">
                                         <li><button class="dropdown-item" type="button"><i class="fas fa-eye" aria-hidden="true"></i> Visualiser</button></li>
 
                                     </a>

+ 1 - 1
resources/views/backend/slide/show.blade.php

@@ -25,7 +25,7 @@
                                     <i class="fa fa-gears"></i> Actions
                                 </button>
                                 <ul class="dropdown-menu">
-                                    <a href="{{url('/clean')}}">
+                                    <a href="/">
                                         <li><button class="dropdown-item" type="button"><i class="fas fa-eye" aria-hidden="true"></i> Visualiser</button></li>
 
                                     </a>

BIN
resources/views/frontend.zip


+ 23 - 5
resources/views/frontend/about.blade.php

@@ -4,17 +4,28 @@
 
 
 
-
     <div class="page">
 
-   <div class="container">
+   <div class="container" style="    margin-bottom: 35px;
+    margin-top: 200px;">
+    <div style="    justify-content: left;
+    display: flex;
+">
+      <h4 style="color:red">A propos de nous</h4>
+    </div>
  <div class="row">
    @foreach($presentations as $presentation)
-   <div class="col">
+   <div class="col" style=" margin-top :20px;
+   color: black;    text-align: left;
+  ">
+  <p>
+    {!! html_entity_decode($presentation->details)!!}
+  </p>  
 
    </div>
-   <div class="col mt-4">
-    {{$presentation->details}}
+   <div class="col">
+   <img src="{{ asset('storage/image/'.$presentation->image) }}" alt="description of myimage">
+
    </div>
 
    @endforeach
@@ -22,4 +33,11 @@
    </div>
     </div>
 
+    <style>
+        .image-style-side {
+    float: right;
+    margin-left: var(--ck-image-style-spacing);
+    max-width: 50%;
+}
+    </style>
 @endsection

+ 7 - 4
resources/views/frontend/contact/contact.blade.php

@@ -5,13 +5,9 @@
 @include('backend.partials.import')
 
 
-
-
     <div class="page">
 
 
-
-
 <div class="containerContactPage container" style="margin-top:5.5rem !important ">
     <div class="row">
     <div class="col-lg-6 contact">
@@ -92,6 +88,13 @@
 </div>
 </div>
 
+<style>
+    label{
+        justify-content: left;
+    display: flex; 
+    }
+   
+</style>
 @endsection
 
 

+ 115 - 0
resources/views/frontend/devis/devis.blade.php

@@ -0,0 +1,115 @@
+@extends('frontend.layouts.navBar')
+
+@section('content')
+    @include('backend.partials.import')
+    .container {
+        max-width: 1659px;
+    }
+    <style>
+        .banner img {
+            height: 389px;
+            width: 100%;
+            filter: invert(1);
+        }
+
+        .devis {
+            position: absolute;
+            top: 19%;
+            left: 50%;
+            transform: translate(-50%, -50%);
+            color: #0071dc;
+            font-size: 40px;
+            font-weight: 600;
+        }
+        .container.devisForms{
+        max-width: 1659px;
+        margin-top: 96px;
+    margin-bottom: 96px;
+    }
+    </style>
+    <div class="page">
+
+        <div class="banner">
+            <img src="{{ asset('frontend/images/banner.jpg') }}" alt="">
+            <div class="devis">Demande de Devis</div>
+        </div>
+
+
+
+
+        <div class="container devisForms">
+            <div class="row">
+                <div class="col-6 text-start">
+                   <h3>Formulaire de demande de devis</h3>
+                    Vous avez des questions a propos d'un produit ? ou plusieurs?
+                    Ce formulaire est à votre disposition, nous vous répondrons dans les meilleurs délais.
+                </div>
+
+                <div class="col-6 text-start">
+                    <form method="post" action="{{route('devis.store')}}">
+
+                        @csrf
+                    <div class="form-group">
+                        <label> Nom </label>
+                        <input type="text" class="mt-2 form-control @error('email') is-invalid @enderror" placeholder=""
+                            name="nom">
+                        @error('email')
+                            <span class="invalid-feedback" role="alert">
+                                <strong>{{ $message }}</strong>
+                            </span>
+                        @enderror
+                    </div>
+                    <div class="form-group">
+                        <label> Téléphone </label>
+                        <input type="text" class="mt-2 form-control @error('email') is-invalid @enderror" placeholder=""
+                            name="telephone">
+                        @error('email')
+                            <span class="invalid-feedback" role="alert">
+                                <strong>{{ $message }}</strong>
+                            </span>
+                        @enderror
+                    </div>
+                    <div class="form-group">
+                        <label> Email </label>
+                        <input type="text" class="mt-2 form-control @error('email') is-invalid @enderror" placeholder=""
+                            name="email">
+                        @error('email')
+                            <span class="invalid-feedback" role="alert">
+                                <strong>{{ $message }}</strong>
+                            </span>
+                        @enderror
+                    </div>
+
+
+
+                    <div class="form-group">
+                        <label> Objet </label>
+                        <input type="text" class="mt-2 form-control @error('subject') is-invalid @enderror"
+                            placeholder="Objet" name="objet">
+                        @error('subject')
+                            <span class="invalid-feedback" role="alert">
+                                <strong>{{ $message }}</strong>
+                            </span>
+                        @enderror
+                    </div>
+
+                    <div class="form-group">
+                        <label> Message </label>
+                        <textarea class="mt-2 form-control textarea @error('message') is-invalid @enderror" placeholder="Message"
+                            name="message"></textarea>
+                        @error('message')
+                            <span class="invalid-feedback" role="alert">
+                                <strong>{{ $message }}</strong>
+                            </span>
+                        @enderror
+
+                    </div>
+                    <div class="update ml-auto mr-auto">
+                        <button type="submit" class="btn btn-success btn-round">Envoyer</button>
+                    </div>
+                  </form>
+                </div>
+
+            </div>
+        </div>
+    @endsection

+ 15 - 0
resources/views/frontend/devis/email-devis.blade.php

@@ -0,0 +1,15 @@
+<h2>Hello Admin,</h2>
+<b>Nom:</b> {{ $nom }} <br>
+
+<b>Email:</b> {{ $email }}<br>
+
+
+<b>Telephone:</b> {{ $telephone }}<br>
+
+
+
+<b>Subject:</b> {{ $objet }}<br>
+
+<b>Message:</b> {{ $user_message }}<br>
+
+Thank You

+ 41 - 8
resources/views/frontend/home.blade.php

@@ -27,11 +27,6 @@
                     <div class="swiper-slide-caption section-md">
                         <div class="container">
                             <div class="swiper-box">
-                                <h5 class="swiper-title-3" data-caption-animate="fadeInRight" data-caption-delay="200">Smart watches & tablets for everyone</h5>
-                                <h2 class="swiper-title-1" data-caption-animate="fadeInLeft" data-caption-delay="100">{!! html_entity_decode ($slide->details)!!}</h2>
-
-                                <h3 class="swiper-title-2" data-caption-animate="fadeInRight" data-caption-delay="200">Choose your next favorite accessory or gadget</h3>
-                                <div class="button-wrap" data-caption-animate="fadeInUp" data-caption-delay="300"><a class="button button-lg button-primary button-zakaria" href="grid-shop.html">Shop now</a></div>
                             </div>
                         </div>
                     </div>
@@ -478,10 +473,32 @@
         
         <!-- Section Clients-->
         <section class="section section-lg ">
-            <div class="container center" style="justify-content: center;
-    display: flex;">
-            <img class="brand-logo-dark" src="{{asset('frontend/images/valeurs.jpg')}}" alt="" />
+         <div class="">
+
+         
+                <div class="row">
+                    <div class="col-lg-3 valeur mt-4">
+                        <img class="brand-logo-dark" src="{{asset('frontend/images/garantie.png')}}" alt="" />
+                        <h6 class="mt-4">Qualité et Garantie</h6>
+                    </div>
+                    <div class="col-lg-3 valeur mt-4">
+                        <img class="brand-logo-dark" src="{{asset('frontend/images/guider.png')}}" alt="" />
+                        <h6 class="mt-4">Accompagnement</h6>
+
+                    </div><div class="col-lg-3 valeur mt-4">
+                        <img class="brand-logo-dark" src="{{asset('frontend/images/livraison.png')}}" alt="" />
+                        <h6 class="mt-4" style="padding-top: 40px;">Livraison Disponible</h6>
+
+                    </div>
+                    <div class="col-lg-3 valeur mt-4">
+                        
+                        <img class="brand-logo-dark" src="{{asset('frontend/images/sav.png')}}" alt="" />
+                        <h6 class="mt-4" style="padding-top: 39px;">Service aprés vente</h6>
+
+                    </div>
+                </div>
             </div>
+            
         </section>
         <!-- Page Footer-->
         
@@ -498,6 +515,22 @@
     top: -30px;
 
    }
+   .valeur h6{
+    font-size: 19px;
+    font-weight: 800;
+    color: #d52424;
+   }
+   @media only screen and (max-width: 600px) {
+    .owl-nav-1.owl-nav-2.disabled:before{ 
+
+    left: -28px;
+    z-index: 2;
+    top: -64px;
+    transform: scale(.5);
+}
+
+   }
+
   
 </style>
 

Файловите разлики са ограничени, защото са твърде много
+ 36 - 25
resources/views/frontend/layouts/navBar.blade.php


+ 14 - 9
resources/views/frontend/produits/produit.blade.php

@@ -48,7 +48,7 @@
                     <form class="rd-search form-search" action="{{route('produits.search')}}" method="GET">
                       <div class="form-wrap">
                         <input class="form-input" id="search-form" type="text" name="q" autocomplete="off">
-                        <label class="form-label" for="search-form">Search the shop...</label>
+                        <label class="form-label" for="search-form">Recherche...</label>
                         <button class="button-search fl-bigmug-line-search74" type="submit"></button>
                       </div>
                     </form>
@@ -61,11 +61,18 @@
 
               
         <div class="col-lg-8 col-xl-9">
+        
+         
           
+             
+        
+          @if ($category)
+              {{$category->nom}}
+          @endif
           <div class="row row-30 row-lg-50">
-            @foreach ($produits as $produit)
-                
-           
+            
+                @foreach ($produits as $produit)
+            
             <div class="col-sm-6 col-md-4 col-lg-6 col-xl-4">
               <!-- Product-->
               <article class="product">
@@ -92,13 +99,11 @@
               </article>
             </div>
             
-           
-            @endforeach
-           
-            
-           
+           @endforeach
            
           </div>
+          
+
           <div class="pagination-wrap">
             <!-- Bootstrap Pagination-->
             {!! $produits->links()!!}

+ 1 - 1
resources/views/frontend/produits/search.blade.php

@@ -45,7 +45,7 @@
               <form class="rd-search form-search" action="{{route('produits.search')}}" method="GET">
                 <div class="form-wrap">
                   <input class="form-input" id="search-form" type="text" name="q" autocomplete="off">
-                  <label class="form-label" for="search-form">Search the shop...</label>
+                  <label class="form-label" for="search-form">Recherche...</label>
                   <button class="button-search fl-bigmug-line-search74" type="submit"></button>
                 </div>
               </form>

Файловите разлики са ограничени, защото са твърде много
+ 537 - 16
resources/views/home.blade.php


+ 25 - 3
resources/views/layouts/idara/panel.blade.php

@@ -32,7 +32,7 @@
                         <span class="link_name">Presentation</span>
 
                     </a>
-                   
+
                 </div>
                 <ul class="sub-menu">
                     <li><a class="link_name" href="{{route('presentations')}}">Presentation</a></li>
@@ -68,7 +68,7 @@
                     <li><a class="link_name" href="{{route('produits')}}">Produit</a></li>
                 </ul>
             </li>
-           
+
             <li>
                 <a href="{{route('promotions')}}">
                     <i class="fa-sharp fa-solid fa-percent"></i>
@@ -87,7 +87,16 @@
                     <li><a class="link_name" href="{{route('contacts')}}">contact</a></li>
                 </ul>
             </li>
-            
+            <li>
+                <a href="{{route('demande')}}">
+                    <i class="fa-solid fa-address-book"></i>
+                    <span class="link_name">Devis</span>
+                </a>
+                <ul class="sub-menu blank">
+                    <li><a class="link_name" href="{{route('demande')}}">Devis</a></li>
+                </ul>
+            </li>
+
             <li class="profile">
                 <a  href="{{ route('logout') }}"
                      onclick="event.preventDefault();
@@ -120,6 +129,19 @@
         </main>
 
     </section>
+
+    <section>
+
+        {{-- <footer style="height:120px;margin-top:100px" class="">
+<p class="center" style="text-align: center;"><span>&copy;&nbsp; </span><span class="copyright-year"></span><span>&nbsp;</span><span>Tifawt Technologie</span><span>.&nbsp; Tous droits reservé.</span><span>&nbsp;</span>.Dévelopé par<a href="http://www.softart-dz.net/"> SOFTART.</a><span></span></p>
+
+</footer> --}}
+    </section>
+
+
+
+
+
     <script>
         let arrow = document.querySelectorAll(".arrow");
         for (var i = 0; i < arrow.length; i++) {

+ 15 - 1
routes/web.php

@@ -21,7 +21,12 @@ use Illuminate\Support\Facades\Route;
 Route::fallback(function() {
     return view('404'); // la vue 404.blade.php
  });
+Route::fallback([App\Http\Controllers\frontend\ErrorController::class, 'index']);
+
 //Presentation backend
+
+Route::post('upload_image',[App\Http\Controllers\backend\ckEditorController::class, 'uploadImg'])->name('upload');
+
 Route::get('/idara/dash', [App\Http\Controllers\backend\PresentationController::class, 'admin'])->name('dashboard');
 
 Route::get('/idara/presentations', [App\Http\Controllers\backend\PresentationController::class, 'Index'])->name('presentations');
@@ -157,7 +162,7 @@ Route::get('send', [App\Http\Controllers\backend\NotifyController::class, 'Index
 Route::get('/tifawt', [App\Http\Controllers\frontend\PresentationController::class, 'index'])->name('tifawt.index');
 
 
-Auth::routes(['login' => false]);
+Auth::routes(['login' => false, 'register' => false]);
 
 Route::get('/send-notification', [backend\NotificationController::class, 'sendPromotionNotification']);
 
@@ -170,6 +175,7 @@ Route::get('/produits/{categorieId?}', [App\Http\Controllers\frontend\ProduitCon
 Route::get('/produits/details/{id}', [App\Http\Controllers\frontend\ProduitController::class, 'show'])->name('produit.show');
 
 
+Route::delete("deleteDoc/{id}", [App\Http\Controllers\backend\ProduitController::class, "deleteDoc"]);
 
 
 Route::get('/promotions', [App\Http\Controllers\frontend\PromotionController::class, 'index'])->name('promotions.index');
@@ -182,6 +188,14 @@ Route::get('/contact', [App\Http\Controllers\frontend\ContactController::class,
 Route::post('/contactez-nous', [App\Http\Controllers\frontend\ContactController::class, 'store'])->name('contactez-nous');
 
 
+Route::get('/devis', [App\Http\Controllers\frontend\DeviController::class, 'index'])->name('devis');
+Route::post('/devis/store', [App\Http\Controllers\frontend\DeviController::class, 'store'])->name('devis.store');
+
+
+Route::get('/idara/demande', [App\Http\Controllers\backend\DemandeDevisController::class, 'index'])->name('demande');
+Route::get('/idara/demande/show/{id}/', [App\Http\Controllers\backend\DemandeDevisController::class, 'show'])->name('demande.show');
+
+
 Route::get('/idara', 'App\Http\Controllers\Auth\LoginController@showLoginForm')->name('login');
 Route::post('idara', 'App\Http\Controllers\Auth\LoginController@login')
 ->name('login.post');