Selaa lähdekoodia

Change the project structure to follow that of the server

Daoud BAHAZ 1 vuosi sitten
vanhempi
commit
ee836bfe98
100 muutettua tiedostoa jossa 446 lisäystä ja 136 poistoa
  1. 0 0
      core/.editorconfig
  2. 1 1
      .env.example
  3. 63 0
      core/.env.local
  4. 0 0
      core/.gitattributes
  5. 0 0
      core/.gitignore
  6. 0 0
      core/.styleci.yml
  7. 0 0
      core/README.md
  8. 0 0
      core/app/Console/Commands/TruncateOldItems.php
  9. 0 0
      core/app/Console/Kernel.php
  10. 0 0
      core/app/Exceptions/Handler.php
  11. 0 0
      core/app/Http/Controllers/Auth/ConfirmPasswordController.php
  12. 0 0
      core/app/Http/Controllers/Auth/ForgotPasswordController.php
  13. 0 0
      core/app/Http/Controllers/Auth/LoginController.php
  14. 0 0
      core/app/Http/Controllers/Auth/RegisterController.php
  15. 0 0
      core/app/Http/Controllers/Auth/ResetPasswordController.php
  16. 0 0
      core/app/Http/Controllers/Auth/VerificationController.php
  17. 0 0
      core/app/Http/Controllers/Controller.php
  18. 0 0
      core/app/Http/Controllers/HomeController.php
  19. 0 4
      app/Http/Controllers/backend/CategorieController.php
  20. 0 0
      core/app/Http/Controllers/backend/ContactController.php
  21. 0 0
      core/app/Http/Controllers/backend/DemandeDevisController.php
  22. 189 0
      core/app/Http/Controllers/backend/LogicielController.php
  23. 0 0
      core/app/Http/Controllers/backend/MediaController.php
  24. 0 0
      core/app/Http/Controllers/backend/NotificationController.php
  25. 0 0
      core/app/Http/Controllers/backend/PresentationController.php
  26. 3 6
      app/Http/Controllers/backend/ProduitController.php
  27. 6 2
      app/Http/Controllers/backend/PromotionController.php
  28. 0 0
      core/app/Http/Controllers/backend/SlideController.php
  29. 0 0
      core/app/Http/Controllers/backend/ckEditorController.php
  30. 4 4
      app/Http/Controllers/frontend/ContactController.php
  31. 9 9
      app/Http/Controllers/frontend/DeviController.php
  32. 0 0
      core/app/Http/Controllers/frontend/ErrorController.php
  33. 0 0
      core/app/Http/Controllers/frontend/HomeController.php
  34. 36 0
      core/app/Http/Controllers/frontend/LogicielController.php
  35. 0 0
      core/app/Http/Controllers/frontend/PresentationController.php
  36. 0 0
      core/app/Http/Controllers/frontend/ProduitController.php
  37. 0 0
      core/app/Http/Controllers/frontend/PromotionController.php
  38. 0 0
      core/app/Http/Kernel.php
  39. 0 0
      core/app/Http/Middleware/Authenticate.php
  40. 0 0
      core/app/Http/Middleware/EncryptCookies.php
  41. 0 0
      core/app/Http/Middleware/PreventRequestsDuringMaintenance.php
  42. 0 0
      core/app/Http/Middleware/RedirectIfAuthenticated.php
  43. 0 0
      core/app/Http/Middleware/TrimStrings.php
  44. 0 0
      core/app/Http/Middleware/TrustHosts.php
  45. 0 0
      core/app/Http/Middleware/TrustProxies.php
  46. 0 0
      core/app/Http/Middleware/VerifyCsrfToken.php
  47. 0 0
      core/app/Http/Requests/Produitrequest.php
  48. 0 0
      core/app/Http/Traits/EditorTrait.php
  49. 0 0
      core/app/Listeners/SendPromotionNotification.php
  50. 0 0
      core/app/Models/Categorie.php
  51. 0 0
      core/app/Models/CategorieProduit.php
  52. 0 0
      core/app/Models/Contact.php
  53. 0 0
      core/app/Models/Coordonnee.php
  54. 0 0
      core/app/Models/Devi.php
  55. 0 0
      core/app/Models/Fromcontact.php
  56. 14 0
      core/app/Models/Logiciel.php
  57. 0 0
      core/app/Models/Media.php
  58. 0 0
      core/app/Models/Presentation.php
  59. 0 0
      core/app/Models/Produit.php
  60. 1 0
      app/Models/Promotion.php
  61. 0 0
      core/app/Models/Slide.php
  62. 0 0
      core/app/Models/User.php
  63. 0 0
      core/app/Models/temporaryFile.php
  64. 0 0
      core/app/Notifications/PromotionNotification.php
  65. 0 0
      core/app/Providers/AppServiceProvider.php
  66. 0 0
      core/app/Providers/AuthServiceProvider.php
  67. 0 0
      core/app/Providers/BroadcastServiceProvider.php
  68. 0 0
      core/app/Providers/EventServiceProvider.php
  69. 0 0
      core/app/Providers/RouteServiceProvider.php
  70. 0 0
      core/artisan
  71. 0 0
      core/bootstrap/app.php
  72. 0 0
      core/bootstrap/cache/.gitignore
  73. 3 3
      composer.json
  74. 95 95
      composer.lock
  75. 12 12
      config/app.php
  76. 0 0
      core/config/auth.php
  77. 0 0
      core/config/broadcasting.php
  78. 0 0
      core/config/cache.php
  79. 0 0
      core/config/cors.php
  80. 0 0
      core/config/database.php
  81. 10 0
      config/filesystems.php
  82. 0 0
      core/config/hashing.php
  83. 0 0
      core/config/logging.php
  84. 0 0
      core/config/mail.php
  85. 0 0
      core/config/queue.php
  86. 0 0
      core/config/sanctum.php
  87. 0 0
      core/config/services.php
  88. 0 0
      core/config/session.php
  89. 0 0
      core/config/view.php
  90. 0 0
      core/css/custom.css
  91. 0 0
      core/database/.gitignore
  92. 0 0
      core/database/factories/UserFactory.php
  93. 0 0
      core/database/migrations/2014_10_12_000000_create_users_table.php
  94. 0 0
      core/database/migrations/2014_10_12_100000_create_password_resets_table.php
  95. 0 0
      core/database/migrations/2019_08_19_000000_create_failed_jobs_table.php
  96. 0 0
      core/database/migrations/2019_12_14_000001_create_personal_access_tokens_table.php
  97. 0 0
      core/database/migrations/2023_02_20_104326_create_presentations_table.php
  98. 0 0
      core/database/migrations/2023_03_05_113730_create_slides_table.php
  99. 0 0
      core/database/migrations/2023_03_07_095545_create_categories_table.php
  100. 0 0
      database/migrations/2023_03_07_095755_create_produits_table.php

.editorconfig → core/.editorconfig


+ 1 - 1
.env.example

@@ -34,7 +34,7 @@ MAIL_PORT=1025
 MAIL_USERNAME=null
 MAIL_PASSWORD=null
 MAIL_ENCRYPTION=null
-MAIL_FROM_ADDRESS=null
+MAIL_FROM_ADDRESS="hello@example.com"
 MAIL_FROM_NAME="${APP_NAME}"
 
 AWS_ACCESS_KEY_ID=

+ 63 - 0
core/.env.local

@@ -0,0 +1,63 @@
+APP_NAME=Laravel
+APP_ENV=local
+APP_KEY=base64:vqZjpVibpt0uCaOJZwYruEjOlz0Ul18MYWredV9ZYBY=
+APP_DEBUG=true
+APP_URL=http://localhost
+
+LOG_CHANNEL=stack
+LOG_DEPRECATIONS_CHANNEL=null
+LOG_LEVEL=debug
+
+DB_CONNECTION=mysql
+DB_HOST=127.0.0.1
+DB_PORT=3306
+DB_DATABASE=tifawt
+DB_USERNAME=root
+DB_PASSWORD=
+
+BROADCAST_DRIVER=log
+CACHE_DRIVER=file
+FILESYSTEM_DISK=local
+QUEUE_CONNECTION=sync
+SESSION_DRIVER=file
+SESSION_LIFETIME=120
+
+MEMCACHED_HOST=127.0.0.1
+
+REDIS_HOST=127.0.0.1
+REDIS_PASSWORD=null
+REDIS_PORT=6379
+
+
+MAIL_MAILER=smtp
+MAIL_HOST=smtp.mailtrap.io
+MAIL_PORT=587
+MAIL_USERNAME=e560cbc74a6e1f
+MAIL_PASSWORD=bca4818bf1ba87
+MAIL_ENCRYPTION=null
+MAIL_FROM_ADDRESS=null
+MAIL_FROM_NAME="${APP_NAME}"
+
+
+AWS_ACCESS_KEY_ID=
+AWS_SECRET_ACCESS_KEY=
+AWS_DEFAULT_REGION=us-east-1
+AWS_BUCKET=
+AWS_USE_PATH_STYLE_ENDPOINT=false
+
+PUSHER_APP_ID=
+PUSHER_APP_KEY=
+PUSHER_APP_SECRET=
+PUSHER_APP_CLUSTER=mt1
+
+MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
+MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
+
+
+IMG_WIDTH=1080
+IMG_HEIGHT=607
+IMG_QUALITY=0.75
+IMG_RATIO=1.8
+MAX_FILES=2
+MAX_FILE_SIZE="5M"
+INSTANT_UPLOAD="'false'"

.gitattributes → core/.gitattributes


.gitignore → core/.gitignore


.styleci.yml → core/.styleci.yml


README.md → core/README.md


app/Console/Commands/TruncateOldItems.php → core/app/Console/Commands/TruncateOldItems.php


app/Console/Kernel.php → core/app/Console/Kernel.php


app/Exceptions/Handler.php → core/app/Exceptions/Handler.php


app/Http/Controllers/Auth/ConfirmPasswordController.php → core/app/Http/Controllers/Auth/ConfirmPasswordController.php


app/Http/Controllers/Auth/ForgotPasswordController.php → core/app/Http/Controllers/Auth/ForgotPasswordController.php


app/Http/Controllers/Auth/LoginController.php → core/app/Http/Controllers/Auth/LoginController.php


app/Http/Controllers/Auth/RegisterController.php → core/app/Http/Controllers/Auth/RegisterController.php


app/Http/Controllers/Auth/ResetPasswordController.php → core/app/Http/Controllers/Auth/ResetPasswordController.php


app/Http/Controllers/Auth/VerificationController.php → core/app/Http/Controllers/Auth/VerificationController.php


app/Http/Controllers/Controller.php → core/app/Http/Controllers/Controller.php


app/Http/Controllers/HomeController.php → core/app/Http/Controllers/HomeController.php


+ 0 - 4
app/Http/Controllers/backend/CategorieController.php

@@ -47,8 +47,6 @@ class CategorieController extends Controller
                    'nom' => $request->nom,
                    'image' => $tmp_file->folder . '/' . $tmp_file->file,
                    'mot_cle' =>  $request->mot_cle,
-
-
                    'titre_seo' => $request->titre_seo,
 
 
@@ -61,9 +59,7 @@ class CategorieController extends Controller
                         [
                             '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,
 
 

app/Http/Controllers/backend/ContactController.php → core/app/Http/Controllers/backend/ContactController.php


app/Http/Controllers/backend/DemandeDevisController.php → core/app/Http/Controllers/backend/DemandeDevisController.php


+ 189 - 0
core/app/Http/Controllers/backend/LogicielController.php

@@ -0,0 +1,189 @@
+<?php
+
+namespace App\Http\Controllers\backend;
+
+use App\Http\Controllers\Controller;
+use App\Models\Logiciel;
+use Illuminate\Support\Facades\Storage;
+use Illuminate\Support\Facades\Redirect;
+
+use App\Models\temporaryFile;
+
+use Illuminate\Http\Request;
+
+class LogicielController extends Controller
+{
+    public function index()
+    {
+        $articles = Logiciel::paginate(15);
+
+        return view("backend.logiciel.index", compact('articles'));
+    }
+
+    public function create()
+    {
+
+        return view("backend.logiciel.create");
+    }
+
+    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);
+
+            if ($request->filled('titre_seo')) {
+                Logiciel::create(
+                    [
+                        'nom' => $request->nom,
+                        'description' => $request->description,
+                        'prix' => $request->prix,
+                        'prix_etat' => $request->input('prix_etat', '0'),
+                        'image' => $tmp_file->folder . '/' . $tmp_file->file,
+                        'mot_cle' =>  $request->mot_cle,
+                        'resume_seo' =>  $request->resume_seo,
+                        'titre_seo' => $request->titre_seo,
+
+
+                    ],
+                );
+            } else {
+
+                Logiciel::create(
+                    [
+                        'nom' => $request->nom,
+                        'description' => $request->description,
+                        'prix' => $request->prix,
+                        'prix_etat' => $request->input('prix_etat', '0'),
+                        'image' => $tmp_file->folder . '/' . $tmp_file->file,
+                        'mot_cle' =>  $request->mot_cle,
+                        'titre_seo' => $request->nom,
+                        'resume_seo' =>  $request->description,
+                    ],
+                );
+            }
+            Storage::deleteDirectory('image/tmp/' . $tmp_file->folder);
+            $tmp_file->delete();
+
+            return redirect()->route('logiciel.index');
+        }
+    }
+
+    public function show($id)
+    {
+        $article = Logiciel::find($id);
+
+        return view('backend.logiciel.show', ['article' => $article]);
+    }
+
+    public function changeStatus(Request $request)
+    {
+        $article = Logiciel::find($request->Id);
+        $article->etat = $request->etat;
+        $article->save();
+
+        return response()->json(['success' => 'Status change successfully.']);
+    }
+
+    public function destroy(Request $request, $id)
+    {
+
+
+        $contact = Logiciel::find($id);
+        $contact->delete();
+
+        return redirect()->route('logiciel.index');;
+    }
+
+    public function edit($id)
+    {
+
+        $article = Logiciel::find($id);
+
+        return view('backend.logiciel.edit', ['article' => $article]);
+    }
+    public function update(Request $request, $id)
+    {
+        request()->validate([
+            'nom' => 'required',
+            'description' => 'required',
+            
+        ]);
+        $article = Logiciel::find($id);
+        $article->nom = $request->input('nom');
+        $article->prix = $request->input('prix');
+
+        $article->prix_etat = $request->input('prix_etat', '0');
+        // dd(  $article->prix_etat);
+        $article->description = $request->input('description');
+
+
+        if ($request->filled('titre_seo')) {
+            $article->titre_seo = $request->input('titre_seo');
+        } else {
+            $article->titre_seo = $request->input('nom');
+        }
+        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');
+
+
+
+        $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('diapo/tmp/' . $tmp_file->folder);
+            $tmp_file->delete();
+        }
+
+        $article->save();
+        return redirect()->route('logiciel.index')->with('success', 'Modifié');
+    }
+
+
+    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
+            ]);
+            return  $folder;
+        }
+        return '';
+    }
+
+    public function deleteUpload()
+    {
+
+        $tmp_file = TemporaryFile::where('folder', request()->getContent())->first();
+        if ($tmp_file) {
+            Storage::deleteDirectory('image/tmp/' . $tmp_file->folder);
+            $tmp_file->delete();
+            return response('');
+        }
+    }
+}

app/Http/Controllers/backend/MediaController.php → core/app/Http/Controllers/backend/MediaController.php


app/Http/Controllers/backend/NotificationController.php → core/app/Http/Controllers/backend/NotificationController.php


app/Http/Controllers/backend/PresentationController.php → core/app/Http/Controllers/backend/PresentationController.php


+ 3 - 6
app/Http/Controllers/backend/ProduitController.php

@@ -27,7 +27,7 @@ class ProduitController extends Controller
     public function Index()
     {
 
-        $articles = Produit::paginate(5);
+        $articles = Produit::paginate(15);
 
         return view("backend.produit.index", compact('articles'));
     }
@@ -40,7 +40,7 @@ class ProduitController extends Controller
 
         return view('backend.produit.add', compact('categories'));
     }
-    public function store(Request $request)
+    public function store(Request $request) 
     {
         request()->validate([
             'nom' => 'required',
@@ -134,9 +134,6 @@ class ProduitController extends Controller
             'nom' => 'required',
             'description' => 'required',
             'categories' => 'required',
-
-
-
         ]);
         $article = Produit::find($id);
         $article->nom = $request->input('nom');
@@ -151,7 +148,7 @@ class ProduitController extends Controller
             $article->titre_seo = $request->input('titre_seo');
 
         }else{
-            $article->titre_seo = $request->input('titre');
+            $article->titre_seo = $request->input('nom');
 
         }
         if ($request->filled('resume_seo')) {

+ 6 - 2
app/Http/Controllers/backend/PromotionController.php

@@ -32,6 +32,7 @@ class PromotionController extends Controller
 
      public function create(){
         $produits = Produit::select('nom', 'id')->oldest('nom')->get();
+
         $produit = Promotion::with('produits')->first();
 
         return view('backend.promotion.add',compact('produits','produit'));
@@ -48,13 +49,16 @@ class PromotionController extends Controller
 
 
     ]);
-        $article = new Promotion();
+	
+  $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');
-
+		$produit = Produit::where('id',$article->produit_id)->first();
+        $article->photo = $produit->image;
+	
 
         if ($request->filled('titre_seo')) {
             $article->titre_seo = $request->input('titre_seo');

app/Http/Controllers/backend/SlideController.php → core/app/Http/Controllers/backend/SlideController.php


app/Http/Controllers/backend/ckEditorController.php → core/app/Http/Controllers/backend/ckEditorController.php


+ 4 - 4
app/Http/Controllers/frontend/ContactController.php

@@ -53,12 +53,12 @@ class ContactController extends Controller
                {
                
                 $contactRow = Contact::where('coorType_id',"=","3")->first();
-     
-                  $msg->from($request->email);
-                  $msg->to($contactRow->coordonnees);
+                     $msg->from($contactRow->coordonnees);
+                     $msg->to($request->email);
+				     $msg->subject($request->objet);
                });
 
-        return back()->with('success', 'Merci de nous avoir contacter!');
+        return back()->with('success', 'Merci de nous avoir contactés!');
 
 
 

+ 9 - 9
app/Http/Controllers/frontend/DeviController.php

@@ -51,18 +51,18 @@ class DeviController extends Controller
                  'user_message' => $request->get('message'),
              ),
 
-             function($msg) use ($request)
+           
+			   
+			     function($msg) use ($request)
                {
-
-
-                  $msg->from($request->email);
-                  $msg->to('test@gmail.coù');
-                  $msg->subject($request->objet);
-
+               
+                $contactRow = Contact::where('coorType_id',"=","3")->first();
+                  $msg->from($contactRow->coordonnees);
+                  $msg->to($request->email);
+				  $msg->subject($request->objet);
                });
 
-        return back()->with('success', 'Thank you for contact us!');
-
+               return back()->with('success', 'Merci de nous avoir contactés!');
 
 
     }

app/Http/Controllers/frontend/ErrorController.php → core/app/Http/Controllers/frontend/ErrorController.php


app/Http/Controllers/frontend/HomeController.php → core/app/Http/Controllers/frontend/HomeController.php


+ 36 - 0
core/app/Http/Controllers/frontend/LogicielController.php

@@ -0,0 +1,36 @@
+<?php
+
+namespace App\Http\Controllers\frontend;
+use App\Http\Controllers\Controller;
+use App\Models\Categorie;
+use App\Models\Contact;
+use App\Models\Logiciel;
+
+
+use Illuminate\Support\Facades\Storage;
+
+use Illuminate\Http\Request;
+
+class LogicielController extends Controller
+{
+
+    public function Index(){
+        $logiciels = Logiciel::where('etat','1')->get();
+        $categories = Categorie::where('etat','1')->get();
+        $contacts = Contact::where('etat','1')->get();
+        return view('frontend.logiciel.index',compact('logiciels','categories','contacts'));
+    } 
+
+    public function show ($id){
+
+         
+        $logiciel = Logiciel::find($id);
+          
+        $contacts = Contact::where('etat','1')->get();
+        $categories = Categorie::where('etat','1')->get();
+
+        return view('frontend.logiciel.show',compact('logiciel','contacts','categories'));
+
+
+    }
+}

app/Http/Controllers/frontend/PresentationController.php → core/app/Http/Controllers/frontend/PresentationController.php


app/Http/Controllers/frontend/ProduitController.php → core/app/Http/Controllers/frontend/ProduitController.php


app/Http/Controllers/frontend/PromotionController.php → core/app/Http/Controllers/frontend/PromotionController.php


app/Http/Kernel.php → core/app/Http/Kernel.php


app/Http/Middleware/Authenticate.php → core/app/Http/Middleware/Authenticate.php


app/Http/Middleware/EncryptCookies.php → core/app/Http/Middleware/EncryptCookies.php


app/Http/Middleware/PreventRequestsDuringMaintenance.php → core/app/Http/Middleware/PreventRequestsDuringMaintenance.php


app/Http/Middleware/RedirectIfAuthenticated.php → core/app/Http/Middleware/RedirectIfAuthenticated.php


app/Http/Middleware/TrimStrings.php → core/app/Http/Middleware/TrimStrings.php


app/Http/Middleware/TrustHosts.php → core/app/Http/Middleware/TrustHosts.php


app/Http/Middleware/TrustProxies.php → core/app/Http/Middleware/TrustProxies.php


app/Http/Middleware/VerifyCsrfToken.php → core/app/Http/Middleware/VerifyCsrfToken.php


app/Http/Requests/Produitrequest.php → core/app/Http/Requests/Produitrequest.php


app/Http/Traits/EditorTrait.php → core/app/Http/Traits/EditorTrait.php


app/Listeners/SendPromotionNotification.php → core/app/Listeners/SendPromotionNotification.php


app/Models/Categorie.php → core/app/Models/Categorie.php


app/Models/CategorieProduit.php → core/app/Models/CategorieProduit.php


app/Models/Contact.php → core/app/Models/Contact.php


app/Models/Coordonnee.php → core/app/Models/Coordonnee.php


app/Models/Devi.php → core/app/Models/Devi.php


app/Models/Fromcontact.php → core/app/Models/Fromcontact.php


+ 14 - 0
core/app/Models/Logiciel.php

@@ -0,0 +1,14 @@
+<?php
+
+namespace App\Models;
+
+use Illuminate\Database\Eloquent\Factories\HasFactory;
+use Illuminate\Database\Eloquent\Model;
+
+class Logiciel extends Model
+{
+    use HasFactory;
+
+    protected $fillable = ['nom', 'description','prix','prix_etat','image','titre_seo','resume_seo','mot_cle'];
+
+}

app/Models/Media.php → core/app/Models/Media.php


app/Models/Presentation.php → core/app/Models/Presentation.php


app/Models/Produit.php → core/app/Models/Produit.php


+ 1 - 0
app/Models/Promotion.php

@@ -16,5 +16,6 @@ class Promotion extends Model
     {
         return $this->belongsTo(Produit::class,'produit_id','id');
     }
+	
 
 }

app/Models/Slide.php → core/app/Models/Slide.php


app/Models/User.php → core/app/Models/User.php


app/Models/temporaryFile.php → core/app/Models/temporaryFile.php


app/Notifications/PromotionNotification.php → core/app/Notifications/PromotionNotification.php


app/Providers/AppServiceProvider.php → core/app/Providers/AppServiceProvider.php


app/Providers/AuthServiceProvider.php → core/app/Providers/AuthServiceProvider.php


app/Providers/BroadcastServiceProvider.php → core/app/Providers/BroadcastServiceProvider.php


app/Providers/EventServiceProvider.php → core/app/Providers/EventServiceProvider.php


app/Providers/RouteServiceProvider.php → core/app/Providers/RouteServiceProvider.php


artisan → core/artisan


bootstrap/app.php → core/bootstrap/app.php


bootstrap/cache/.gitignore → core/bootstrap/cache/.gitignore


+ 3 - 3
composer.json

@@ -5,17 +5,17 @@
     "keywords": ["framework", "laravel"],
     "license": "MIT",
     "require": {
-        "php": "^8.0",
+        "php": "^8.0.2",
         "fruitcake/laravel-cors": "^2.0.5",
         "guzzlehttp/guzzle": "^7.2",
         "laravel/framework": "^9.0",
         "laravel/sanctum": "^2.14",
-        "laravel/tinker": "^2.7"
+        "laravel/tinker": "^2.7",
+        "laravel/ui": "^4.2"
     },
     "require-dev": {
         "fakerphp/faker": "^1.9.1",
         "laravel/sail": "^1.0.1",
-        "laravel/ui": "^4.2",
         "mockery/mockery": "^1.4.4",
         "nunomaduro/collision": "^6.1",
         "phpunit/phpunit": "^9.5.10",

+ 95 - 95
composer.lock

@@ -4,7 +4,7 @@
         "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
         "This file is @generated automatically"
     ],
-    "content-hash": "17d1213c61aef963f6e5452d191e8200",
+    "content-hash": "4147eadf310f4c7b2ccb91e5ab775ae3",
     "packages": [
         {
             "name": "asm89/stack-cors",
@@ -915,16 +915,16 @@
         },
         {
             "name": "guzzlehttp/psr7",
-            "version": "2.4.4",
+            "version": "2.4.3",
             "source": {
                 "type": "git",
                 "url": "https://github.com/guzzle/psr7.git",
-                "reference": "3cf1b6d4f0c820a2cf8bcaec39fc698f3443b5cf"
+                "reference": "67c26b443f348a51926030c83481b85718457d3d"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/guzzle/psr7/zipball/3cf1b6d4f0c820a2cf8bcaec39fc698f3443b5cf",
-                "reference": "3cf1b6d4f0c820a2cf8bcaec39fc698f3443b5cf",
+                "url": "https://api.github.com/repos/guzzle/psr7/zipball/67c26b443f348a51926030c83481b85718457d3d",
+                "reference": "67c26b443f348a51926030c83481b85718457d3d",
                 "shasum": ""
             },
             "require": {
@@ -1014,7 +1014,7 @@
             ],
             "support": {
                 "issues": "https://github.com/guzzle/psr7/issues",
-                "source": "https://github.com/guzzle/psr7/tree/2.4.4"
+                "source": "https://github.com/guzzle/psr7/tree/2.4.3"
             },
             "funding": [
                 {
@@ -1030,7 +1030,7 @@
                     "type": "tidelift"
                 }
             ],
-            "time": "2023-03-09T13:19:02+00:00"
+            "time": "2022-10-26T14:07:24+00:00"
         },
         {
             "name": "guzzlehttp/uri-template",
@@ -1507,6 +1507,68 @@
             },
             "time": "2023-02-15T16:40:09+00:00"
         },
+        {
+            "name": "laravel/ui",
+            "version": "v4.2.1",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/laravel/ui.git",
+                "reference": "05ff7ac1eb55e2dfd10edcfb18c953684d693907"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/laravel/ui/zipball/05ff7ac1eb55e2dfd10edcfb18c953684d693907",
+                "reference": "05ff7ac1eb55e2dfd10edcfb18c953684d693907",
+                "shasum": ""
+            },
+            "require": {
+                "illuminate/console": "^9.21|^10.0",
+                "illuminate/filesystem": "^9.21|^10.0",
+                "illuminate/support": "^9.21|^10.0",
+                "illuminate/validation": "^9.21|^10.0",
+                "php": "^8.0"
+            },
+            "require-dev": {
+                "orchestra/testbench": "^7.0|^8.0",
+                "phpunit/phpunit": "^9.3"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "4.x-dev"
+                },
+                "laravel": {
+                    "providers": [
+                        "Laravel\\Ui\\UiServiceProvider"
+                    ]
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "Laravel\\Ui\\": "src/",
+                    "Illuminate\\Foundation\\Auth\\": "auth-backend/"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Taylor Otwell",
+                    "email": "taylor@laravel.com"
+                }
+            ],
+            "description": "Laravel UI utilities and presets.",
+            "keywords": [
+                "laravel",
+                "ui"
+            ],
+            "support": {
+                "source": "https://github.com/laravel/ui/tree/v4.2.1"
+            },
+            "time": "2023-02-17T09:17:24+00:00"
+        },
         {
             "name": "league/commonmark",
             "version": "2.3.9",
@@ -5684,16 +5746,16 @@
         },
         {
             "name": "filp/whoops",
-            "version": "2.15.1",
+            "version": "2.15.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/filp/whoops.git",
-                "reference": "e864ac957acd66e1565f25efda61e37791a5db0b"
+                "reference": "3e8aebbca9f0ae6f618962c4ad514077fd365ab3"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/filp/whoops/zipball/e864ac957acd66e1565f25efda61e37791a5db0b",
-                "reference": "e864ac957acd66e1565f25efda61e37791a5db0b",
+                "url": "https://api.github.com/repos/filp/whoops/zipball/3e8aebbca9f0ae6f618962c4ad514077fd365ab3",
+                "reference": "3e8aebbca9f0ae6f618962c4ad514077fd365ab3",
                 "shasum": ""
             },
             "require": {
@@ -5743,7 +5805,7 @@
             ],
             "support": {
                 "issues": "https://github.com/filp/whoops/issues",
-                "source": "https://github.com/filp/whoops/tree/2.15.1"
+                "source": "https://github.com/filp/whoops/tree/2.15.0"
             },
             "funding": [
                 {
@@ -5751,7 +5813,7 @@
                     "type": "github"
                 }
             ],
-            "time": "2023-03-06T18:09:13+00:00"
+            "time": "2023-03-03T12:00:00+00:00"
         },
         {
             "name": "hamcrest/hamcrest-php",
@@ -5806,16 +5868,16 @@
         },
         {
             "name": "laravel/sail",
-            "version": "v1.21.2",
+            "version": "v1.21.1",
             "source": {
                 "type": "git",
                 "url": "https://github.com/laravel/sail.git",
-                "reference": "19d6fe167e2389b41fe1b4ee52293d1eaf8a43fc"
+                "reference": "fd8d04bc546457b504aa2b3c2d541840551f836f"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/laravel/sail/zipball/19d6fe167e2389b41fe1b4ee52293d1eaf8a43fc",
-                "reference": "19d6fe167e2389b41fe1b4ee52293d1eaf8a43fc",
+                "url": "https://api.github.com/repos/laravel/sail/zipball/fd8d04bc546457b504aa2b3c2d541840551f836f",
+                "reference": "fd8d04bc546457b504aa2b3c2d541840551f836f",
                 "shasum": ""
             },
             "require": {
@@ -5867,69 +5929,7 @@
                 "issues": "https://github.com/laravel/sail/issues",
                 "source": "https://github.com/laravel/sail"
             },
-            "time": "2023-03-06T14:23:15+00:00"
-        },
-        {
-            "name": "laravel/ui",
-            "version": "v4.2.1",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/laravel/ui.git",
-                "reference": "05ff7ac1eb55e2dfd10edcfb18c953684d693907"
-            },
-            "dist": {
-                "type": "zip",
-                "url": "https://api.github.com/repos/laravel/ui/zipball/05ff7ac1eb55e2dfd10edcfb18c953684d693907",
-                "reference": "05ff7ac1eb55e2dfd10edcfb18c953684d693907",
-                "shasum": ""
-            },
-            "require": {
-                "illuminate/console": "^9.21|^10.0",
-                "illuminate/filesystem": "^9.21|^10.0",
-                "illuminate/support": "^9.21|^10.0",
-                "illuminate/validation": "^9.21|^10.0",
-                "php": "^8.0"
-            },
-            "require-dev": {
-                "orchestra/testbench": "^7.0|^8.0",
-                "phpunit/phpunit": "^9.3"
-            },
-            "type": "library",
-            "extra": {
-                "branch-alias": {
-                    "dev-master": "4.x-dev"
-                },
-                "laravel": {
-                    "providers": [
-                        "Laravel\\Ui\\UiServiceProvider"
-                    ]
-                }
-            },
-            "autoload": {
-                "psr-4": {
-                    "Laravel\\Ui\\": "src/",
-                    "Illuminate\\Foundation\\Auth\\": "auth-backend/"
-                }
-            },
-            "notification-url": "https://packagist.org/downloads/",
-            "license": [
-                "MIT"
-            ],
-            "authors": [
-                {
-                    "name": "Taylor Otwell",
-                    "email": "taylor@laravel.com"
-                }
-            ],
-            "description": "Laravel UI utilities and presets.",
-            "keywords": [
-                "laravel",
-                "ui"
-            ],
-            "support": {
-                "source": "https://github.com/laravel/ui/tree/v4.2.1"
-            },
-            "time": "2023-02-17T09:17:24+00:00"
+            "time": "2023-03-01T23:07:57+00:00"
         },
         {
             "name": "mockery/mockery",
@@ -6005,16 +6005,16 @@
         },
         {
             "name": "myclabs/deep-copy",
-            "version": "1.11.1",
+            "version": "1.11.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/myclabs/DeepCopy.git",
-                "reference": "7284c22080590fb39f2ffa3e9057f10a4ddd0e0c"
+                "reference": "14daed4296fae74d9e3201d2c4925d1acb7aa614"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/7284c22080590fb39f2ffa3e9057f10a4ddd0e0c",
-                "reference": "7284c22080590fb39f2ffa3e9057f10a4ddd0e0c",
+                "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/14daed4296fae74d9e3201d2c4925d1acb7aa614",
+                "reference": "14daed4296fae74d9e3201d2c4925d1acb7aa614",
                 "shasum": ""
             },
             "require": {
@@ -6052,7 +6052,7 @@
             ],
             "support": {
                 "issues": "https://github.com/myclabs/DeepCopy/issues",
-                "source": "https://github.com/myclabs/DeepCopy/tree/1.11.1"
+                "source": "https://github.com/myclabs/DeepCopy/tree/1.11.0"
             },
             "funding": [
                 {
@@ -6060,7 +6060,7 @@
                     "type": "tidelift"
                 }
             ],
-            "time": "2023-03-08T13:26:56+00:00"
+            "time": "2022-03-03T13:19:32+00:00"
         },
         {
             "name": "nunomaduro/collision",
@@ -6581,16 +6581,16 @@
         },
         {
             "name": "phpunit/phpunit",
-            "version": "9.6.5",
+            "version": "9.6.4",
             "source": {
                 "type": "git",
                 "url": "https://github.com/sebastianbergmann/phpunit.git",
-                "reference": "86e761949019ae83f49240b2f2123fb5ab3b2fc5"
+                "reference": "9125ee085b6d95e78277dc07aa1f46f9e0607b8d"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/86e761949019ae83f49240b2f2123fb5ab3b2fc5",
-                "reference": "86e761949019ae83f49240b2f2123fb5ab3b2fc5",
+                "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/9125ee085b6d95e78277dc07aa1f46f9e0607b8d",
+                "reference": "9125ee085b6d95e78277dc07aa1f46f9e0607b8d",
                 "shasum": ""
             },
             "require": {
@@ -6623,8 +6623,8 @@
                 "sebastian/version": "^3.0.2"
             },
             "suggest": {
-                "ext-soap": "To be able to generate mocks based on WSDL files",
-                "ext-xdebug": "PHP extension that provides line coverage as well as branch and path coverage"
+                "ext-soap": "*",
+                "ext-xdebug": "*"
             },
             "bin": [
                 "phpunit"
@@ -6663,7 +6663,7 @@
             ],
             "support": {
                 "issues": "https://github.com/sebastianbergmann/phpunit/issues",
-                "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.5"
+                "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.4"
             },
             "funding": [
                 {
@@ -6679,7 +6679,7 @@
                     "type": "tidelift"
                 }
             ],
-            "time": "2023-03-09T06:34:10+00:00"
+            "time": "2023-02-27T13:06:37+00:00"
         },
         {
             "name": "sebastian/cli-parser",
@@ -8071,7 +8071,7 @@
     "prefer-stable": true,
     "prefer-lowest": false,
     "platform": {
-        "php": "^8.0"
+        "php": "^8.0.2"
     },
     "platform-dev": [],
     "plugin-api-version": "2.3.0"

+ 12 - 12
config/app.php

@@ -193,37 +193,37 @@ return [
     'aliases' => Facade::defaultAliases()->merge([
         // ...
     ])->toArray(),
-
+ 
         // filepond config
 
-	  'IMG_WIDTH'=>1080,
+	    'IMG_WIDTH'=>1080,
         'IMG_HEIGHT'=>607,
-       'IMG_QUALITY'=>0.75,
-       'IMG_RATIO'=>1.8,
-       'MAX_FILES'=>2,
+        'IMG_QUALITY'=>0.75,
+        'IMG_RATIO'=>1.8,
+        'MAX_FILES'=>2,
         'MAX_FILE_SIZE'=>"5M",
-      'INSTANT_UPLOAD'=>"false",
+        '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,
 ];
 

config/auth.php → core/config/auth.php


config/broadcasting.php → core/config/broadcasting.php


config/cache.php → core/config/cache.php


config/cors.php → core/config/cors.php


config/database.php → core/config/database.php


+ 10 - 0
config/filesystems.php

@@ -33,6 +33,16 @@ return [
         'local' => [
             'driver' => 'local',
             'root' => storage_path('app/public'),
+			'permissions' => [
+				'file' => [
+					'public' => 0644,
+					'private' => 0644,
+				],
+				'dir' => [
+					'public' => 0755,
+					'private' => 0755,
+				],
+			],
         ],
 
         'public' => [

config/hashing.php → core/config/hashing.php


config/logging.php → core/config/logging.php


config/mail.php → core/config/mail.php


config/queue.php → core/config/queue.php


config/sanctum.php → core/config/sanctum.php


config/services.php → core/config/services.php


config/session.php → core/config/session.php


config/view.php → core/config/view.php


css/custom.css → core/css/custom.css


database/.gitignore → core/database/.gitignore


database/factories/UserFactory.php → core/database/factories/UserFactory.php


database/migrations/2014_10_12_000000_create_users_table.php → core/database/migrations/2014_10_12_000000_create_users_table.php


database/migrations/2014_10_12_100000_create_password_resets_table.php → core/database/migrations/2014_10_12_100000_create_password_resets_table.php


database/migrations/2019_08_19_000000_create_failed_jobs_table.php → core/database/migrations/2019_08_19_000000_create_failed_jobs_table.php


database/migrations/2019_12_14_000001_create_personal_access_tokens_table.php → core/database/migrations/2019_12_14_000001_create_personal_access_tokens_table.php


database/migrations/2023_02_20_104326_create_presentations_table.php → core/database/migrations/2023_02_20_104326_create_presentations_table.php


database/migrations/2023_03_05_113730_create_slides_table.php → core/database/migrations/2023_03_05_113730_create_slides_table.php


database/migrations/2023_03_07_095545_create_categories_table.php → core/database/migrations/2023_03_07_095545_create_categories_table.php


+ 0 - 0
database/migrations/2023_03_07_095755_create_produits_table.php


Kaikkia tiedostoja ei voida näyttää, sillä liian monta tiedostoa muuttui tässä diffissä