From f4f3256ce58e2be885c7403bffcceb3dbe79b566 Mon Sep 17 00:00:00 2001 From: Vincent BRIDIER Date: Thu, 11 Aug 2022 12:34:27 +0200 Subject: [PATCH] Clean + Update PHPCS.xml + PHPCBF --- README.md | 23 -- app/Console/Commands/AdminCreate.php | 8 +- app/Console/Kernel.php | 7 +- .../Auth/ConfirmPasswordController.php | 16 +- .../Auth/ForgotPasswordController.php | 16 +- app/Http/Controllers/Auth/LoginController.php | 16 +- .../Controllers/Auth/RegisterController.php | 20 +- .../Auth/ResetPasswordController.php | 16 +- .../Auth/VerificationController.php | 16 +- app/Http/Controllers/Bo/AdviceController.php | 4 +- app/Http/Controllers/Bo/EncartsController.php | 4 +- app/Http/Controllers/Bo/GammesController.php | 10 +- app/Http/Controllers/Bo/HomeController.php | 1 - app/Http/Controllers/Bo/MomentsController.php | 4 +- .../Controllers/Bo/PictoBrandsController.php | 8 +- app/Http/Controllers/Bo/PictosController.php | 12 +- app/Http/Controllers/Bo/PostsController.php | 12 +- .../Controllers/Bo/ProductsController.php | 48 ++-- app/Http/Controllers/Bo/SeoDataController.php | 4 +- app/Http/Controllers/Bo/SlidersController.php | 8 +- app/Http/Controllers/Bo/SlidesController.php | 22 +- app/Http/Controllers/Bo/TextsController.php | 10 +- app/Http/Controllers/Bo/TitlesController.php | 4 +- .../Controllers/FoodServiceController.php | 8 +- app/Http/Controllers/GammesController.php | 14 +- app/Http/Controllers/HomeController.php | 2 +- app/Http/Controllers/LegalsController.php | 4 +- app/Http/Controllers/MarqueController.php | 8 +- app/Http/Controllers/NewsController.php | 6 +- app/Http/Controllers/PolicyController.php | 4 +- app/Http/Controllers/ProductsController.php | 4 +- app/Http/Middleware/BackEndGlobals.php | 18 +- app/Http/Middleware/EncryptCookies.php | 3 +- app/Http/Middleware/FrontEndGlobals.php | 8 +- app/Http/Middleware/LangCheck.php | 34 +-- .../PreventRequestsDuringMaintenance.php | 3 +- .../Middleware/RedirectIfAuthenticated.php | 6 +- app/Http/Middleware/TrustProxies.php | 2 +- app/Http/Middleware/VerifyCsrfToken.php | 3 +- app/Http/Requests/ContactFormRequest.php | 2 +- app/Http/Requests/StoreGammeRequest.php | 2 +- app/Http/Requests/StorePictoBrandRequest.php | 2 +- app/Http/Requests/StorePictoRequest.php | 2 +- app/Http/Requests/StorePostRequest.php | 2 +- app/Http/Requests/StoreProductRequest.php | 28 +-- app/Http/Requests/StoreSlideRequest.php | 2 +- app/Http/Requests/StoreSliderRequest.php | 2 +- app/Http/Requests/StoreTextRequest.php | 2 +- app/Http/Requests/UpdateAdviceRequest.php | 2 +- app/Http/Requests/UpdateEncartRequest.php | 2 +- app/Http/Requests/UpdateMomentRequest.php | 2 +- app/Http/Requests/UpdatePictoBrandRequest.php | 2 +- app/Http/Requests/UpdatePictoRequest.php | 2 +- app/Http/Requests/UpdateSeoDataRequest.php | 2 +- app/Http/Requests/UpdateTitleRequest.php | 2 +- app/Lib/Utils.php | 6 +- app/Models/Product.php | 2 +- app/Providers/AppServiceProvider.php | 1 - app/Providers/AuthServiceProvider.php | 2 - app/Providers/BroadcastServiceProvider.php | 21 -- app/Providers/EventServiceProvider.php | 1 - app/Providers/RouteServiceProvider.php | 24 +- app/Traits/CastsEnumsHasTranslations.php | 2 +- composer.json | 1 - composer.lock | 66 +---- config/app.php | 176 ++++++------- config/auth.php | 112 ++++----- config/bo.php | 12 +- config/broadcasting.php | 36 +-- config/cache.php | 54 ++-- config/cors.php | 20 +- config/database.php | 74 +++--- config/filesystems.php | 52 ++-- config/hashing.php | 52 ++-- config/logging.php | 56 ++--- config/mail.php | 78 +++--- config/purifier.php | 3 +- config/queue.php | 52 ++-- config/sanctum.php | 51 ---- config/services.php | 18 +- config/session.php | 238 +++++++++--------- config/translation.php | 82 +++--- config/view.php | 32 +-- database/factories/AdviceFactory.php | 4 +- database/factories/EncartFactory.php | 4 +- database/factories/GammeFactory.php | 8 +- database/factories/PictoBrandFactory.php | 4 +- database/factories/PictoFactory.php | 4 +- database/factories/PostFactory.php | 6 +- database/factories/ProductFactory.php | 22 +- database/factories/SlideFactory.php | 4 +- database/factories/UserFactory.php | 3 +- ...01_create_personal_access_tokens_table.php | 36 --- phpcs.xml | 160 +++++++----- phpunit.xml | 31 --- routes/api.php | 12 - routes/channels.php | 18 -- routes/console.php | 16 +- routes/web.php | 29 ++- 99 files changed, 955 insertions(+), 1204 deletions(-) delete mode 100644 app/Providers/BroadcastServiceProvider.php delete mode 100644 config/sanctum.php delete mode 100644 database/migrations/2019_12_14_000001_create_personal_access_tokens_table.php delete mode 100644 phpunit.xml delete mode 100644 routes/api.php delete mode 100644 routes/channels.php diff --git a/README.md b/README.md index 18e9de3..459db94 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,6 @@ php artisan storage:link cp .env.example .env php artisan key:generate composer install -php artisan vendor:publish --provider="JoeDixon\Translation\TranslationServiceProvider" ``` - Créez la base de données - Éditez le .env @@ -24,25 +23,3 @@ Put every min in PROD : ``` php artisan schedule:run ``` - -## déploiement du switch de stockage des traductions joedixon/laravel-translation de file vers database -``` -php artisan translation:sync-translations -``` -paramètres à entrer : - -translation::translation.prompt_from_driver: - > file - - translation::translation.prompt_to_driver: - > database - - translation::translation.prompt_language_if_any: - -laisser vide le dernier paramètre pour traiter toutes les langues. - -Résultat -``` -translation::translation.syncing -Translations have been synced 😎 -``` diff --git a/app/Console/Commands/AdminCreate.php b/app/Console/Commands/AdminCreate.php index 66fc87b..8782d28 100644 --- a/app/Console/Commands/AdminCreate.php +++ b/app/Console/Commands/AdminCreate.php @@ -25,13 +25,13 @@ class AdminCreate extends Command /** * Execute the console command. * - * @return int + * @return integer */ public function handle() { - $role = 0; - $name = $this->ask('Name ?'); - $email = $this->ask('Email ?'); + $role = 0; + $name = $this->ask('Name ?'); + $email = $this->ask('Email ?'); $password = $this->secret('What is the password?'); $user = new User([ diff --git a/app/Console/Kernel.php b/app/Console/Kernel.php index 35e792e..ab42c78 100644 --- a/app/Console/Kernel.php +++ b/app/Console/Kernel.php @@ -13,18 +13,17 @@ class Kernel extends ConsoleKernel * @var array */ protected $commands = [ - // - ]; + ]; /** * Define the application's command schedule. * - * @param \Illuminate\Console\Scheduling\Schedule $schedule + * @param \Illuminate\Console\Scheduling\Schedule $schedule * @return void */ protected function schedule(Schedule $schedule) { - //write schedules here + // write schedules here } /** diff --git a/app/Http/Controllers/Auth/ConfirmPasswordController.php b/app/Http/Controllers/Auth/ConfirmPasswordController.php index d90f81e..f6112b2 100644 --- a/app/Http/Controllers/Auth/ConfirmPasswordController.php +++ b/app/Http/Controllers/Auth/ConfirmPasswordController.php @@ -9,14 +9,14 @@ use Illuminate\Foundation\Auth\ConfirmsPasswords; class ConfirmPasswordController extends Controller { /* - |-------------------------------------------------------------------------- - | Confirm Password Controller - |-------------------------------------------------------------------------- - | - | This controller is responsible for handling password confirmations and - | uses a simple trait to include the behavior. You're free to explore - | this trait and override any functions that require customization. - | + |-------------------------------------------------------------------------- + | Confirm Password Controller + |-------------------------------------------------------------------------- + | + | This controller is responsible for handling password confirmations and + | uses a simple trait to include the behavior. You're free to explore + | this trait and override any functions that require customization. + | */ use ConfirmsPasswords; diff --git a/app/Http/Controllers/Auth/ForgotPasswordController.php b/app/Http/Controllers/Auth/ForgotPasswordController.php index 38b0a73..75ef4e6 100644 --- a/app/Http/Controllers/Auth/ForgotPasswordController.php +++ b/app/Http/Controllers/Auth/ForgotPasswordController.php @@ -8,14 +8,14 @@ use Illuminate\Foundation\Auth\SendsPasswordResetEmails; class ForgotPasswordController extends Controller { /* - |-------------------------------------------------------------------------- - | Password Reset Controller - |-------------------------------------------------------------------------- - | - | This controller is responsible for handling password reset emails and - | includes a trait which assists in sending these notifications from - | your application to your users. Feel free to explore this trait. - | + |-------------------------------------------------------------------------- + | Password Reset Controller + |-------------------------------------------------------------------------- + | + | This controller is responsible for handling password reset emails and + | includes a trait which assists in sending these notifications from + | your application to your users. Feel free to explore this trait. + | */ use SendsPasswordResetEmails; } diff --git a/app/Http/Controllers/Auth/LoginController.php b/app/Http/Controllers/Auth/LoginController.php index 96ef86d..74705c8 100644 --- a/app/Http/Controllers/Auth/LoginController.php +++ b/app/Http/Controllers/Auth/LoginController.php @@ -29,14 +29,14 @@ use Illuminate\Foundation\Auth\AuthenticatesUsers; class LoginController extends Controller { /* - |-------------------------------------------------------------------------- - | Login Controller - |-------------------------------------------------------------------------- - | - | This controller handles authenticating users for the application and - | redirecting them to your home screen. The controller uses a trait - | to conveniently provide its functionality to your applications. - | + |-------------------------------------------------------------------------- + | Login Controller + |-------------------------------------------------------------------------- + | + | This controller handles authenticating users for the application and + | redirecting them to your home screen. The controller uses a trait + | to conveniently provide its functionality to your applications. + | */ use AuthenticatesUsers; diff --git a/app/Http/Controllers/Auth/RegisterController.php b/app/Http/Controllers/Auth/RegisterController.php index 15631bd..15cb0fa 100644 --- a/app/Http/Controllers/Auth/RegisterController.php +++ b/app/Http/Controllers/Auth/RegisterController.php @@ -12,14 +12,14 @@ use Illuminate\Support\Facades\Validator; class RegisterController extends Controller { /* - |-------------------------------------------------------------------------- - | Register Controller - |-------------------------------------------------------------------------- - | - | This controller handles the registration of new users as well as their - | validation and creation. By default this controller uses a trait to - | provide this functionality without requiring any additional code. - | + |-------------------------------------------------------------------------- + | Register Controller + |-------------------------------------------------------------------------- + | + | This controller handles the registration of new users as well as their + | validation and creation. By default this controller uses a trait to + | provide this functionality without requiring any additional code. + | */ use RegistersUsers; @@ -43,7 +43,7 @@ class RegisterController extends Controller /** * Get a validator for an incoming registration request. * - * @param array $data + * @param array $data * @return \Illuminate\Contracts\Validation\Validator */ protected function validator(array $data) @@ -58,7 +58,7 @@ class RegisterController extends Controller /** * Create a new user instance after a valid registration. * - * @param array $data + * @param array $data * @return \App\Models\User */ protected function create(array $data) diff --git a/app/Http/Controllers/Auth/ResetPasswordController.php b/app/Http/Controllers/Auth/ResetPasswordController.php index f858dc6..fa4081b 100644 --- a/app/Http/Controllers/Auth/ResetPasswordController.php +++ b/app/Http/Controllers/Auth/ResetPasswordController.php @@ -9,14 +9,14 @@ use Illuminate\Foundation\Auth\ResetsPasswords; class ResetPasswordController extends Controller { /* - |-------------------------------------------------------------------------- - | Password Reset Controller - |-------------------------------------------------------------------------- - | - | This controller is responsible for handling password reset requests - | and uses a simple trait to include this behavior. You're free to - | explore this trait and override any methods you wish to tweak. - | + |-------------------------------------------------------------------------- + | Password Reset Controller + |-------------------------------------------------------------------------- + | + | This controller is responsible for handling password reset requests + | and uses a simple trait to include this behavior. You're free to + | explore this trait and override any methods you wish to tweak. + | */ use ResetsPasswords; diff --git a/app/Http/Controllers/Auth/VerificationController.php b/app/Http/Controllers/Auth/VerificationController.php index 8728d3b..74ab841 100644 --- a/app/Http/Controllers/Auth/VerificationController.php +++ b/app/Http/Controllers/Auth/VerificationController.php @@ -9,14 +9,14 @@ use Illuminate\Foundation\Auth\VerifiesEmails; class VerificationController extends Controller { /* - |-------------------------------------------------------------------------- - | Email Verification Controller - |-------------------------------------------------------------------------- - | - | This controller is responsible for handling email verification for any - | user that recently registered with the application. Emails may also - | be re-sent if the user didn't receive the original email message. - | + |-------------------------------------------------------------------------- + | Email Verification Controller + |-------------------------------------------------------------------------- + | + | This controller is responsible for handling email verification for any + | user that recently registered with the application. Emails may also + | be re-sent if the user didn't receive the original email message. + | */ use VerifiesEmails; diff --git a/app/Http/Controllers/Bo/AdviceController.php b/app/Http/Controllers/Bo/AdviceController.php index 4a1aa38..a91534a 100644 --- a/app/Http/Controllers/Bo/AdviceController.php +++ b/app/Http/Controllers/Bo/AdviceController.php @@ -24,8 +24,8 @@ class AdviceController extends Controller /** * Update the specified resource in storage. * - * @param Advice $advice - * @param \Illuminate\Http\UpdateAdviceRequest $request + * @param Advice $advice + * @param \Illuminate\Http\UpdateAdviceRequest $request * @return \Illuminate\Http\Response */ public function update(Advice $advice, UpdateAdviceRequest $request) diff --git a/app/Http/Controllers/Bo/EncartsController.php b/app/Http/Controllers/Bo/EncartsController.php index 77c328e..98867f1 100644 --- a/app/Http/Controllers/Bo/EncartsController.php +++ b/app/Http/Controllers/Bo/EncartsController.php @@ -24,8 +24,8 @@ class EncartsController extends Controller /** * Update the specified resource in storage. * - * @param Encart $encart - * @param \Illuminate\Http\UpdateEncartRequest $request + * @param Encart $encart + * @param \Illuminate\Http\UpdateEncartRequest $request * @return \Illuminate\Http\Response */ public function update(Encart $encart, UpdateEncartRequest $request) diff --git a/app/Http/Controllers/Bo/GammesController.php b/app/Http/Controllers/Bo/GammesController.php index 5b80ab7..403652d 100644 --- a/app/Http/Controllers/Bo/GammesController.php +++ b/app/Http/Controllers/Bo/GammesController.php @@ -17,7 +17,7 @@ class GammesController extends Controller */ public function index() { - $gammes = collect([]); + $gammes = collect([]); $dbGammes = Gamme::orderBy('title')->whereNull('parent_gamme_id') ->with('childGammes')->get(); @@ -52,7 +52,7 @@ class GammesController extends Controller /** * Store a newly created resource in storage. * - * @param \Illuminate\Http\StoreGammeRequest $request + * @param \Illuminate\Http\StoreGammeRequest $request * @return \Illuminate\Http\Response */ public function store(StoreGammeRequest $request) @@ -90,8 +90,8 @@ class GammesController extends Controller /** * Update the specified resource in storage. * - * @param \Illuminate\Http\UpdateGammeRequest $request - * @param Gamme $gamme + * @param \Illuminate\Http\UpdateGammeRequest $request + * @param Gamme $gamme * @return \Illuminate\Http\Response */ public function update(Gamme $gamme, UpdateGammeRequest $request) @@ -116,7 +116,7 @@ class GammesController extends Controller /** * Remove the specified resource from storage. * - * @param Gamme $gamme + * @param Gamme $gamme * @return \Illuminate\Http\Response */ public function destroy(Gamme $gamme) diff --git a/app/Http/Controllers/Bo/HomeController.php b/app/Http/Controllers/Bo/HomeController.php index 61bc0f1..e5dc521 100644 --- a/app/Http/Controllers/Bo/HomeController.php +++ b/app/Http/Controllers/Bo/HomeController.php @@ -7,7 +7,6 @@ use App\Http\Controllers\Controller; class HomeController extends Controller { // BO - public function home() { return view('back.home'); diff --git a/app/Http/Controllers/Bo/MomentsController.php b/app/Http/Controllers/Bo/MomentsController.php index 6820470..7cae140 100644 --- a/app/Http/Controllers/Bo/MomentsController.php +++ b/app/Http/Controllers/Bo/MomentsController.php @@ -36,8 +36,8 @@ class MomentsController extends Controller /** * Update the specified resource in storage. * - * @param Moment $moment - * @param \Illuminate\Http\UpdateMomentRequest $request + * @param Moment $moment + * @param \Illuminate\Http\UpdateMomentRequest $request * @return \Illuminate\Http\Response */ public function update(Moment $moment, UpdateMomentRequest $request) diff --git a/app/Http/Controllers/Bo/PictoBrandsController.php b/app/Http/Controllers/Bo/PictoBrandsController.php index 2a06035..56a72a5 100644 --- a/app/Http/Controllers/Bo/PictoBrandsController.php +++ b/app/Http/Controllers/Bo/PictoBrandsController.php @@ -37,7 +37,7 @@ class PictoBrandsController extends Controller /** * Store a newly created resource in storage. * - * @param \Illuminate\Http\StorePictoBrandRequest $request + * @param \Illuminate\Http\StorePictoBrandRequest $request * @return \Illuminate\Http\Response */ public function store(StorePictoBrandRequest $request) @@ -70,8 +70,8 @@ class PictoBrandsController extends Controller /** * Update the specified resource in storage. * - * @param PictoBrand $pictobrand - * @param \Illuminate\Http\UpdatePictoBrandRequest $request + * @param PictoBrand $pictobrand + * @param \Illuminate\Http\UpdatePictoBrandRequest $request * @return \Illuminate\Http\Response */ public function update(PictoBrand $pictobrand, UpdatePictoBrandRequest $request) @@ -93,7 +93,7 @@ class PictoBrandsController extends Controller /** * Remove the specified resource from storage. * - * @param PictoBrand $pictobrand + * @param PictoBrand $pictobrand * @return \Illuminate\Http\Response */ public function destroy(PictoBrand $pictobrand) diff --git a/app/Http/Controllers/Bo/PictosController.php b/app/Http/Controllers/Bo/PictosController.php index 4318b6f..22449d0 100644 --- a/app/Http/Controllers/Bo/PictosController.php +++ b/app/Http/Controllers/Bo/PictosController.php @@ -38,7 +38,7 @@ class PictosController extends Controller /** * Store a newly created resource in storage. * - * @param \Illuminate\Http\StorePictoRequest $request + * @param \Illuminate\Http\StorePictoRequest $request * @return \Illuminate\Http\Response */ public function store(StorePictoRequest $request) @@ -47,8 +47,8 @@ class PictosController extends Controller if (is_a($request->picture, "SplFileInfo")) { $picto->picture = Utils::storeImage($request->picture, $picto->getTable()); } - //on ne peut pas arbitrairement créer tous les pictos à cet endroit - //j'ai du décommenter cette ligne pour la création picto fonctionne + // on ne peut pas arbitrairement créer tous les pictos à cet endroit + // j'ai du décommenter cette ligne pour la création picto fonctionne $picto->page = Page::marqueBloc2(); if (!$picto->saveOrFail()) { @@ -72,8 +72,8 @@ class PictosController extends Controller /** * Update the specified resource in storage. * - * @param Picto $picto - * @param \Illuminate\Http\UpdatePictoRequest $request + * @param Picto $picto + * @param \Illuminate\Http\UpdatePictoRequest $request * @return \Illuminate\Http\Response */ public function update(Picto $picto, UpdatePictoRequest $request) @@ -95,7 +95,7 @@ class PictosController extends Controller /** * Remove the specified resource from storage. * - * @param Picto $picto + * @param Picto $picto * @return \Illuminate\Http\Response */ public function destroy(Picto $picto) diff --git a/app/Http/Controllers/Bo/PostsController.php b/app/Http/Controllers/Bo/PostsController.php index c62a6df..8241b7f 100644 --- a/app/Http/Controllers/Bo/PostsController.php +++ b/app/Http/Controllers/Bo/PostsController.php @@ -37,7 +37,7 @@ class PostsController extends Controller /** * Store a newly created resource in storage. * - * @param \Illuminate\Http\StorePostRequest $request + * @param \Illuminate\Http\StorePostRequest $request * @return \Illuminate\Http\Response */ public function store(StorePostRequest $request) @@ -75,8 +75,8 @@ class PostsController extends Controller /** * Update the specified resource in storage. * - * @param \Illuminate\Http\UpdatePostRequest $request - * @param Post $post + * @param \Illuminate\Http\UpdatePostRequest $request + * @param Post $post * @return \Illuminate\Http\Response */ public function update(Post $post, UpdatePostRequest $request) @@ -105,7 +105,7 @@ class PostsController extends Controller /** * Remove the specified resource from storage. * - * @param Post $post + * @param Post $post * @return \Illuminate\Http\Response */ public function destroy(Post $post) @@ -120,8 +120,8 @@ class PostsController extends Controller /** * Change on_top column to a post if necessary * - * @param Boolean $isCurrentPostOnTop - * @return Boolean response + * @param boolean $isCurrentPostOnTop + * @return boolean response */ private function changeUniquePostOnTop(bool $isCurrentPostOnTop): bool { diff --git a/app/Http/Controllers/Bo/ProductsController.php b/app/Http/Controllers/Bo/ProductsController.php index 082c98f..00e73b6 100644 --- a/app/Http/Controllers/Bo/ProductsController.php +++ b/app/Http/Controllers/Bo/ProductsController.php @@ -33,8 +33,8 @@ class ProductsController extends Controller public function create(Product $product) { $gammes = Gamme::all()->sortBy('title'); - //default structure + produits - $tabFour = array( + // default structure + produits + $tabFour = array( 'id' => 0, 'name' => 'Four', 'url' => '/assets/images/four.png', @@ -42,7 +42,7 @@ class ProductsController extends Controller 'temp' => '', 'status' => false ); - $tabFriteuse = array( + $tabFriteuse = array( 'id' => 1, 'name' => 'Friteuse', 'url' => '/assets/images/friteuse.png', @@ -50,7 +50,7 @@ class ProductsController extends Controller 'temp' => '', 'status' => false ); - $tabPoele = array( + $tabPoele = array( 'id' => 2, 'name' => 'Poêle', 'url' => '/assets/images/poele.png', @@ -58,7 +58,7 @@ class ProductsController extends Controller 'temp' => '', 'status' => false ); - $tabCocotte = array( + $tabCocotte = array( 'id' => 3, 'name' => 'Cocotte', 'url' => '/assets/images/cocotte.png', @@ -66,7 +66,7 @@ class ProductsController extends Controller 'temp' => '', 'status' => false ); - $tabPlancha = array( + $tabPlancha = array( 'id' => 4, 'name' => 'Plancha', 'url' => '/assets/images/plancha.png', @@ -74,7 +74,7 @@ class ProductsController extends Controller 'temp' => '', 'status' => false ); - $tabBainMarie = array( + $tabBainMarie = array( 'id' => 5, 'name' => 'Bain Marie', 'url' => '/assets/images/bainmarie.png', @@ -82,7 +82,7 @@ class ProductsController extends Controller 'temp' => '', 'status' => false ); - $tabBarbecue = array( + $tabBarbecue = array( 'id' => 6, 'name' => 'Barbecue', 'url' => '/assets/images/barbecue.png', @@ -90,7 +90,7 @@ class ProductsController extends Controller 'temp' => '', 'status' => false ); - $tabMicroOndes = array( + $tabMicroOndes = array( 'id' => 7, 'name' => 'Micro Ondes', 'url' => '/assets/images/microondes.png', @@ -98,7 +98,7 @@ class ProductsController extends Controller 'temp' => '', 'status' => false ); - $tabCasserole = array( + $tabCasserole = array( 'id' => 8, 'name' => 'Casserole', 'url' => '/assets/images/casserole.png', @@ -122,7 +122,7 @@ class ProductsController extends Controller 'url' => '', ); //phpcs:ignore Generic.Files.LineLength.TooLong - $product->pictos = json_encode([$tabFour, $tabFriteuse, $tabPoele, $tabCocotte, $tabPlancha, $tabBainMarie, $tabBarbecue, $tabMicroOndes, $tabCasserole]); + $product->pictos = json_encode([$tabFour, $tabFriteuse, $tabPoele, $tabCocotte, $tabPlancha, $tabBainMarie, $tabBarbecue, $tabMicroOndes, $tabCasserole]); $product->plusproduit = json_encode([$tabPlusProduit1, $tabPlusProduit2, $tabPlusProduit3]); return view('back.products.create', compact('product', 'gammes')); } @@ -130,19 +130,19 @@ class ProductsController extends Controller /** * Store a newly created resource in storage. * - * @param \Illuminate\Http\StoreProductRequest $request + * @param \Illuminate\Http\StoreProductRequest $request * @return \Illuminate\Http\Response */ public function store(StoreProductRequest $request) { $plusproduit = json_decode($request->plusproduit); - $product = new Product($request->validated()); + $product = new Product($request->validated()); if (is_a($request->picture, "SplFileInfo")) { $product->picture = Utils::storeImage($request->picture, $product->getTable()); } foreach ($plusproduit as $plus) { - $picto = 'pictogramme' . $plus->id; + $picto = 'pictogramme' . $plus->id; $uploadfile = $request->$picto; if ($uploadfile) { $plus->url = Utils::storeImage($uploadfile, $product->getTable()); @@ -175,15 +175,15 @@ class ProductsController extends Controller /** * Update the specified resource in storage. * - * @param Product $product - * @param \Illuminate\Http\UpdateProductRequest $request + * @param Product $product + * @param \Illuminate\Http\UpdateProductRequest $request * @return \Illuminate\Http\Response */ public function update(Product $product, UpdateProductRequest $request) { - //valeurs en base pour garder les anciennes images quand elles ne sont pas updatées + // valeurs en base pour garder les anciennes images quand elles ne sont pas updatées $dbplusproduit = json_decode($product->plusproduit); - //valeurs transmises dans le post + // valeurs transmises dans le post $plusproduit = json_decode($request->plusproduit); $product->fill($request->validated()); if (is_a($request->picture, "SplFileInfo")) { @@ -191,20 +191,20 @@ class ProductsController extends Controller } foreach ($plusproduit as $plus) { - //boucle pour stockage des images uploadées - $picto = 'pictogramme' . $plus->id; + // boucle pour stockage des images uploadées + $picto = 'pictogramme' . $plus->id; $uploadfile = $request->$picto; - //set de l'url + // set de l'url if ($uploadfile) { $plus->url = Utils::storeImage($uploadfile, $product->getTable()); } else { if (isset($dbplusproduit[$plus->id])) { - //reprise de l'ancienne valeur + // reprise de l'ancienne valeur $plus->url = $dbplusproduit[$plus->id]->url; } } } - //encodage avant save + // encodage avant save $product->plusproduit = json_encode($plusproduit); if (!$product->saveOrFail()) { return redirect()->route('bo.products.edit', $product->id) @@ -218,7 +218,7 @@ class ProductsController extends Controller /** * Remove the specified resource from storage. * - * @param Product $product + * @param Product $product * @return \Illuminate\Http\Response */ public function destroy(Product $product) diff --git a/app/Http/Controllers/Bo/SeoDataController.php b/app/Http/Controllers/Bo/SeoDataController.php index da1a6ae..35e94b4 100644 --- a/app/Http/Controllers/Bo/SeoDataController.php +++ b/app/Http/Controllers/Bo/SeoDataController.php @@ -23,8 +23,8 @@ class SeoDataController extends Controller /** * Update the specified resource in storage. * - * @param UpdateSeoDataRequest $request - * @param \App\Models\SeoDatum $SeoDatum + * @param UpdateSeoDataRequest $request + * @param \App\Models\SeoDatum $SeoDatum * @return \Illuminate\Http\Response */ public function update(UpdateSeoDataRequest $request, SeoDatum $SeoDatum) diff --git a/app/Http/Controllers/Bo/SlidersController.php b/app/Http/Controllers/Bo/SlidersController.php index 6898901..31788ed 100644 --- a/app/Http/Controllers/Bo/SlidersController.php +++ b/app/Http/Controllers/Bo/SlidersController.php @@ -36,7 +36,7 @@ class SlidersController extends Controller /** * Store a newly created resource in storage. * - * @param \Illuminate\Http\StoreSliderRequest $request + * @param \Illuminate\Http\StoreSliderRequest $request * @return \Illuminate\Http\Response */ public function store(StoreSliderRequest $request) @@ -64,8 +64,8 @@ class SlidersController extends Controller /** * Update the specified resource in storage. * - * @param \Illuminate\Http\UpdateSliderRequest $request - * @param Slider $slider + * @param \Illuminate\Http\UpdateSliderRequest $request + * @param Slider $slider * @return \Illuminate\Http\Response */ public function update(UpdateSliderRequest $request, Slider $slider) @@ -82,7 +82,7 @@ class SlidersController extends Controller /** * Remove the specified resource from storage. * - * @param Slider $slider + * @param Slider $slider * @return \Illuminate\Http\Response */ public function destroy(Slider $slider) diff --git a/app/Http/Controllers/Bo/SlidesController.php b/app/Http/Controllers/Bo/SlidesController.php index 910ecdd..94f8ad7 100644 --- a/app/Http/Controllers/Bo/SlidesController.php +++ b/app/Http/Controllers/Bo/SlidesController.php @@ -38,13 +38,13 @@ class SlidesController extends Controller /** * Store a newly created resource in storage. * - * @param \Illuminate\Http\StoreSlideRequest $request + * @param \Illuminate\Http\StoreSlideRequest $request * @return \Illuminate\Http\Response */ public function store(StoreSlideRequest $request) { - $slide = new Slide($request->validated()); + $slide = new Slide($request->validated()); $slide->order = $this->getLastOrder(); if (is_a($request->picture, "SplFileInfo")) { $slide->picture = Utils::storeImage($request->picture, $slide->getTable()); @@ -72,8 +72,8 @@ class SlidesController extends Controller /** * Update the specified resource in storage. * - * @param \Illuminate\Http\StoreSlideRequest $request - * @param Slide $slide + * @param \Illuminate\Http\StoreSlideRequest $request + * @param Slide $slide * @return \Illuminate\Http\Response */ public function update(StoreSlideRequest $request, Slide $slide) @@ -93,7 +93,7 @@ class SlidesController extends Controller /** * Remove the specified resource from storage. * - * @param Slide $slide + * @param Slide $slide * @return \Illuminate\Http\Response */ public function destroy(Slide $slide) @@ -108,14 +108,14 @@ class SlidesController extends Controller public function changeOrder(Slide $slide, $action) { if ($action === 'up') { - $tmp = Slide::where('order', '<', $slide->order)->orderBy('order', 'DESC')->first(); - $newOrder = $tmp->order; - $tmp->order = $slide->order; + $tmp = Slide::where('order', '<', $slide->order)->orderBy('order', 'DESC')->first(); + $newOrder = $tmp->order; + $tmp->order = $slide->order; $slide->order = $newOrder; } else { - $tmp = Slide::where('order', '>', $slide->order)->orderBy('order', 'ASC')->first(); - $newOrder = $tmp->order; - $tmp->order = $slide->order; + $tmp = Slide::where('order', '>', $slide->order)->orderBy('order', 'ASC')->first(); + $newOrder = $tmp->order; + $tmp->order = $slide->order; $slide->order = $newOrder; } $tmp->save(); diff --git a/app/Http/Controllers/Bo/TextsController.php b/app/Http/Controllers/Bo/TextsController.php index 159d2cf..c47d9bc 100644 --- a/app/Http/Controllers/Bo/TextsController.php +++ b/app/Http/Controllers/Bo/TextsController.php @@ -36,12 +36,12 @@ class TextsController extends Controller /** * Store a newly created resource in storage. * - * @param \Illuminate\Http\StoreTextRequest $request + * @param \Illuminate\Http\StoreTextRequest $request * @return \Illuminate\Http\Response */ public function store(StoreTextRequest $request) { - $text = new Text($request->validated()); + $text = new Text($request->validated()); $text->page = Page::newsQuestions(); if (!$text->saveOrFail()) { @@ -69,8 +69,8 @@ class TextsController extends Controller /** * Update the specified resource in storage. * - * @param \Illuminate\Http\StoreTextRequest $request - * @param Text $text + * @param \Illuminate\Http\StoreTextRequest $request + * @param Text $text * @return \Illuminate\Http\Response */ public function update(Text $text, StoreTextRequest $request) @@ -89,7 +89,7 @@ class TextsController extends Controller /** * Remove the specified resource from storage. * - * @param Text $text + * @param Text $text * @return \Illuminate\Http\Response */ public function destroy(Text $text) diff --git a/app/Http/Controllers/Bo/TitlesController.php b/app/Http/Controllers/Bo/TitlesController.php index ba6a161..c33a8fe 100644 --- a/app/Http/Controllers/Bo/TitlesController.php +++ b/app/Http/Controllers/Bo/TitlesController.php @@ -23,8 +23,8 @@ class TitlesController extends Controller /** * Update the specified resource in storage. * - * @param Title $title - * @param \Illuminate\Http\UpdateTitleRequest $request + * @param Title $title + * @param \Illuminate\Http\UpdateTitleRequest $request * @return \Illuminate\Http\Response */ public function update(Title $title, UpdateTitleRequest $request) diff --git a/app/Http/Controllers/FoodServiceController.php b/app/Http/Controllers/FoodServiceController.php index fb78bc4..7633f06 100644 --- a/app/Http/Controllers/FoodServiceController.php +++ b/app/Http/Controllers/FoodServiceController.php @@ -13,13 +13,13 @@ class FoodServiceController extends Controller { public function index() { - $page = Page::foodservice(); + $page = Page::foodservice(); $seoDatum = SeoDatum::where('page', $page)->first(); - $encart_food = Encart::where('page', Page::foodHeader()->value)->first(); + $encart_food = Encart::where('page', Page::foodHeader()->value)->first(); $title_foodBloc2 = Title::where('page', Page::foodBloc2()->value)->first(); - $pictos_food = Picto::where('page', Page::foodBloc2()->value)->get(); - $products_food = Product::where('is_food_service', true)->get(); + $pictos_food = Picto::where('page', Page::foodBloc2()->value)->get(); + $products_food = Product::where('is_food_service', true)->get(); return view('front.food-service', compact( 'seoDatum', diff --git a/app/Http/Controllers/GammesController.php b/app/Http/Controllers/GammesController.php index 976a0d9..5fc8fb2 100644 --- a/app/Http/Controllers/GammesController.php +++ b/app/Http/Controllers/GammesController.php @@ -12,12 +12,12 @@ class GammesController extends Controller public function index() { $gammes = Gamme::whereNull('parent_gamme_id')->orderBy('title')->get(); - //remove Food Service from count + // remove Food Service from count /** @var \Illuminate\Database\Eloquent\Collection $gammes */ - $gammes = $gammes->whereNotIn('slug', 'food-service'); + $gammes = $gammes->whereNotIn('slug', 'food-service'); $nb_gammes = $gammes->count(); - $page = Page::gammes(); + $page = Page::gammes(); $seoDatum = SeoDatum::where('page', $page)->first(); return view('front.gammes.index', compact('gammes', 'nb_gammes', 'seoDatum')); @@ -25,7 +25,7 @@ class GammesController extends Controller public function show(Gamme $gamme) { - $gammes = collect([]); + $gammes = collect([]); $dbGammes = Gamme::where('id', $gamme->id) ->with('childGammes')->get(); @@ -43,9 +43,9 @@ class GammesController extends Controller ->orderBy('name') ->get(); - //make ghost seoDatum from the gamme - $seoDatum = new SeoDatum(); - $seoDatum->title = $gamme->title; + // make ghost seoDatum from the gamme + $seoDatum = new SeoDatum(); + $seoDatum->title = $gamme->title; $seoDatum->description = $gamme->text; return view('front.gammes.show', compact('gamme', 'products', 'seoDatum')); diff --git a/app/Http/Controllers/HomeController.php b/app/Http/Controllers/HomeController.php index e6d0410..f3807e7 100644 --- a/app/Http/Controllers/HomeController.php +++ b/app/Http/Controllers/HomeController.php @@ -16,7 +16,7 @@ class HomeController extends Controller public function index() { - $page = Page::home(); + $page = Page::home(); $seoDatum = SeoDatum::where('page', $page)->first(); $slider = Slider::where('published', 1)->first(); diff --git a/app/Http/Controllers/LegalsController.php b/app/Http/Controllers/LegalsController.php index 46f6dbd..120cfcd 100644 --- a/app/Http/Controllers/LegalsController.php +++ b/app/Http/Controllers/LegalsController.php @@ -12,8 +12,8 @@ class LegalsController extends Controller { $mentions_legales = Text::where('page', Page::mentions()->value)->first(); - //make ghost seoDatum from the gamme - $seoDatum = new SeoDatum(); + // make ghost seoDatum from the gamme + $seoDatum = new SeoDatum(); $seoDatum->title = $mentions_legales->title; return view('front.legals', compact('seoDatum', 'mentions_legales')); diff --git a/app/Http/Controllers/MarqueController.php b/app/Http/Controllers/MarqueController.php index 390bcdc..2404ea5 100644 --- a/app/Http/Controllers/MarqueController.php +++ b/app/Http/Controllers/MarqueController.php @@ -14,7 +14,7 @@ class MarqueController extends Controller { public function index() { - $page = Page::marque(); + $page = Page::marque(); $seoDatum = SeoDatum::where('page', $page)->first(); $encart_marqueHeader = Encart::where('page', Page::marqueHeader()->value)->first(); @@ -24,9 +24,9 @@ class MarqueController extends Controller $pictobrands_marque = PictoBrand::all(); $pictos_marqueBloc2 = Picto::where('page', Page::marqueBloc2()->value)->get(); - $title_marqueBloc2 = Title::where('page', Page::marqueBloc2()->value)->first(); - $title_marqueBloc4 = Title::where('page', Page::marqueBloc4()->value)->first(); - $moments = Moment::where('page', Page::marqueHistory()->value)->get(); + $title_marqueBloc2 = Title::where('page', Page::marqueBloc2()->value)->first(); + $title_marqueBloc4 = Title::where('page', Page::marqueBloc4()->value)->first(); + $moments = Moment::where('page', Page::marqueHistory()->value)->get(); return view('front.a-propos', compact( 'seoDatum', diff --git a/app/Http/Controllers/NewsController.php b/app/Http/Controllers/NewsController.php index 7ac2a09..c95c65c 100644 --- a/app/Http/Controllers/NewsController.php +++ b/app/Http/Controllers/NewsController.php @@ -15,11 +15,11 @@ class NewsController extends Controller { public function index() { - $page = Page::news(); + $page = Page::news(); $seoDatum = SeoDatum::where('page', $page)->first(); - $advice_news = Advice::all()->first(); - $texts_news = Text::where('page', Page::newsQuestions()->value)->get(); + $advice_news = Advice::all()->first(); + $texts_news = Text::where('page', Page::newsQuestions()->value)->get(); $title_newsPosts = Title::where('page', Page::newsPosts()->value)->first(); $posts = Post::where([ diff --git a/app/Http/Controllers/PolicyController.php b/app/Http/Controllers/PolicyController.php index 37acd9f..1ec4601 100644 --- a/app/Http/Controllers/PolicyController.php +++ b/app/Http/Controllers/PolicyController.php @@ -12,8 +12,8 @@ class PolicyController extends Controller { $privacy_policy = Text::where('page', Page::charte()->value)->first(); - //make ghost seoDatum from the gamme - $seoDatum = new SeoDatum(); + // make ghost seoDatum from the gamme + $seoDatum = new SeoDatum(); $seoDatum->title = $privacy_policy->title; return view('front.policy', compact('seoDatum', 'privacy_policy')); diff --git a/app/Http/Controllers/ProductsController.php b/app/Http/Controllers/ProductsController.php index 168cdb1..be5558d 100644 --- a/app/Http/Controllers/ProductsController.php +++ b/app/Http/Controllers/ProductsController.php @@ -12,8 +12,8 @@ class ProductsController extends Controller // phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter.FoundInExtendedClassBeforeLastUsed public function show(Gamme $gamme, Product $product) { - $seoDatum = new SeoDatum(); - $seoDatum->title = $product->name; + $seoDatum = new SeoDatum(); + $seoDatum->title = $product->name; $seoDatum->description = $product->description; return view('front.product', compact('product', 'gamme', 'seoDatum')); diff --git a/app/Http/Middleware/BackEndGlobals.php b/app/Http/Middleware/BackEndGlobals.php index 6012e0d..cddb249 100644 --- a/app/Http/Middleware/BackEndGlobals.php +++ b/app/Http/Middleware/BackEndGlobals.php @@ -17,32 +17,32 @@ class BackEndGlobals /** * Handle an incoming request. * - * @param \Illuminate\Http\Request $request - * @param \Closure(\Illuminate\Http\Request): (\Illuminate\Http\Response|\Illuminate\Http\RedirectResponse) $next + * @param \Illuminate\Http\Request $request + * @param \Closure(\Illuminate\Http\Request): (\Illuminate\Http\Response|\Illuminate\Http\RedirectResponse) $next * @return \Illuminate\Http\Response|\Illuminate\Http\RedirectResponse */ public function handle(Request $request, Closure $next) { - $encart_home = Encart::where('page', Page::homeHeader()->value)->first(); + $encart_home = Encart::where('page', Page::homeHeader()->value)->first(); $encart_marqueHeader = Encart::where('page', Page::marqueHeader()->value)->first(); $encart_marqueBloc4l = Encart::where('page', Page::marqueBloc4l()->value)->first(); $encart_marqueBloc4r = Encart::where('page', Page::marqueBloc4r()->value)->first(); $encart_marqueFooter = Encart::where('page', Page::marqueFooter()->value)->first(); - $encart_food = Encart::where('page', Page::foodHeader()->value)->first(); - $mentions_legales = Text::where('page', Page::mentions()->value)->first(); - $privacy_policy = Text::where('page', Page::charte()->value)->first(); + $encart_food = Encart::where('page', Page::foodHeader()->value)->first(); + $mentions_legales = Text::where('page', Page::mentions()->value)->first(); + $privacy_policy = Text::where('page', Page::charte()->value)->first(); $advice_news = Advice::all()->first(); $pictos_marqueBloc2 = Picto::where('page', Page::marqueBloc2()->value)->get(); - $pictos_food = Picto::where('page', Page::foodBloc2()->value)->get(); + $pictos_food = Picto::where('page', Page::foodBloc2()->value)->get(); $texts_news = Text::where('page', Page::newsQuestions()->value)->get(); $title_marqueBloc2 = Title::where('page', Page::marqueBloc2()->value)->first(); $title_marqueBloc4 = Title::where('page', Page::marqueBloc4()->value)->first(); - $title_foodBloc2 = Title::where('page', Page::foodBloc2()->value)->first(); - $title_newsPosts = Title::where('page', Page::newsPosts()->value)->first(); + $title_foodBloc2 = Title::where('page', Page::foodBloc2()->value)->first(); + $title_newsPosts = Title::where('page', Page::newsPosts()->value)->first(); View::share('encart_home', $encart_home); View::share('encart_marqueHeader', $encart_marqueHeader); diff --git a/app/Http/Middleware/EncryptCookies.php b/app/Http/Middleware/EncryptCookies.php index 033136a..20c5039 100644 --- a/app/Http/Middleware/EncryptCookies.php +++ b/app/Http/Middleware/EncryptCookies.php @@ -12,6 +12,5 @@ class EncryptCookies extends Middleware * @var array */ protected $except = [ - // - ]; + ]; } diff --git a/app/Http/Middleware/FrontEndGlobals.php b/app/Http/Middleware/FrontEndGlobals.php index 8e870d8..20b80ed 100644 --- a/app/Http/Middleware/FrontEndGlobals.php +++ b/app/Http/Middleware/FrontEndGlobals.php @@ -12,14 +12,14 @@ class FrontEndGlobals /** * Handle an incoming request. * - * @param \Illuminate\Http\Request $request - * @param \Closure(\Illuminate\Http\Request): (\Illuminate\Http\Response|\Illuminate\Http\RedirectResponse) $next + * @param \Illuminate\Http\Request $request + * @param \Closure(\Illuminate\Http\Request): (\Illuminate\Http\Response|\Illuminate\Http\RedirectResponse) $next * @return \Illuminate\Http\Response|\Illuminate\Http\RedirectResponse */ public function handle(Request $request, Closure $next) { - //header menu - $currentRoute = Route::current()->getName(); + // header menu + $currentRoute = Route::current()->getName(); $routeParamsFR = Route::current()->parameters(); $routeParamsEN = $routeParamsFR; $routeParamsES = $routeParamsFR; diff --git a/app/Http/Middleware/LangCheck.php b/app/Http/Middleware/LangCheck.php index 9972ec9..25eeac8 100644 --- a/app/Http/Middleware/LangCheck.php +++ b/app/Http/Middleware/LangCheck.php @@ -13,8 +13,8 @@ class LangCheck /** * Handle an incoming request. * - * @param \Illuminate\Http\Request $request - * @param \Closure $next + * @param \Illuminate\Http\Request $request + * @param \Closure $next * @return mixed */ public function handle(Request $request, Closure $next) @@ -22,28 +22,28 @@ class LangCheck $routName = $request->route()->getName(); if (preg_match('/^bo\./', $routName)) { - //Back office + // Back office if ($request->lang) { - //within bo we set lang with querystring param + // within bo we set lang with querystring param $this->saveUserLocale($request->lang, $request); - //bonus remove lang parameter from query + // bonus remove lang parameter from query return redirect()->to($request->fullUrlWithoutQuery('lang')); } else { $this->checkFirstAccess($request); } } else { - //FRONT + // FRONT if (preg_match('/^(en|es)\./', $routName)) { - //from front use named routes + // from front use named routes $langset = $request->segment(1); $this->saveUserLocale($langset, $request); } else { - //not specified in route + // not specified in route if ($this->checkFirstAccess($request)) { $routNameEN = 'en.' . $routName; $routNameES = 'es.' . $routName; - $sess_lang = $request->session()->get('lang', config('app.locale')); + $sess_lang = $request->session()->get('lang', config('app.locale')); switch ($sess_lang) { case 'en': return redirect()->route($routNameEN); @@ -54,8 +54,8 @@ class LangCheck $langset = 'fr'; $this->saveUserLocale($langset, $request); - } - } + }//end if + }//end if @@ -77,9 +77,9 @@ class LangCheck */ private function saveUserLocale($lang, Request $request) { - //Set cookie + // Set cookie Cookie::queue(Cookie::forever('language', strtolower($lang))); - //set session + // set session $request->session()->put('lang', strtolower($lang)); } @@ -90,21 +90,21 @@ class LangCheck */ private function checkFirstAccess(Request $request) { - //do we have session ? + // do we have session ? if (!$request->session()->has('lang')) { $fromC = Cookie::get('language'); if (is_null($fromC) || empty($fromC)) { - //pas de cookie, recherche sur le navigateur + // pas de cookie, recherche sur le navigateur $fromC = substr($request->server('HTTP_ACCEPT_LANGUAGE'), 0, 2); if (!in_array($fromC, $this->langs)) { - //default other languages to en + // default other languages to en $fromC = 'en'; } } $this->saveUserLocale($fromC, $request); return true; } - //we have lang session + // we have lang session return false; } } diff --git a/app/Http/Middleware/PreventRequestsDuringMaintenance.php b/app/Http/Middleware/PreventRequestsDuringMaintenance.php index e4956d0..402ea32 100644 --- a/app/Http/Middleware/PreventRequestsDuringMaintenance.php +++ b/app/Http/Middleware/PreventRequestsDuringMaintenance.php @@ -12,6 +12,5 @@ class PreventRequestsDuringMaintenance extends Middleware * @var array */ protected $except = [ - // - ]; + ]; } diff --git a/app/Http/Middleware/RedirectIfAuthenticated.php b/app/Http/Middleware/RedirectIfAuthenticated.php index 362b48b..764ee81 100644 --- a/app/Http/Middleware/RedirectIfAuthenticated.php +++ b/app/Http/Middleware/RedirectIfAuthenticated.php @@ -12,9 +12,9 @@ class RedirectIfAuthenticated /** * Handle an incoming request. * - * @param \Illuminate\Http\Request $request - * @param \Closure $next - * @param string|null ...$guards + * @param \Illuminate\Http\Request $request + * @param \Closure $next + * @param string|null ...$guards * @return mixed */ public function handle(Request $request, Closure $next, ...$guards) diff --git a/app/Http/Middleware/TrustProxies.php b/app/Http/Middleware/TrustProxies.php index 0c7d3b6..124b191 100644 --- a/app/Http/Middleware/TrustProxies.php +++ b/app/Http/Middleware/TrustProxies.php @@ -17,7 +17,7 @@ class TrustProxies extends Middleware /** * The headers that should be used to detect proxies. * - * @var int + * @var integer */ protected $headers = Request::HEADER_X_FORWARDED_FOR | diff --git a/app/Http/Middleware/VerifyCsrfToken.php b/app/Http/Middleware/VerifyCsrfToken.php index 0c13b85..ed591f2 100644 --- a/app/Http/Middleware/VerifyCsrfToken.php +++ b/app/Http/Middleware/VerifyCsrfToken.php @@ -12,6 +12,5 @@ class VerifyCsrfToken extends Middleware * @var array */ protected $except = [ - // - ]; + ]; } diff --git a/app/Http/Requests/ContactFormRequest.php b/app/Http/Requests/ContactFormRequest.php index 70f88f6..cb5ed3d 100644 --- a/app/Http/Requests/ContactFormRequest.php +++ b/app/Http/Requests/ContactFormRequest.php @@ -9,7 +9,7 @@ class ContactFormRequest extends FormRequest /** * Determine if the user is authorized to make this request. * - * @return bool + * @return boolean */ public function authorize() { diff --git a/app/Http/Requests/StoreGammeRequest.php b/app/Http/Requests/StoreGammeRequest.php index 938871c..37a9112 100644 --- a/app/Http/Requests/StoreGammeRequest.php +++ b/app/Http/Requests/StoreGammeRequest.php @@ -10,7 +10,7 @@ class StoreGammeRequest extends FormRequest /** * Determine if the user is authorized to make this request. * - * @return bool + * @return boolean */ public function authorize() { diff --git a/app/Http/Requests/StorePictoBrandRequest.php b/app/Http/Requests/StorePictoBrandRequest.php index e82bdd6..89fef4a 100644 --- a/app/Http/Requests/StorePictoBrandRequest.php +++ b/app/Http/Requests/StorePictoBrandRequest.php @@ -9,7 +9,7 @@ class StorePictoBrandRequest extends FormRequest /** * Determine if the user is authorized to make this request. * - * @return bool + * @return boolean */ public function authorize() { diff --git a/app/Http/Requests/StorePictoRequest.php b/app/Http/Requests/StorePictoRequest.php index 0f721a6..cfd2106 100644 --- a/app/Http/Requests/StorePictoRequest.php +++ b/app/Http/Requests/StorePictoRequest.php @@ -9,7 +9,7 @@ class StorePictoRequest extends FormRequest /** * Determine if the user is authorized to make this request. * - * @return bool + * @return boolean */ public function authorize() { diff --git a/app/Http/Requests/StorePostRequest.php b/app/Http/Requests/StorePostRequest.php index 3da7dd9..b89b81c 100644 --- a/app/Http/Requests/StorePostRequest.php +++ b/app/Http/Requests/StorePostRequest.php @@ -11,7 +11,7 @@ class StorePostRequest extends FormRequest /** * Determine if the user is authorized to make this request. * - * @return bool + * @return boolean */ public function authorize() { diff --git a/app/Http/Requests/StoreProductRequest.php b/app/Http/Requests/StoreProductRequest.php index 2f48523..f99acd1 100644 --- a/app/Http/Requests/StoreProductRequest.php +++ b/app/Http/Requests/StoreProductRequest.php @@ -12,7 +12,7 @@ class StoreProductRequest extends FormRequest /** * Determine if the user is authorized to make this request. * - * @return bool + * @return boolean */ public function authorize() { @@ -28,7 +28,7 @@ class StoreProductRequest extends FormRequest protected function prepareForValidation() { try { - $tabFour = array( + $tabFour = array( 'id' => 0, 'name' => 'Four', 'url' => '/assets/images/four.png', @@ -36,7 +36,7 @@ class StoreProductRequest extends FormRequest 'temp' => $this->temp_cook0, 'status' => $this->is_activated0 ? true : false ); - $tabFriteuse = array( + $tabFriteuse = array( 'id' => 1, 'name' => 'Friteuse', 'url' => '/assets/images/friteuse.png', @@ -44,7 +44,7 @@ class StoreProductRequest extends FormRequest 'temp' => $this->temp_cook1, 'status' => $this->is_activated1 ? true : false ); - $tabPoele = array( + $tabPoele = array( 'id' => 2, 'name' => 'Poêle', 'url' => '/assets/images/poele.png', @@ -52,7 +52,7 @@ class StoreProductRequest extends FormRequest 'temp' => $this->temp_cook2, 'status' => $this->is_activated2 ? true : false ); - $tabCocotte = array( + $tabCocotte = array( 'id' => 3, 'name' => 'Cocotte', 'url' => '/assets/images/cocotte.png', @@ -60,7 +60,7 @@ class StoreProductRequest extends FormRequest 'temp' => $this->temp_cook3, 'status' => $this->is_activated3 ? true : false ); - $tabPlancha = array( + $tabPlancha = array( 'id' => 4, 'name' => 'Plancha', 'url' => '/assets/images/plancha.png', @@ -68,7 +68,7 @@ class StoreProductRequest extends FormRequest 'temp' => $this->temp_cook4, 'status' => $this->is_activated4 ? true : false ); - $tabBainMarie = array( + $tabBainMarie = array( 'id' => 5, 'name' => 'Bain Marie', 'url' => '/assets/images/bainmarie.png', @@ -76,7 +76,7 @@ class StoreProductRequest extends FormRequest 'temp' => $this->temp_cook5, 'status' => $this->is_activated5 ? true : false ); - $tabBarbecue = array( + $tabBarbecue = array( 'id' => 6, 'name' => 'Barbecue', 'url' => '/assets/images/barbecue.png', @@ -92,7 +92,7 @@ class StoreProductRequest extends FormRequest 'temp' => $this->temp_cook7, 'status' => $this->is_activated7 ? true : false ); - $tabCasserole = array( + $tabCasserole = array( 'id' => 8, 'name' => 'Casserole', 'url' => '/assets/images/casserole.png', @@ -100,7 +100,7 @@ class StoreProductRequest extends FormRequest 'temp' => $this->temp_cook8, 'status' => $this->is_activated8 ? true : false ); - $tabCuisson = json_encode([ + $tabCuisson = json_encode([ 'four' => $tabFour, 'friteuse' => $tabFriteuse, 'poele' => $tabPoele, @@ -121,7 +121,7 @@ class StoreProductRequest extends FormRequest 'name' => $this->content0, 'url' => $urlPlusProduit, ); - $urlPlusProduit = ""; + $urlPlusProduit = ""; if ($this->pictogramme1) { $urlPlusProduit = "/assets/images/" . $this->pictogramme1->getClientOriginalName(); } @@ -130,7 +130,7 @@ class StoreProductRequest extends FormRequest 'name' => $this->content1, 'url' => $urlPlusProduit, ); - $urlPlusProduit = ""; + $urlPlusProduit = ""; if ($this->pictogramme2) { $urlPlusProduit = "/assets/images/" . $this->pictogramme2->getClientOriginalName(); } @@ -139,7 +139,7 @@ class StoreProductRequest extends FormRequest 'name' => $this->content2, 'url' => $urlPlusProduit, ); - $tabPlusProduit = json_encode([$tabPlusProduit1, $tabPlusProduit2, $tabPlusProduit3]); + $tabPlusProduit = json_encode([$tabPlusProduit1, $tabPlusProduit2, $tabPlusProduit3]); $this->merge([ 'slug' => Str::slug($this->name), @@ -158,7 +158,7 @@ class StoreProductRequest extends FormRequest // phpcs:ignore Generic.CodeAnalysis.EmptyStatement.DetectedCatch } catch (InvalidFormatException $e) { // On fait rien - } + }//end try } /** diff --git a/app/Http/Requests/StoreSlideRequest.php b/app/Http/Requests/StoreSlideRequest.php index 07219c8..a94bcf2 100644 --- a/app/Http/Requests/StoreSlideRequest.php +++ b/app/Http/Requests/StoreSlideRequest.php @@ -11,7 +11,7 @@ class StoreSlideRequest extends FormRequest /** * Determine if the user is authorized to make this request. * - * @return bool + * @return boolean */ public function authorize() { diff --git a/app/Http/Requests/StoreSliderRequest.php b/app/Http/Requests/StoreSliderRequest.php index d5acf15..ee32ed1 100644 --- a/app/Http/Requests/StoreSliderRequest.php +++ b/app/Http/Requests/StoreSliderRequest.php @@ -10,7 +10,7 @@ class StoreSliderRequest extends FormRequest /** * Determine if the user is authorized to make this request. * - * @return bool + * @return boolean */ public function authorize() { diff --git a/app/Http/Requests/StoreTextRequest.php b/app/Http/Requests/StoreTextRequest.php index d42c773..07e00f8 100644 --- a/app/Http/Requests/StoreTextRequest.php +++ b/app/Http/Requests/StoreTextRequest.php @@ -9,7 +9,7 @@ class StoreTextRequest extends FormRequest /** * Determine if the user is authorized to make this request. * - * @return bool + * @return boolean */ public function authorize() { diff --git a/app/Http/Requests/UpdateAdviceRequest.php b/app/Http/Requests/UpdateAdviceRequest.php index ee63d56..9486757 100644 --- a/app/Http/Requests/UpdateAdviceRequest.php +++ b/app/Http/Requests/UpdateAdviceRequest.php @@ -9,7 +9,7 @@ class UpdateAdviceRequest extends FormRequest /** * Determine if the user is authorized to make this request. * - * @return bool + * @return boolean */ public function authorize() { diff --git a/app/Http/Requests/UpdateEncartRequest.php b/app/Http/Requests/UpdateEncartRequest.php index c2b20b9..2654ee6 100644 --- a/app/Http/Requests/UpdateEncartRequest.php +++ b/app/Http/Requests/UpdateEncartRequest.php @@ -9,7 +9,7 @@ class UpdateEncartRequest extends FormRequest /** * Determine if the user is authorized to make this request. * - * @return bool + * @return boolean */ public function authorize() { diff --git a/app/Http/Requests/UpdateMomentRequest.php b/app/Http/Requests/UpdateMomentRequest.php index 195d3df..2956518 100644 --- a/app/Http/Requests/UpdateMomentRequest.php +++ b/app/Http/Requests/UpdateMomentRequest.php @@ -9,7 +9,7 @@ class UpdateMomentRequest extends FormRequest /** * Determine if the user is authorized to make this request. * - * @return bool + * @return boolean */ public function authorize() { diff --git a/app/Http/Requests/UpdatePictoBrandRequest.php b/app/Http/Requests/UpdatePictoBrandRequest.php index 4647f6d..8acfebc 100644 --- a/app/Http/Requests/UpdatePictoBrandRequest.php +++ b/app/Http/Requests/UpdatePictoBrandRequest.php @@ -9,7 +9,7 @@ class UpdatePictoBrandRequest extends FormRequest /** * Determine if the user is authorized to make this request. * - * @return bool + * @return boolean */ public function authorize() { diff --git a/app/Http/Requests/UpdatePictoRequest.php b/app/Http/Requests/UpdatePictoRequest.php index f1a7f2c..35371cc 100644 --- a/app/Http/Requests/UpdatePictoRequest.php +++ b/app/Http/Requests/UpdatePictoRequest.php @@ -9,7 +9,7 @@ class UpdatePictoRequest extends FormRequest /** * Determine if the user is authorized to make this request. * - * @return bool + * @return boolean */ public function authorize() { diff --git a/app/Http/Requests/UpdateSeoDataRequest.php b/app/Http/Requests/UpdateSeoDataRequest.php index 0c6bbda..1050453 100644 --- a/app/Http/Requests/UpdateSeoDataRequest.php +++ b/app/Http/Requests/UpdateSeoDataRequest.php @@ -9,7 +9,7 @@ class UpdateSeoDataRequest extends FormRequest /** * Determine if the user is authorized to make this request. * - * @return bool + * @return boolean */ public function authorize() { diff --git a/app/Http/Requests/UpdateTitleRequest.php b/app/Http/Requests/UpdateTitleRequest.php index 387fee7..b3250a3 100644 --- a/app/Http/Requests/UpdateTitleRequest.php +++ b/app/Http/Requests/UpdateTitleRequest.php @@ -9,7 +9,7 @@ class UpdateTitleRequest extends FormRequest /** * Determine if the user is authorized to make this request. * - * @return bool + * @return boolean */ public function authorize() { diff --git a/app/Lib/Utils.php b/app/Lib/Utils.php index 1d539ce..19e6f97 100644 --- a/app/Lib/Utils.php +++ b/app/Lib/Utils.php @@ -21,14 +21,14 @@ class Utils * if a string is passed then the store action is ignored and the strieng is returned * * @param \Illuminate\Http\UploadedFile|\SplFileInfo|string $image - * @param string $folderName + * @param string $folderName * @return string The storage path */ public static function storeImage($image, string $folderName): string { if (\is_object($image) and get_class($image) === UploadedFile::class) { /** @var UploadedFile */ - $image = $image; + $image = $image; $newPath = self::prepareMoveFile($image->getClientOriginalName(), $folderName); $newPath = str_replace(storage_path('app'), '', $newPath); $image->storePubliclyAs(pathinfo($newPath, \PATHINFO_DIRNAME), pathinfo($newPath, \PATHINFO_BASENAME)); @@ -36,7 +36,7 @@ class Utils } if (\is_object($image) and get_class($image) === SplFileInfo::class) { /** @var SplFileInfo */ - $image = $image; + $image = $image; $newPath = self::prepareMoveFile($image->getBaseName(), $folderName); if (!File::copy($image->getRealPath(), $newPath)) { throw new \Exception(sprintf( diff --git a/app/Models/Product.php b/app/Models/Product.php index 995915b..e1d8429 100644 --- a/app/Models/Product.php +++ b/app/Models/Product.php @@ -66,7 +66,7 @@ class Product extends Model } } } - //delete des images de plus produit + // delete des images de plus produit $plusproduit = json_decode($product->plusproduit); foreach ($plusproduit as $plus) { $urlPicture = public_path() . $plus->url; diff --git a/app/Providers/AppServiceProvider.php b/app/Providers/AppServiceProvider.php index 54c51c7..08d3a8b 100644 --- a/app/Providers/AppServiceProvider.php +++ b/app/Providers/AppServiceProvider.php @@ -14,7 +14,6 @@ class AppServiceProvider extends ServiceProvider */ public function register() { - // } /** diff --git a/app/Providers/AuthServiceProvider.php b/app/Providers/AuthServiceProvider.php index d2151bd..3ffc67d 100644 --- a/app/Providers/AuthServiceProvider.php +++ b/app/Providers/AuthServiceProvider.php @@ -21,7 +21,5 @@ class AuthServiceProvider extends ServiceProvider public function boot() { $this->registerPolicies(); - - // } } diff --git a/app/Providers/BroadcastServiceProvider.php b/app/Providers/BroadcastServiceProvider.php deleted file mode 100644 index 395c518..0000000 --- a/app/Providers/BroadcastServiceProvider.php +++ /dev/null @@ -1,21 +0,0 @@ -configureRateLimiting(); - $this->routes(function () { - Route::prefix('api') - ->middleware('api') - ->namespace($this->namespace) - ->group(base_path('routes/api.php')); - Route::middleware('web') ->namespace($this->namespace) ->group(base_path('routes/web.php')); @@ -48,23 +38,11 @@ class RouteServiceProvider extends ServiceProvider }); Route::bind('productSlug', function ($value, $route) { - $gamme = $route->parameter('gammeSlug'); + $gamme = $route->parameter('gammeSlug'); $product = Product::where('slug', 'LIKE', '%:"' . $value . '"%') ->where('gamme_id', $gamme->id) ->firstOrFail(); return $product; }); } - - /** - * Configure the rate limiters for the application. - * - * @return void - */ - protected function configureRateLimiting() - { - RateLimiter::for('api', function (Request $request) { - return Limit::perMinute(60)->by(optional($request->user())->id ?: $request->ip()); - }); - } } diff --git a/app/Traits/CastsEnumsHasTranslations.php b/app/Traits/CastsEnumsHasTranslations.php index c81de92..9975e38 100644 --- a/app/Traits/CastsEnumsHasTranslations.php +++ b/app/Traits/CastsEnumsHasTranslations.php @@ -20,7 +20,7 @@ trait CastsEnumsHasTranslations public function getAttributeValue($key) { if ($this->hasEnumCast($key)) { - return $this->enumGetAttributeValue($key); + return $this->enumGetAttributeValue($key); } return $this->transGetAttributeValue($key); diff --git a/composer.json b/composer.json index 95f6ac8..4070bbd 100644 --- a/composer.json +++ b/composer.json @@ -15,7 +15,6 @@ "kwaadpepper/enum": "^2.1", "kwaadpepper/exception-handler": "^0.0.9", "laravel/framework": "^8.65", - "laravel/sanctum": "^2.11", "laravel/tinker": "^2.5", "laravel/ui": "^3.3", "ldc/web-admin-secure-laravel": "1.0.1", diff --git a/composer.lock b/composer.lock index 8d989a5..75c8d83 100644 --- a/composer.lock +++ b/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": "fcf9b3346e30223089c406870c83a34d", + "content-hash": "b27ccff2f463281dca6230c1d20be58e", "packages": [ { "name": "asm89/stack-cors", @@ -1280,70 +1280,6 @@ }, "time": "2022-03-08T16:12:54+00:00" }, - { - "name": "laravel/sanctum", - "version": "v2.14.2", - "source": { - "type": "git", - "url": "https://github.com/laravel/sanctum.git", - "reference": "dc5d749ba9bfcfd68d8f5c272238f88bea223e66" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/laravel/sanctum/zipball/dc5d749ba9bfcfd68d8f5c272238f88bea223e66", - "reference": "dc5d749ba9bfcfd68d8f5c272238f88bea223e66", - "shasum": "" - }, - "require": { - "ext-json": "*", - "illuminate/contracts": "^6.9|^7.0|^8.0|^9.0", - "illuminate/database": "^6.9|^7.0|^8.0|^9.0", - "illuminate/support": "^6.9|^7.0|^8.0|^9.0", - "php": "^7.2|^8.0" - }, - "require-dev": { - "mockery/mockery": "^1.0", - "orchestra/testbench": "^4.0|^5.0|^6.0|^7.0", - "phpunit/phpunit": "^8.0|^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.x-dev" - }, - "laravel": { - "providers": [ - "Laravel\\Sanctum\\SanctumServiceProvider" - ] - } - }, - "autoload": { - "psr-4": { - "Laravel\\Sanctum\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylor@laravel.com" - } - ], - "description": "Laravel Sanctum provides a featherweight authentication system for SPAs and simple APIs.", - "keywords": [ - "auth", - "laravel", - "sanctum" - ], - "support": { - "issues": "https://github.com/laravel/sanctum/issues", - "source": "https://github.com/laravel/sanctum" - }, - "time": "2022-02-16T14:40:23+00:00" - }, { "name": "laravel/serializable-closure", "version": "v1.1.1", diff --git a/config/app.php b/config/app.php index f0f9238..4b4ebd9 100644 --- a/config/app.php +++ b/config/app.php @@ -3,53 +3,53 @@ return [ /* - |-------------------------------------------------------------------------- - | Application Name - |-------------------------------------------------------------------------- - | - | This value is the name of your application. This value is used when the - | framework needs to place the application's name in a notification or - | any other location as required by the application or its packages. - | + |-------------------------------------------------------------------------- + | Application Name + |-------------------------------------------------------------------------- + | + | This value is the name of your application. This value is used when the + | framework needs to place the application's name in a notification or + | any other location as required by the application or its packages. + | */ 'name' => env('APP_NAME', 'Laravel'), /* - |-------------------------------------------------------------------------- - | Application Environment - |-------------------------------------------------------------------------- - | - | This value determines the "environment" your application is currently - | running in. This may determine how you prefer to configure various - | services the application utilizes. Set this in your ".env" file. - | + |-------------------------------------------------------------------------- + | Application Environment + |-------------------------------------------------------------------------- + | + | This value determines the "environment" your application is currently + | running in. This may determine how you prefer to configure various + | services the application utilizes. Set this in your ".env" file. + | */ 'env' => env('APP_ENV', 'production'), /* - |-------------------------------------------------------------------------- - | Application Debug Mode - |-------------------------------------------------------------------------- - | - | When your application is in debug mode, detailed error messages with - | stack traces will be shown on every error that occurs within your - | application. If disabled, a simple generic error page is shown. - | + |-------------------------------------------------------------------------- + | Application Debug Mode + |-------------------------------------------------------------------------- + | + | When your application is in debug mode, detailed error messages with + | stack traces will be shown on every error that occurs within your + | application. If disabled, a simple generic error page is shown. + | */ 'debug' => (bool)env('APP_DEBUG', false), /* - |-------------------------------------------------------------------------- - | Application URL - |-------------------------------------------------------------------------- - | - | This URL is used by the console to properly generate URLs when using - | the Artisan command line tool. You should set this to the root of - | your application so that it is used when running Artisan tasks. - | + |-------------------------------------------------------------------------- + | Application URL + |-------------------------------------------------------------------------- + | + | This URL is used by the console to properly generate URLs when using + | the Artisan command line tool. You should set this to the root of + | your application so that it is used when running Artisan tasks. + | */ 'url' => env('APP_URL', 'http://localhost'), @@ -57,66 +57,66 @@ return [ 'asset_url' => env('ASSET_URL', null), /* - |-------------------------------------------------------------------------- - | Application Timezone - |-------------------------------------------------------------------------- - | - | Here you may specify the default timezone for your application, which - | will be used by the PHP date and date-time functions. We have gone - | ahead and set this to a sensible default for you out of the box. - | + |-------------------------------------------------------------------------- + | Application Timezone + |-------------------------------------------------------------------------- + | + | Here you may specify the default timezone for your application, which + | will be used by the PHP date and date-time functions. We have gone + | ahead and set this to a sensible default for you out of the box. + | */ 'timezone' => 'Europe/Paris', /* - |-------------------------------------------------------------------------- - | Application Locale Configuration - |-------------------------------------------------------------------------- - | - | The application locale determines the default locale that will be used - | by the translation service provider. You are free to set this value - | to any of the locales which will be supported by the application. - | + |-------------------------------------------------------------------------- + | Application Locale Configuration + |-------------------------------------------------------------------------- + | + | The application locale determines the default locale that will be used + | by the translation service provider. You are free to set this value + | to any of the locales which will be supported by the application. + | */ 'locale' => 'fr', /* - |-------------------------------------------------------------------------- - | Application Fallback Locale - |-------------------------------------------------------------------------- - | - | The fallback locale determines the locale to use when the current one - | is not available. You may change the value to correspond to any of - | the language folders that are provided through your application. - | + |-------------------------------------------------------------------------- + | Application Fallback Locale + |-------------------------------------------------------------------------- + | + | The fallback locale determines the locale to use when the current one + | is not available. You may change the value to correspond to any of + | the language folders that are provided through your application. + | */ 'fallback_locale' => 'fr', /* - |-------------------------------------------------------------------------- - | Faker Locale - |-------------------------------------------------------------------------- - | - | This locale will be used by the Faker PHP library when generating fake - | data for your database seeds. For example, this will be used to get - | localized telephone numbers, street address information and more. - | + |-------------------------------------------------------------------------- + | Faker Locale + |-------------------------------------------------------------------------- + | + | This locale will be used by the Faker PHP library when generating fake + | data for your database seeds. For example, this will be used to get + | localized telephone numbers, street address information and more. + | */ 'faker_locale' => 'fr_FR', /* - |-------------------------------------------------------------------------- - | Encryption Key - |-------------------------------------------------------------------------- - | - | This key is used by the Illuminate encrypter service and should be set - | to a random, 32 character string, otherwise these encrypted strings - | will not be safe. Please do this before deploying an application! - | + |-------------------------------------------------------------------------- + | Encryption Key + |-------------------------------------------------------------------------- + | + | This key is used by the Illuminate encrypter service and should be set + | to a random, 32 character string, otherwise these encrypted strings + | will not be safe. Please do this before deploying an application! + | */ 'key' => env('APP_KEY'), @@ -124,14 +124,14 @@ return [ 'cipher' => 'AES-256-CBC', /* - |-------------------------------------------------------------------------- - | Autoloaded Service Providers - |-------------------------------------------------------------------------- - | - | The service providers listed here will be automatically loaded on the - | request to your application. Feel free to add your own services to - | this array to grant expanded functionality to your applications. - | + |-------------------------------------------------------------------------- + | Autoloaded Service Providers + |-------------------------------------------------------------------------- + | + | The service providers listed here will be automatically loaded on the + | request to your application. Feel free to add your own services to + | this array to grant expanded functionality to your applications. + | */ 'providers' => [ @@ -177,14 +177,14 @@ return [ ], /* - |-------------------------------------------------------------------------- - | Class Aliases - |-------------------------------------------------------------------------- - | - | This array of class aliases will be registered when this application - | is started. However, feel free to register as many as you wish as - | the aliases are "lazy" loaded so they don't hinder performance. - | + |-------------------------------------------------------------------------- + | Class Aliases + |-------------------------------------------------------------------------- + | + | This array of class aliases will be registered when this application + | is started. However, feel free to register as many as you wish as + | the aliases are "lazy" loaded so they don't hinder performance. + | */ 'aliases' => [ diff --git a/config/auth.php b/config/auth.php index a62f993..7b1fa70 100644 --- a/config/auth.php +++ b/config/auth.php @@ -3,14 +3,14 @@ return [ /* - |-------------------------------------------------------------------------- - | Authentication Defaults - |-------------------------------------------------------------------------- - | - | This option controls the default authentication "guard" and password - | reset options for your application. You may change these defaults - | as required, but they're a perfect start for most applications. - | + |-------------------------------------------------------------------------- + | Authentication Defaults + |-------------------------------------------------------------------------- + | + | This option controls the default authentication "guard" and password + | reset options for your application. You may change these defaults + | as required, but they're a perfect start for most applications. + | */ 'defaults' => [ @@ -19,20 +19,20 @@ return [ ], /* - |-------------------------------------------------------------------------- - | Authentication Guards - |-------------------------------------------------------------------------- - | - | Next, you may define every authentication guard for your application. - | Of course, a great default configuration has been defined for you - | here which uses session storage and the Eloquent user provider. - | - | All authentication drivers have a user provider. This defines how the - | users are actually retrieved out of your database or other storage - | mechanisms used by this application to persist your user's data. - | - | Supported: "session" - | + |-------------------------------------------------------------------------- + | Authentication Guards + |-------------------------------------------------------------------------- + | + | Next, you may define every authentication guard for your application. + | Of course, a great default configuration has been defined for you + | here which uses session storage and the Eloquent user provider. + | + | All authentication drivers have a user provider. This defines how the + | users are actually retrieved out of your database or other storage + | mechanisms used by this application to persist your user's data. + | + | Supported: "session" + | */ 'guards' => [ @@ -43,20 +43,20 @@ return [ ], /* - |-------------------------------------------------------------------------- - | User Providers - |-------------------------------------------------------------------------- - | - | All authentication drivers have a user provider. This defines how the - | users are actually retrieved out of your database or other storage - | mechanisms used by this application to persist your user's data. - | - | If you have multiple user tables or models you may configure multiple - | sources which represent each model / table. These sources may then - | be assigned to any extra authentication guards you have defined. - | - | Supported: "database", "eloquent" - | + |-------------------------------------------------------------------------- + | User Providers + |-------------------------------------------------------------------------- + | + | All authentication drivers have a user provider. This defines how the + | users are actually retrieved out of your database or other storage + | mechanisms used by this application to persist your user's data. + | + | If you have multiple user tables or models you may configure multiple + | sources which represent each model / table. These sources may then + | be assigned to any extra authentication guards you have defined. + | + | Supported: "database", "eloquent" + | */ 'providers' => [ @@ -67,18 +67,18 @@ return [ ], /* - |-------------------------------------------------------------------------- - | Resetting Passwords - |-------------------------------------------------------------------------- - | - | You may specify multiple password reset configurations if you have more - | than one user table or model in the application and you want to have - | separate password reset settings based on the specific user types. - | - | The expire time is the number of minutes that the reset token should be - | considered valid. This security feature keeps tokens short-lived so - | they have less time to be guessed. You may change this as needed. - | + |-------------------------------------------------------------------------- + | Resetting Passwords + |-------------------------------------------------------------------------- + | + | You may specify multiple password reset configurations if you have more + | than one user table or model in the application and you want to have + | separate password reset settings based on the specific user types. + | + | The expire time is the number of minutes that the reset token should be + | considered valid. This security feature keeps tokens short-lived so + | they have less time to be guessed. You may change this as needed. + | */ 'passwords' => [ @@ -91,14 +91,14 @@ return [ ], /* - |-------------------------------------------------------------------------- - | Password Confirmation Timeout - |-------------------------------------------------------------------------- - | - | Here you may define the amount of seconds before a password confirmation - | times out and the user is prompted to re-enter their password via the - | confirmation screen. By default, the timeout lasts for three hours. - | + |-------------------------------------------------------------------------- + | Password Confirmation Timeout + |-------------------------------------------------------------------------- + | + | Here you may define the amount of seconds before a password confirmation + | times out and the user is prompted to re-enter their password via the + | confirmation screen. By default, the timeout lasts for three hours. + | */ 'password_timeout' => 10800, diff --git a/config/bo.php b/config/bo.php index 4d21217..b1149ab 100644 --- a/config/bo.php +++ b/config/bo.php @@ -2,12 +2,12 @@ return [ /* - |-------------------------------------------------------------------------- - | App parameters - |-------------------------------------------------------------------------- - | - | Several parameters - | + |-------------------------------------------------------------------------- + | App parameters + |-------------------------------------------------------------------------- + | + | Several parameters + | */ 'slide_image_maxwidth' => '1920', diff --git a/config/broadcasting.php b/config/broadcasting.php index 2d52982..b80d371 100644 --- a/config/broadcasting.php +++ b/config/broadcasting.php @@ -3,29 +3,29 @@ return [ /* - |-------------------------------------------------------------------------- - | Default Broadcaster - |-------------------------------------------------------------------------- - | - | This option controls the default broadcaster that will be used by the - | framework when an event needs to be broadcast. You may set this to - | any of the connections defined in the "connections" array below. - | - | Supported: "pusher", "ably", "redis", "log", "null" - | + |-------------------------------------------------------------------------- + | Default Broadcaster + |-------------------------------------------------------------------------- + | + | This option controls the default broadcaster that will be used by the + | framework when an event needs to be broadcast. You may set this to + | any of the connections defined in the "connections" array below. + | + | Supported: "pusher", "ably", "redis", "log", "null" + | */ 'default' => env('BROADCAST_DRIVER', 'null'), /* - |-------------------------------------------------------------------------- - | Broadcast Connections - |-------------------------------------------------------------------------- - | - | Here you may define all of the broadcast connections that will be used - | to broadcast events to other systems or over websockets. Samples of - | each available type of connection are provided inside this array. - | + |-------------------------------------------------------------------------- + | Broadcast Connections + |-------------------------------------------------------------------------- + | + | Here you may define all of the broadcast connections that will be used + | to broadcast events to other systems or over websockets. Samples of + | each available type of connection are provided inside this array. + | */ 'connections' => [ diff --git a/config/cache.php b/config/cache.php index b092dd2..39d1037 100644 --- a/config/cache.php +++ b/config/cache.php @@ -5,30 +5,30 @@ use Illuminate\Support\Str; return [ /* - |-------------------------------------------------------------------------- - | Default Cache Store - |-------------------------------------------------------------------------- - | - | This option controls the default cache connection that gets used while - | using this caching library. This connection is used when another is - | not explicitly specified when executing a given caching function. - | + |-------------------------------------------------------------------------- + | Default Cache Store + |-------------------------------------------------------------------------- + | + | This option controls the default cache connection that gets used while + | using this caching library. This connection is used when another is + | not explicitly specified when executing a given caching function. + | */ 'default' => env('CACHE_DRIVER', 'file'), /* - |-------------------------------------------------------------------------- - | Cache Stores - |-------------------------------------------------------------------------- - | - | Here you may define all of the cache "stores" for your application as - | well as their drivers. You may even define multiple stores for the - | same cache driver to group types of items stored in your caches. - | - | Supported drivers: "apc", "array", "database", "file", - | "memcached", "redis", "dynamodb", "octane", "null" - | + |-------------------------------------------------------------------------- + | Cache Stores + |-------------------------------------------------------------------------- + | + | Here you may define all of the cache "stores" for your application as + | well as their drivers. You may even define multiple stores for the + | same cache driver to group types of items stored in your caches. + | + | Supported drivers: "apc", "array", "database", "file", + | "memcached", "redis", "dynamodb", "octane", "null" + | */ 'stores' => [ @@ -95,14 +95,14 @@ return [ ], /* - |-------------------------------------------------------------------------- - | Cache Key Prefix - |-------------------------------------------------------------------------- - | - | When utilizing a RAM based store such as APC or Memcached, there might - | be other applications utilizing the same cache. So, we'll specify a - | value to get prefixed to all our keys so we can avoid collisions. - | + |-------------------------------------------------------------------------- + | Cache Key Prefix + |-------------------------------------------------------------------------- + | + | When utilizing a RAM based store such as APC or Memcached, there might + | be other applications utilizing the same cache. So, we'll specify a + | value to get prefixed to all our keys so we can avoid collisions. + | */ 'prefix' => env('CACHE_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_') . '_cache'), diff --git a/config/cors.php b/config/cors.php index 8a39e6d..32a0f68 100644 --- a/config/cors.php +++ b/config/cors.php @@ -3,16 +3,16 @@ return [ /* - |-------------------------------------------------------------------------- - | Cross-Origin Resource Sharing (CORS) Configuration - |-------------------------------------------------------------------------- - | - | Here you may configure your settings for cross-origin resource sharing - | or "CORS". This determines what cross-origin operations may execute - | in web browsers. You are free to adjust these settings as needed. - | - | To learn more: https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS - | + |-------------------------------------------------------------------------- + | Cross-Origin Resource Sharing (CORS) Configuration + |-------------------------------------------------------------------------- + | + | Here you may configure your settings for cross-origin resource sharing + | or "CORS". This determines what cross-origin operations may execute + | in web browsers. You are free to adjust these settings as needed. + | + | To learn more: https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS + | */ 'paths' => ['api/*', 'sanctum/csrf-cookie'], diff --git a/config/database.php b/config/database.php index 3bfc47a..ac4559f 100644 --- a/config/database.php +++ b/config/database.php @@ -5,32 +5,32 @@ use Illuminate\Support\Str; return [ /* - |-------------------------------------------------------------------------- - | Default Database Connection Name - |-------------------------------------------------------------------------- - | - | Here you may specify which of the database connections below you wish - | to use as your default connection for all database work. Of course - | you may use many connections at once using the Database library. - | + |-------------------------------------------------------------------------- + | Default Database Connection Name + |-------------------------------------------------------------------------- + | + | Here you may specify which of the database connections below you wish + | to use as your default connection for all database work. Of course + | you may use many connections at once using the Database library. + | */ 'default' => env('DB_CONNECTION', 'mysql'), /* - |-------------------------------------------------------------------------- - | Database Connections - |-------------------------------------------------------------------------- - | - | Here are each of the database connections setup for your application. - | Of course, examples of configuring each database platform that is - | supported by Laravel is shown below to make development simple. - | - | - | All database work in Laravel is done through the PHP PDO facilities - | so make sure you have the driver for your particular database of - | choice installed on your machine before you begin development. - | + |-------------------------------------------------------------------------- + | Database Connections + |-------------------------------------------------------------------------- + | + | Here are each of the database connections setup for your application. + | Of course, examples of configuring each database platform that is + | supported by Laravel is shown below to make development simple. + | + | + | All database work in Laravel is done through the PHP PDO facilities + | so make sure you have the driver for your particular database of + | choice installed on your machine before you begin development. + | */ 'connections' => [ @@ -94,27 +94,27 @@ return [ ], /* - |-------------------------------------------------------------------------- - | Migration Repository Table - |-------------------------------------------------------------------------- - | - | This table keeps track of all the migrations that have already run for - | your application. Using this information, we can determine which of - | the migrations on disk haven't actually been run in the database. - | + |-------------------------------------------------------------------------- + | Migration Repository Table + |-------------------------------------------------------------------------- + | + | This table keeps track of all the migrations that have already run for + | your application. Using this information, we can determine which of + | the migrations on disk haven't actually been run in the database. + | */ 'migrations' => 'migrations', /* - |-------------------------------------------------------------------------- - | Redis Databases - |-------------------------------------------------------------------------- - | - | Redis is an open source, fast, and advanced key-value store that also - | provides a richer body of commands than a typical key-value system - | such as APC or Memcached. Laravel makes it easy to dig right in. - | + |-------------------------------------------------------------------------- + | Redis Databases + |-------------------------------------------------------------------------- + | + | Redis is an open source, fast, and advanced key-value store that also + | provides a richer body of commands than a typical key-value system + | such as APC or Memcached. Laravel makes it easy to dig right in. + | */ 'redis' => [ diff --git a/config/filesystems.php b/config/filesystems.php index e6b2e79..0dece94 100644 --- a/config/filesystems.php +++ b/config/filesystems.php @@ -3,29 +3,29 @@ return [ /* - |-------------------------------------------------------------------------- - | Default Filesystem Disk - |-------------------------------------------------------------------------- - | - | Here you may specify the default filesystem disk that should be used - | by the framework. The "local" disk, as well as a variety of cloud - | based disks are available to your application. Just store away! - | + |-------------------------------------------------------------------------- + | Default Filesystem Disk + |-------------------------------------------------------------------------- + | + | Here you may specify the default filesystem disk that should be used + | by the framework. The "local" disk, as well as a variety of cloud + | based disks are available to your application. Just store away! + | */ 'default' => env('FILESYSTEM_DRIVER', 'local'), /* - |-------------------------------------------------------------------------- - | Filesystem Disks - |-------------------------------------------------------------------------- - | - | Here you may configure as many filesystem "disks" as you wish, and you - | may even configure multiple disks of the same driver. Defaults have - | been setup for each driver as an example of the required options. - | - | Supported Drivers: "local", "ftp", "sftp", "s3" - | + |-------------------------------------------------------------------------- + | Filesystem Disks + |-------------------------------------------------------------------------- + | + | Here you may configure as many filesystem "disks" as you wish, and you + | may even configure multiple disks of the same driver. Defaults have + | been setup for each driver as an example of the required options. + | + | Supported Drivers: "local", "ftp", "sftp", "s3" + | */ 'disks' => [ @@ -56,14 +56,14 @@ return [ ], /* - |-------------------------------------------------------------------------- - | Symbolic Links - |-------------------------------------------------------------------------- - | - | Here you may configure the symbolic links that will be created when the - | `storage:link` Artisan command is executed. The array keys should be - | the locations of the links and the values should be their targets. - | + |-------------------------------------------------------------------------- + | Symbolic Links + |-------------------------------------------------------------------------- + | + | Here you may configure the symbolic links that will be created when the + | `storage:link` Artisan command is executed. The array keys should be + | the locations of the links and the values should be their targets. + | */ 'links' => [ diff --git a/config/hashing.php b/config/hashing.php index 8425770..6641c8c 100644 --- a/config/hashing.php +++ b/config/hashing.php @@ -3,29 +3,29 @@ return [ /* - |-------------------------------------------------------------------------- - | Default Hash Driver - |-------------------------------------------------------------------------- - | - | This option controls the default hash driver that will be used to hash - | passwords for your application. By default, the bcrypt algorithm is - | used; however, you remain free to modify this option if you wish. - | - | Supported: "bcrypt", "argon", "argon2id" - | + |-------------------------------------------------------------------------- + | Default Hash Driver + |-------------------------------------------------------------------------- + | + | This option controls the default hash driver that will be used to hash + | passwords for your application. By default, the bcrypt algorithm is + | used; however, you remain free to modify this option if you wish. + | + | Supported: "bcrypt", "argon", "argon2id" + | */ 'driver' => 'bcrypt', /* - |-------------------------------------------------------------------------- - | Bcrypt Options - |-------------------------------------------------------------------------- - | - | Here you may specify the configuration options that should be used when - | passwords are hashed using the Bcrypt algorithm. This will allow you - | to control the amount of time it takes to hash the given password. - | + |-------------------------------------------------------------------------- + | Bcrypt Options + |-------------------------------------------------------------------------- + | + | Here you may specify the configuration options that should be used when + | passwords are hashed using the Bcrypt algorithm. This will allow you + | to control the amount of time it takes to hash the given password. + | */ 'bcrypt' => [ @@ -33,14 +33,14 @@ return [ ], /* - |-------------------------------------------------------------------------- - | Argon Options - |-------------------------------------------------------------------------- - | - | Here you may specify the configuration options that should be used when - | passwords are hashed using the Argon algorithm. These will allow you - | to control the amount of time it takes to hash the given password. - | + |-------------------------------------------------------------------------- + | Argon Options + |-------------------------------------------------------------------------- + | + | Here you may specify the configuration options that should be used when + | passwords are hashed using the Argon algorithm. These will allow you + | to control the amount of time it takes to hash the given password. + | */ 'argon' => [ diff --git a/config/logging.php b/config/logging.php index 880cd92..873bc0f 100644 --- a/config/logging.php +++ b/config/logging.php @@ -7,44 +7,44 @@ use Monolog\Handler\SyslogUdpHandler; return [ /* - |-------------------------------------------------------------------------- - | Default Log Channel - |-------------------------------------------------------------------------- - | - | This option defines the default log channel that gets used when writing - | messages to the logs. The name specified in this option should match - | one of the channels defined in the "channels" configuration array. - | + |-------------------------------------------------------------------------- + | Default Log Channel + |-------------------------------------------------------------------------- + | + | This option defines the default log channel that gets used when writing + | messages to the logs. The name specified in this option should match + | one of the channels defined in the "channels" configuration array. + | */ 'default' => env('LOG_CHANNEL', 'stack'), /* - |-------------------------------------------------------------------------- - | Deprecations Log Channel - |-------------------------------------------------------------------------- - | - | This option controls the log channel that should be used to log warnings - | regarding deprecated PHP and library features. This allows you to get - | your application ready for upcoming major versions of dependencies. - | + |-------------------------------------------------------------------------- + | Deprecations Log Channel + |-------------------------------------------------------------------------- + | + | This option controls the log channel that should be used to log warnings + | regarding deprecated PHP and library features. This allows you to get + | your application ready for upcoming major versions of dependencies. + | */ 'deprecations' => env('LOG_DEPRECATIONS_CHANNEL', 'null'), /* - |-------------------------------------------------------------------------- - | Log Channels - |-------------------------------------------------------------------------- - | - | Here you may configure the log channels for your application. Out of - | the box, Laravel uses the Monolog PHP logging library. This gives - | you a variety of powerful log handlers / formatters to utilize. - | - | Available Drivers: "single", "daily", "slack", "syslog", - | "errorlog", "monolog", - | "custom", "stack" - | + |-------------------------------------------------------------------------- + | Log Channels + |-------------------------------------------------------------------------- + | + | Here you may configure the log channels for your application. Out of + | the box, Laravel uses the Monolog PHP logging library. This gives + | you a variety of powerful log handlers / formatters to utilize. + | + | Available Drivers: "single", "daily", "slack", "syslog", + | "errorlog", "monolog", + | "custom", "stack" + | */ 'channels' => [ diff --git a/config/mail.php b/config/mail.php index 2524386..61f5bcc 100644 --- a/config/mail.php +++ b/config/mail.php @@ -3,34 +3,34 @@ return [ /* - |-------------------------------------------------------------------------- - | Default Mailer - |-------------------------------------------------------------------------- - | - | This option controls the default mailer that is used to send any email - | messages sent by your application. Alternative mailers may be setup - | and used as needed; however, this mailer will be used by default. - | + |-------------------------------------------------------------------------- + | Default Mailer + |-------------------------------------------------------------------------- + | + | This option controls the default mailer that is used to send any email + | messages sent by your application. Alternative mailers may be setup + | and used as needed; however, this mailer will be used by default. + | */ 'default' => env('MAIL_MAILER', 'smtp'), /* - |-------------------------------------------------------------------------- - | Mailer Configurations - |-------------------------------------------------------------------------- - | - | Here you may configure all of the mailers used by your application plus - | their respective settings. Several examples have been configured for - | you and you are free to add your own as your application requires. - | - | Laravel supports a variety of mail "transport" drivers to be used while - | sending an e-mail. You will specify which one you are using for your - | mailers below. You are free to add additional mailers as required. - | - | Supported: "smtp", "sendmail", "mailgun", "ses", - | "postmark", "log", "array", "failover" - | + |-------------------------------------------------------------------------- + | Mailer Configurations + |-------------------------------------------------------------------------- + | + | Here you may configure all of the mailers used by your application plus + | their respective settings. Several examples have been configured for + | you and you are free to add your own as your application requires. + | + | Laravel supports a variety of mail "transport" drivers to be used while + | sending an e-mail. You will specify which one you are using for your + | mailers below. You are free to add additional mailers as required. + | + | Supported: "smtp", "sendmail", "mailgun", "ses", + | "postmark", "log", "array", "failover" + | */ 'mailers' => [ @@ -81,14 +81,14 @@ return [ ], /* - |-------------------------------------------------------------------------- - | Global "From" Address - |-------------------------------------------------------------------------- - | - | You may wish for all e-mails sent by your application to be sent from - | the same address. Here, you may specify a name and address that is - | used globally for all e-mails that are sent by your application. - | + |-------------------------------------------------------------------------- + | Global "From" Address + |-------------------------------------------------------------------------- + | + | You may wish for all e-mails sent by your application to be sent from + | the same address. Here, you may specify a name and address that is + | used globally for all e-mails that are sent by your application. + | */ 'from' => [ @@ -102,14 +102,14 @@ return [ ], /* - |-------------------------------------------------------------------------- - | Markdown Mail Settings - |-------------------------------------------------------------------------- - | - | If you are using Markdown based email rendering, you may configure your - | theme and component paths here, allowing you to customize the design - | of the emails. Or, you may simply stick with the Laravel defaults! - | + |-------------------------------------------------------------------------- + | Markdown Mail Settings + |-------------------------------------------------------------------------- + | + | If you are using Markdown based email rendering, you may configure your + | theme and component paths here, allowing you to customize the design + | of the emails. Or, you may simply stick with the Laravel defaults! + | */ 'markdown' => [ diff --git a/config/purifier.php b/config/purifier.php index 0cf6303..a86a47c 100644 --- a/config/purifier.php +++ b/config/purifier.php @@ -25,7 +25,8 @@ return [ 'cacheFileMode' => 0755, 'settings' => [ 'default' => [ - 'HTML.SafeIframe' => true, // For iframes + 'HTML.SafeIframe' => true, +// For iframes 'URI.SafeIframeRegexp' => "%^(http://|https://|//)(vimeo.com)%", 'HTML.Doctype' => 'HTML 4.01 Transitional', 'HTML.Allowed' => 'h1[style],h2[style],h3[style],h4[style],h5[style],h6[style],figure[class],oembed[url],div,b,strong,i,em,u,a[href|title],ul[style],ol[style],dl[style],li,p[style],br,span[style|class],img[width|height|alt|src],iframe[src|width|height|class|frameborder],table,thead,tbody,th,tr,td,hr', diff --git a/config/queue.php b/config/queue.php index 25ea5a8..c312794 100644 --- a/config/queue.php +++ b/config/queue.php @@ -3,29 +3,29 @@ return [ /* - |-------------------------------------------------------------------------- - | Default Queue Connection Name - |-------------------------------------------------------------------------- - | - | Laravel's queue API supports an assortment of back-ends via a single - | API, giving you convenient access to each back-end using the same - | syntax for every one. Here you may define a default connection. - | + |-------------------------------------------------------------------------- + | Default Queue Connection Name + |-------------------------------------------------------------------------- + | + | Laravel's queue API supports an assortment of back-ends via a single + | API, giving you convenient access to each back-end using the same + | syntax for every one. Here you may define a default connection. + | */ 'default' => env('QUEUE_CONNECTION', 'sync'), /* - |-------------------------------------------------------------------------- - | Queue Connections - |-------------------------------------------------------------------------- - | - | Here you may configure the connection information for each server that - | is used by your application. A default configuration has been added - | for each back-end shipped with Laravel. You are free to add more. - | - | Drivers: "sync", "database", "beanstalkd", "sqs", "redis", "null" - | + |-------------------------------------------------------------------------- + | Queue Connections + |-------------------------------------------------------------------------- + | + | Here you may configure the connection information for each server that + | is used by your application. A default configuration has been added + | for each back-end shipped with Laravel. You are free to add more. + | + | Drivers: "sync", "database", "beanstalkd", "sqs", "redis", "null" + | */ 'connections' => [ @@ -74,14 +74,14 @@ return [ ], /* - |-------------------------------------------------------------------------- - | Failed Queue Jobs - |-------------------------------------------------------------------------- - | - | These options configure the behavior of failed queue job logging so you - | can control which database and table are used to store the jobs that - | have failed. You may change them to any database / table you wish. - | + |-------------------------------------------------------------------------- + | Failed Queue Jobs + |-------------------------------------------------------------------------- + | + | These options configure the behavior of failed queue job logging so you + | can control which database and table are used to store the jobs that + | have failed. You may change them to any database / table you wish. + | */ 'failed' => [ diff --git a/config/sanctum.php b/config/sanctum.php deleted file mode 100644 index 3c92b7a..0000000 --- a/config/sanctum.php +++ /dev/null @@ -1,51 +0,0 @@ - explode(',', env('SANCTUM_STATEFUL_DOMAINS', sprintf( - '%s%s', - 'localhost,localhost:3000,127.0.0.1,127.0.0.1:8000,::1', - env('APP_URL') ? ',' . parse_url(env('APP_URL'), PHP_URL_HOST) : '' - ))), - - /* - |-------------------------------------------------------------------------- - | Expiration Minutes - |-------------------------------------------------------------------------- - | - | This value controls the number of minutes until an issued token will be - | considered expired. If this value is null, personal access tokens do - | not expire. This won't tweak the lifetime of first-party sessions. - | - */ - - 'expiration' => null, - - /* - |-------------------------------------------------------------------------- - | Sanctum Middleware - |-------------------------------------------------------------------------- - | - | When authenticating your first-party SPA with Sanctum you may need to - | customize some of the middleware Sanctum uses while processing the - | request. You may change the middleware listed below as required. - | - */ - - 'middleware' => [ - 'verify_csrf_token' => App\Http\Middleware\VerifyCsrfToken::class, - 'encrypt_cookies' => App\Http\Middleware\EncryptCookies::class, - ], - -]; diff --git a/config/services.php b/config/services.php index 2a1d616..915dfe7 100644 --- a/config/services.php +++ b/config/services.php @@ -3,15 +3,15 @@ return [ /* - |-------------------------------------------------------------------------- - | Third Party Services - |-------------------------------------------------------------------------- - | - | This file is for storing the credentials for third party services such - | as Mailgun, Postmark, AWS and more. This file provides the de facto - | location for this type of information, allowing packages to have - | a conventional file to locate the various service credentials. - | + |-------------------------------------------------------------------------- + | Third Party Services + |-------------------------------------------------------------------------- + | + | This file is for storing the credentials for third party services such + | as Mailgun, Postmark, AWS and more. This file provides the de facto + | location for this type of information, allowing packages to have + | a conventional file to locate the various service credentials. + | */ 'mailgun' => [ diff --git a/config/session.php b/config/session.php index c487a7e..b096861 100644 --- a/config/session.php +++ b/config/session.php @@ -5,30 +5,30 @@ use Illuminate\Support\Str; return [ /* - |-------------------------------------------------------------------------- - | Default Session Driver - |-------------------------------------------------------------------------- - | - | This option controls the default session "driver" that will be used on - | requests. By default, we will use the lightweight native driver but - | you may specify any of the other wonderful drivers provided here. - | - | Supported: "file", "cookie", "database", "apc", - | "memcached", "redis", "dynamodb", "array" - | + |-------------------------------------------------------------------------- + | Default Session Driver + |-------------------------------------------------------------------------- + | + | This option controls the default session "driver" that will be used on + | requests. By default, we will use the lightweight native driver but + | you may specify any of the other wonderful drivers provided here. + | + | Supported: "file", "cookie", "database", "apc", + | "memcached", "redis", "dynamodb", "array" + | */ 'driver' => env('SESSION_DRIVER', 'file'), /* - |-------------------------------------------------------------------------- - | Session Lifetime - |-------------------------------------------------------------------------- - | - | Here you may specify the number of minutes that you wish the session - | to be allowed to remain idle before it expires. If you want them - | to immediately expire on the browser closing, set that option. - | + |-------------------------------------------------------------------------- + | Session Lifetime + |-------------------------------------------------------------------------- + | + | Here you may specify the number of minutes that you wish the session + | to be allowed to remain idle before it expires. If you want them + | to immediately expire on the browser closing, set that option. + | */ 'lifetime' => env('SESSION_LIFETIME', 120), @@ -36,94 +36,94 @@ return [ 'expire_on_close' => false, /* - |-------------------------------------------------------------------------- - | Session Encryption - |-------------------------------------------------------------------------- - | - | This option allows you to easily specify that all of your session data - | should be encrypted before it is stored. All encryption will be run - | automatically by Laravel and you can use the Session like normal. - | + |-------------------------------------------------------------------------- + | Session Encryption + |-------------------------------------------------------------------------- + | + | This option allows you to easily specify that all of your session data + | should be encrypted before it is stored. All encryption will be run + | automatically by Laravel and you can use the Session like normal. + | */ 'encrypt' => false, /* - |-------------------------------------------------------------------------- - | Session File Location - |-------------------------------------------------------------------------- - | - | When using the native session driver, we need a location where session - | files may be stored. A default has been set for you but a different - | location may be specified. This is only needed for file sessions. - | + |-------------------------------------------------------------------------- + | Session File Location + |-------------------------------------------------------------------------- + | + | When using the native session driver, we need a location where session + | files may be stored. A default has been set for you but a different + | location may be specified. This is only needed for file sessions. + | */ 'files' => storage_path('framework/sessions'), /* - |-------------------------------------------------------------------------- - | Session Database Connection - |-------------------------------------------------------------------------- - | - | When using the "database" or "redis" session drivers, you may specify a - | connection that should be used to manage these sessions. This should - | correspond to a connection in your database configuration options. - | + |-------------------------------------------------------------------------- + | Session Database Connection + |-------------------------------------------------------------------------- + | + | When using the "database" or "redis" session drivers, you may specify a + | connection that should be used to manage these sessions. This should + | correspond to a connection in your database configuration options. + | */ 'connection' => env('SESSION_CONNECTION', null), /* - |-------------------------------------------------------------------------- - | Session Database Table - |-------------------------------------------------------------------------- - | - | When using the "database" session driver, you may specify the table we - | should use to manage the sessions. Of course, a sensible default is - | provided for you; however, you are free to change this as needed. - | + |-------------------------------------------------------------------------- + | Session Database Table + |-------------------------------------------------------------------------- + | + | When using the "database" session driver, you may specify the table we + | should use to manage the sessions. Of course, a sensible default is + | provided for you; however, you are free to change this as needed. + | */ 'table' => 'sessions', /* - |-------------------------------------------------------------------------- - | Session Cache Store - |-------------------------------------------------------------------------- - | - | While using one of the framework's cache driven session backends you may - | list a cache store that should be used for these sessions. This value - | must match with one of the application's configured cache "stores". - | - | Affects: "apc", "dynamodb", "memcached", "redis" - | + |-------------------------------------------------------------------------- + | Session Cache Store + |-------------------------------------------------------------------------- + | + | While using one of the framework's cache driven session backends you may + | list a cache store that should be used for these sessions. This value + | must match with one of the application's configured cache "stores". + | + | Affects: "apc", "dynamodb", "memcached", "redis" + | */ 'store' => env('SESSION_STORE', null), /* - |-------------------------------------------------------------------------- - | Session Sweeping Lottery - |-------------------------------------------------------------------------- - | - | Some session drivers must manually sweep their storage location to get - | rid of old sessions from storage. Here are the chances that it will - | happen on a given request. By default, the odds are 2 out of 100. - | + |-------------------------------------------------------------------------- + | Session Sweeping Lottery + |-------------------------------------------------------------------------- + | + | Some session drivers must manually sweep their storage location to get + | rid of old sessions from storage. Here are the chances that it will + | happen on a given request. By default, the odds are 2 out of 100. + | */ 'lottery' => [2, 100], /* - |-------------------------------------------------------------------------- - | Session Cookie Name - |-------------------------------------------------------------------------- - | - | Here you may change the name of the cookie used to identify a session - | instance by ID. The name specified here will get used every time a - | new session cookie is created by the framework for every driver. - | + |-------------------------------------------------------------------------- + | Session Cookie Name + |-------------------------------------------------------------------------- + | + | Here you may change the name of the cookie used to identify a session + | instance by ID. The name specified here will get used every time a + | new session cookie is created by the framework for every driver. + | */ 'cookie' => env( @@ -132,68 +132,68 @@ return [ ), /* - |-------------------------------------------------------------------------- - | Session Cookie Path - |-------------------------------------------------------------------------- - | - | The session cookie path determines the path for which the cookie will - | be regarded as available. Typically, this will be the root path of - | your application but you are free to change this when necessary. - | + |-------------------------------------------------------------------------- + | Session Cookie Path + |-------------------------------------------------------------------------- + | + | The session cookie path determines the path for which the cookie will + | be regarded as available. Typically, this will be the root path of + | your application but you are free to change this when necessary. + | */ 'path' => '/', /* - |-------------------------------------------------------------------------- - | Session Cookie Domain - |-------------------------------------------------------------------------- - | - | Here you may change the domain of the cookie used to identify a session - | in your application. This will determine which domains the cookie is - | available to in your application. A sensible default has been set. - | + |-------------------------------------------------------------------------- + | Session Cookie Domain + |-------------------------------------------------------------------------- + | + | Here you may change the domain of the cookie used to identify a session + | in your application. This will determine which domains the cookie is + | available to in your application. A sensible default has been set. + | */ 'domain' => env('SESSION_DOMAIN', null), /* - |-------------------------------------------------------------------------- - | HTTPS Only Cookies - |-------------------------------------------------------------------------- - | - | By setting this option to true, session cookies will only be sent back - | to the server if the browser has a HTTPS connection. This will keep - | the cookie from being sent to you when it can't be done securely. - | + |-------------------------------------------------------------------------- + | HTTPS Only Cookies + |-------------------------------------------------------------------------- + | + | By setting this option to true, session cookies will only be sent back + | to the server if the browser has a HTTPS connection. This will keep + | the cookie from being sent to you when it can't be done securely. + | */ 'secure' => env('SESSION_SECURE_COOKIE'), /* - |-------------------------------------------------------------------------- - | HTTP Access Only - |-------------------------------------------------------------------------- - | - | Setting this value to true will prevent JavaScript from accessing the - | value of the cookie and the cookie will only be accessible through - | the HTTP protocol. You are free to modify this option if needed. - | + |-------------------------------------------------------------------------- + | HTTP Access Only + |-------------------------------------------------------------------------- + | + | Setting this value to true will prevent JavaScript from accessing the + | value of the cookie and the cookie will only be accessible through + | the HTTP protocol. You are free to modify this option if needed. + | */ 'http_only' => true, /* - |-------------------------------------------------------------------------- - | Same-Site Cookies - |-------------------------------------------------------------------------- - | - | This option determines how your cookies behave when cross-site requests - | take place, and can be used to mitigate CSRF attacks. By default, we - | will set this value to "lax" since this is a secure default value. - | - | Supported: "lax", "strict", "none", null - | + |-------------------------------------------------------------------------- + | Same-Site Cookies + |-------------------------------------------------------------------------- + | + | This option determines how your cookies behave when cross-site requests + | take place, and can be used to mitigate CSRF attacks. By default, we + | will set this value to "lax" since this is a secure default value. + | + | Supported: "lax", "strict", "none", null + | */ 'same_site' => 'lax', diff --git a/config/translation.php b/config/translation.php index 45b49a7..b2a2b29 100644 --- a/config/translation.php +++ b/config/translation.php @@ -2,25 +2,25 @@ return [ /* - |-------------------------------------------------------------------------- - | Package driver - |-------------------------------------------------------------------------- - | - | The package supports different drivers for translation management. - | - | Supported: "file", "database" - | + |-------------------------------------------------------------------------- + | Package driver + |-------------------------------------------------------------------------- + | + | The package supports different drivers for translation management. + | + | Supported: "file", "database" + | */ 'driver' => 'database', /* - |-------------------------------------------------------------------------- - | Route group configuration - |-------------------------------------------------------------------------- - | - | The package ships with routes to handle language management. Update the - | configuration here to configure the routes with your preferred group options. - | + |-------------------------------------------------------------------------- + | Route group configuration + |-------------------------------------------------------------------------- + | + | The package ships with routes to handle language management. Update the + | configuration here to configure the routes with your preferred group options. + | */ 'route_group_config' => [ 'middleware' => [ @@ -30,24 +30,24 @@ return [ ], /* - |-------------------------------------------------------------------------- - | Translation methods - |-------------------------------------------------------------------------- - | - | Update this array to tell the package which methods it should look for - | when finding missing translations. - | + |-------------------------------------------------------------------------- + | Translation methods + |-------------------------------------------------------------------------- + | + | Update this array to tell the package which methods it should look for + | when finding missing translations. + | */ 'translation_methods' => ['trans', '__'], /* - |-------------------------------------------------------------------------- - | Scan paths - |-------------------------------------------------------------------------- - | - | Update this array to tell the package which directories to scan when - | looking for missing translations. - | + |-------------------------------------------------------------------------- + | Scan paths + |-------------------------------------------------------------------------- + | + | Update this array to tell the package which directories to scan when + | looking for missing translations. + | */ 'scan_paths' => [ resource_path() . '/views/front', @@ -55,22 +55,22 @@ return [ ], /* - |-------------------------------------------------------------------------- - | UI URL - |-------------------------------------------------------------------------- - | - | Define the URL used to access the language management too. - | + |-------------------------------------------------------------------------- + | UI URL + |-------------------------------------------------------------------------- + | + | Define the URL used to access the language management too. + | */ 'ui_url' => 'bo/languages', /* - |-------------------------------------------------------------------------- - | Database settings - |-------------------------------------------------------------------------- - | - | Define the settings for the database driver here. - | + |-------------------------------------------------------------------------- + | Database settings + |-------------------------------------------------------------------------- + | + | Define the settings for the database driver here. + | */ 'database' => [ diff --git a/config/view.php b/config/view.php index 22b8a18..53008fd 100644 --- a/config/view.php +++ b/config/view.php @@ -3,14 +3,14 @@ return [ /* - |-------------------------------------------------------------------------- - | View Storage Paths - |-------------------------------------------------------------------------- - | - | Most templating systems load templates from disk. Here you may specify - | an array of paths that should be checked for your views. Of course - | the usual Laravel view path has already been registered for you. - | + |-------------------------------------------------------------------------- + | View Storage Paths + |-------------------------------------------------------------------------- + | + | Most templating systems load templates from disk. Here you may specify + | an array of paths that should be checked for your views. Of course + | the usual Laravel view path has already been registered for you. + | */ 'paths' => [ @@ -18,14 +18,14 @@ return [ ], /* - |-------------------------------------------------------------------------- - | Compiled View Path - |-------------------------------------------------------------------------- - | - | This option determines where all the compiled Blade templates will be - | stored for your application. Typically, this is within the storage - | directory. However, as usual, you are free to change this value. - | + |-------------------------------------------------------------------------- + | Compiled View Path + |-------------------------------------------------------------------------- + | + | This option determines where all the compiled Blade templates will be + | stored for your application. Typically, this is within the storage + | directory. However, as usual, you are free to change this value. + | */ 'compiled' => env( diff --git a/database/factories/AdviceFactory.php b/database/factories/AdviceFactory.php index 15a393f..337c91f 100644 --- a/database/factories/AdviceFactory.php +++ b/database/factories/AdviceFactory.php @@ -24,8 +24,8 @@ class AdviceFactory extends Factory public function definition() { - $upload = new SplFileInfo(resource_path('assets/images/repas.jpg')); - $advice = new Advice(); + $upload = new SplFileInfo(resource_path('assets/images/repas.jpg')); + $advice = new Advice(); $imgpath = Utils::storeImage($upload, $advice->getTable()); return [ diff --git a/database/factories/EncartFactory.php b/database/factories/EncartFactory.php index b1dfc2f..1f72e5d 100644 --- a/database/factories/EncartFactory.php +++ b/database/factories/EncartFactory.php @@ -24,8 +24,8 @@ class EncartFactory extends Factory public function definition() { - $upload = new SplFileInfo(resource_path('assets/images/prez-img.jpg')); - $encart = new Encart(); + $upload = new SplFileInfo(resource_path('assets/images/prez-img.jpg')); + $encart = new Encart(); $imgpath = Utils::storeImage($upload, $encart->getTable()); return [ diff --git a/database/factories/GammeFactory.php b/database/factories/GammeFactory.php index 2b9d439..99cbfea 100644 --- a/database/factories/GammeFactory.php +++ b/database/factories/GammeFactory.php @@ -19,10 +19,10 @@ class GammeFactory extends Factory { $title = $this->faker->text(10) . rand(1, 100); - $upload = new SplFileInfo(resource_path('assets/images/cookrange.jpg')); - $picture = new Gamme(); - $imgpath = Utils::storeImage($upload, $picture->getTable()); - $upload = new SplFileInfo(resource_path('assets/images/entete_sous_gammes.jpg')); + $upload = new SplFileInfo(resource_path('assets/images/cookrange.jpg')); + $picture = new Gamme(); + $imgpath = Utils::storeImage($upload, $picture->getTable()); + $upload = new SplFileInfo(resource_path('assets/images/entete_sous_gammes.jpg')); $bannerpath = Utils::storeImage($upload, $picture->getTable()); return [ diff --git a/database/factories/PictoBrandFactory.php b/database/factories/PictoBrandFactory.php index d0b380a..e3da8b9 100644 --- a/database/factories/PictoBrandFactory.php +++ b/database/factories/PictoBrandFactory.php @@ -24,8 +24,8 @@ class PictoBrandFactory extends Factory public function definition() { - $upload = new SplFileInfo(resource_path('assets/images/site-production.jpg')); - $encart = new PictoBrand(); + $upload = new SplFileInfo(resource_path('assets/images/site-production.jpg')); + $encart = new PictoBrand(); $imgpath = Utils::storeImage($upload, $encart->getTable()); return [ diff --git a/database/factories/PictoFactory.php b/database/factories/PictoFactory.php index b6c7604..beab43e 100644 --- a/database/factories/PictoFactory.php +++ b/database/factories/PictoFactory.php @@ -23,8 +23,8 @@ class PictoFactory extends Factory */ public function definition() { - $upload = new SplFileInfo(resource_path('assets/images/qualite.png')); - $picto = new Picto(); + $upload = new SplFileInfo(resource_path('assets/images/qualite.png')); + $picto = new Picto(); $imgpath = Utils::storeImage($upload, $picto->getTable()); return [ diff --git a/database/factories/PostFactory.php b/database/factories/PostFactory.php index 498773d..4988df1 100644 --- a/database/factories/PostFactory.php +++ b/database/factories/PostFactory.php @@ -18,10 +18,10 @@ class PostFactory extends Factory public function definition() { - $upload = new SplFileInfo(resource_path('assets/images/burger-fond.jpg')); - $picture = new Post(); + $upload = new SplFileInfo(resource_path('assets/images/burger-fond.jpg')); + $picture = new Post(); $imghomepath = Utils::storeImage($upload, $picture->getTable()); - $upload = new SplFileInfo(resource_path('assets/images/burger.jpg')); + $upload = new SplFileInfo(resource_path('assets/images/burger.jpg')); $imgnewspath = Utils::storeImage($upload, $picture->getTable()); return [ diff --git a/database/factories/ProductFactory.php b/database/factories/ProductFactory.php index ae4fecf..a8ce44d 100644 --- a/database/factories/ProductFactory.php +++ b/database/factories/ProductFactory.php @@ -17,8 +17,8 @@ class ProductFactory extends Factory */ public function definition() { - $name = $this->faker->text(10) . rand(1, 100); - $tabFour = array( + $name = $this->faker->text(10) . rand(1, 100); + $tabFour = array( 'id' => 0, 'name' => 'Four', 'url' => '/assets/images/four.png', @@ -26,7 +26,7 @@ class ProductFactory extends Factory 'temp' => '200°C', 'status' => true ); - $tabFriteuse = array( + $tabFriteuse = array( 'id' => 1, 'name' => 'Friteuse', 'url' => '/assets/images/friteuse.png', @@ -34,7 +34,7 @@ class ProductFactory extends Factory 'temp' => '100°C', 'status' => true ); - $tabPoele = array( + $tabPoele = array( 'id' => 2, 'name' => 'Poêle', 'url' => '/assets/images/poele.png', @@ -42,7 +42,7 @@ class ProductFactory extends Factory 'temp' => '100°C', 'status' => false ); - $tabCocotte = array( + $tabCocotte = array( 'id' => 3, 'name' => 'Cocotte', 'url' => '/assets/images/cocotte.png', @@ -50,7 +50,7 @@ class ProductFactory extends Factory 'temp' => '80°C', 'status' => true ); - $tabPlancha = array( + $tabPlancha = array( 'id' => 4, 'name' => 'Plancha', 'url' => '/assets/images/plancha.png', @@ -58,7 +58,7 @@ class ProductFactory extends Factory 'temp' => '130°C', 'status' => false ); - $tabBainMarie = array( + $tabBainMarie = array( 'id' => 5, 'name' => 'Bain Marie', 'url' => '/assets/images/bainmarie.png', @@ -66,7 +66,7 @@ class ProductFactory extends Factory 'temp' => '80°C', 'status' => false ); - $tabBarbecue = array( + $tabBarbecue = array( 'id' => 6, 'name' => 'Barbecue', 'url' => '/assets/images/barbecue.png', @@ -74,7 +74,7 @@ class ProductFactory extends Factory 'temp' => '200°C', 'status' => false ); - $tabMicroOndes = array( + $tabMicroOndes = array( 'id' => 7, 'name' => 'Micro Ondes', 'url' => '/assets/images/microondes.png', @@ -82,7 +82,7 @@ class ProductFactory extends Factory 'temp' => '900 Watts', 'status' => false ); - $tabCasserole = array( + $tabCasserole = array( 'id' => 8, 'name' => 'Casserole', 'url' => '/assets/images/casserole.png', @@ -106,7 +106,7 @@ class ProductFactory extends Factory 'url' => '/assets/images/sans-label.jpg', ); - $upload = new SplFileInfo(resource_path('assets/images/product_sample_01.png')); + $upload = new SplFileInfo(resource_path('assets/images/product_sample_01.png')); $picture = new Product(); $imgpath = Utils::storeImage($upload, $picture->getTable()); diff --git a/database/factories/SlideFactory.php b/database/factories/SlideFactory.php index 60e095b..f0fea4e 100644 --- a/database/factories/SlideFactory.php +++ b/database/factories/SlideFactory.php @@ -25,8 +25,8 @@ class SlideFactory extends Factory public function definition() { - $upload = new SplFileInfo(resource_path('assets/images/image-sample.jpg')); - $slide = new Slide(); + $upload = new SplFileInfo(resource_path('assets/images/image-sample.jpg')); + $slide = new Slide(); $imgpath = Utils::storeImage($upload, $slide->getTable()); return [ diff --git a/database/factories/UserFactory.php b/database/factories/UserFactory.php index 1a70635..8a63f40 100644 --- a/database/factories/UserFactory.php +++ b/database/factories/UserFactory.php @@ -26,7 +26,8 @@ class UserFactory extends Factory 'name' => $this->faker->name(), 'email' => $this->faker->unique()->safeEmail(), 'email_verified_at' => now(), - 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // password + 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', +// password 'remember_token' => Str::random(10), ]; } diff --git a/database/migrations/2019_12_14_000001_create_personal_access_tokens_table.php b/database/migrations/2019_12_14_000001_create_personal_access_tokens_table.php deleted file mode 100644 index 4315e16..0000000 --- a/database/migrations/2019_12_14_000001_create_personal_access_tokens_table.php +++ /dev/null @@ -1,36 +0,0 @@ -id(); - $table->morphs('tokenable'); - $table->string('name'); - $table->string('token', 64)->unique(); - $table->text('abilities')->nullable(); - $table->timestamp('last_used_at')->nullable(); - $table->timestamps(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::dropIfExists('personal_access_tokens'); - } -} diff --git a/phpcs.xml b/phpcs.xml index bd7759f..9127c93 100644 --- a/phpcs.xml +++ b/phpcs.xml @@ -1,94 +1,128 @@ - + + Created with the PHP Coding Standard Generator. http://edorian.github.com/php-coding-standard-generator/ app/ config/ database/factories - database/seeders routes/ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - Created with the PHP Coding Standard Generator. http://edorian.github.com/php-coding-standard-generator/ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - + + + + + + + + + + + - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */database/migrations/* + diff --git a/phpunit.xml b/phpunit.xml deleted file mode 100644 index 4ae4d97..0000000 --- a/phpunit.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - - - ./tests/Unit - - - ./tests/Feature - - - - - ./app - - - - - - - - - - - - - - diff --git a/routes/api.php b/routes/api.php deleted file mode 100644 index 51535fb..0000000 --- a/routes/api.php +++ /dev/null @@ -1,12 +0,0 @@ -id === (int)$id; -}); diff --git a/routes/console.php b/routes/console.php index e05f4c9..e216465 100644 --- a/routes/console.php +++ b/routes/console.php @@ -4,14 +4,14 @@ use Illuminate\Foundation\Inspiring; use Illuminate\Support\Facades\Artisan; /* -|-------------------------------------------------------------------------- -| Console Routes -|-------------------------------------------------------------------------- -| -| This file is where you may define all of your Closure based console -| commands. Each Closure is bound to a command instance allowing a -| simple approach to interacting with each command's IO methods. -| + |-------------------------------------------------------------------------- + | Console Routes + |-------------------------------------------------------------------------- + | + | This file is where you may define all of your Closure based console + | commands. Each Closure is bound to a command instance allowing a + | simple approach to interacting with each command's IO methods. + | */ Artisan::command('inspire', function () { diff --git a/routes/web.php b/routes/web.php index 6bf839e..fefef40 100644 --- a/routes/web.php +++ b/routes/web.php @@ -40,14 +40,14 @@ use Illuminate\Support\Facades\Lang; use Illuminate\Support\Str; /* -|-------------------------------------------------------------------------- -| Web Routes -|-------------------------------------------------------------------------- -| -| Here is where you can register web routes for your application. These -| routes are loaded by the RouteServiceProvider within a group which -| contains the "web" middleware group. Now create something great! -| + |-------------------------------------------------------------------------- + | Web Routes + |-------------------------------------------------------------------------- + | + | Here is where you can register web routes for your application. These + | routes are loaded by the RouteServiceProvider within a group which + | contains the "web" middleware group. Now create something great! + | */ Route::prefix('bo') @@ -60,9 +60,12 @@ Route::prefix('bo') 'login' => true, 'logout' => true, 'register' => false, - 'reset' => false, // for resetting passwords - 'confirm' => false, // for additional password confirmations - 'verify' => false, // for email verification + 'reset' => false, + // for resetting passwords + 'confirm' => false, + // for additional password confirmations + 'verify' => false, + // for email verification ] ); Route::middleware(['auth:web', 'back-end-globals', 'lang-check']) @@ -133,10 +136,10 @@ foreach ($langs as $lang) { Route::get('/' . Str::slug(Lang::get('urls.legals', [], $lang)), [ControllersLegalsController::class, 'index'])->name('cgu'); Route::get('/' . Str::slug(Lang::get('urls.policy', [], $lang)), [ControllersPolicyController::class, 'index'])->name('policy'); Route::get('/' . Str::slug(Lang::get('urls.search', [], $lang)), [ControllersProductsController::class, 'search'])->name('search'); - //Classic + // Classic Route::get('/' . Str::slug(Lang::get('urls.contact', [], $lang)), [ControllersContactController::class, 'contact'])->name('contact'); Route::post('/contact', [ControllersContactController::class, 'contactSubmit'])->name('contact.submit'); // phpcs:enable } ); -} +}//end foreach