From cd9c94df9c994b0de6c6ebb6bd6a26d4a14822d1 Mon Sep 17 00:00:00 2001 From: Olivier Legat Date: Wed, 27 Jul 2022 13:16:09 +0200 Subject: [PATCH 01/11] switch to db storage for translations --- README.md | 24 +++++++++++++++++++++++- config/translation.php | 2 +- 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 13fdd87..18e9de3 100644 --- a/README.md +++ b/README.md @@ -23,4 +23,26 @@ npm run prod Put every min in PROD : ``` php artisan schedule:run -``` \ No newline at end of file +``` + +## 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/config/translation.php b/config/translation.php index ba0ac12..ad5dd37 100644 --- a/config/translation.php +++ b/config/translation.php @@ -11,7 +11,7 @@ return [ | Supported: "file", "database" | */ - 'driver' => 'file', + 'driver' => 'database', /* |-------------------------------------------------------------------------- From 7ffae283c06ec712df4339c988d34cb10fe164dd Mon Sep 17 00:00:00 2001 From: Olivier Legat Date: Wed, 27 Jul 2022 14:29:58 +0200 Subject: [PATCH 02/11] maj gitlab ci --- .gitlab-ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1bd5031..9452827 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -29,6 +29,7 @@ npm-security: phpcs: stage: CodingStandards before_script: + - composer config gitlab-token.gitlab.com $CI_DEPLOY_USER $CI_DEPLOY_PASSWORD - composer install cache: paths: @@ -42,4 +43,4 @@ phpcs: - phpcs-report.xml reports: junit: phpcs-report.xml - allow_failure: false \ No newline at end of file + allow_failure: false From e48a25751350cec8e1b55493f2ce4ff51c105337 Mon Sep 17 00:00:00 2001 From: Olivier Legat Date: Wed, 27 Jul 2022 14:33:56 +0200 Subject: [PATCH 03/11] passage phpcbf --- app/Exceptions/Handler.php | 4 +- app/Http/Controllers/Auth/LoginController.php | 4 +- app/Http/Controllers/Bo/AdviceController.php | 6 +- app/Http/Controllers/Bo/EncartsController.php | 2 +- app/Http/Controllers/Bo/MomentsController.php | 1 - .../Controllers/Bo/PictoBrandsController.php | 4 +- app/Http/Controllers/Bo/PostsController.php | 8 +- app/Http/Controllers/Bo/SlidesController.php | 4 +- .../Controllers/FoodServiceController.php | 11 +- app/Http/Controllers/GammesController.php | 4 +- app/Http/Controllers/HomeController.php | 2 +- app/Http/Controllers/LegalsController.php | 2 +- app/Http/Controllers/MarqueController.php | 17 ++- app/Http/Controllers/NewsController.php | 4 +- app/Http/Controllers/ProductsController.php | 3 +- app/Http/Middleware/Authenticate.php | 6 +- app/Http/Middleware/FrontEndGlobals.php | 23 ++-- app/Lib/Utils.php | 1 + app/Models/Advice.php | 12 +- app/Models/Encart.php | 4 +- app/Models/Picto.php | 4 +- app/Models/PictoBrand.php | 4 +- app/Models/Post.php | 8 +- app/Models/Slide.php | 4 +- app/Providers/AuthServiceProvider.php | 1 - app/Providers/EventServiceProvider.php | 1 - app/Providers/RouteServiceProvider.php | 9 +- app/Traits/CastsEnumsHasTranslations.php | 14 +- config/app.php | 2 +- config/cache.php | 2 +- config/database.php | 2 +- config/filesystems.php | 2 +- config/sanctum.php | 2 +- config/session.php | 2 +- config/translation.php | 4 +- routes/api.php | 3 - routes/channels.php | 2 +- routes/web.php | 128 +++++++++--------- 38 files changed, 162 insertions(+), 154 deletions(-) diff --git a/app/Exceptions/Handler.php b/app/Exceptions/Handler.php index f34f3c8..1d545c0 100644 --- a/app/Exceptions/Handler.php +++ b/app/Exceptions/Handler.php @@ -2,7 +2,7 @@ /** * Undocumented class - * + * * @category Description * @package Category * @author Name @@ -17,7 +17,7 @@ use Kwaadpepper\ExceptionHandler\Exceptions\ExceptionHandler; /** * Undocumented class - * + * * @category Description * @package Category * @author Name diff --git a/app/Http/Controllers/Auth/LoginController.php b/app/Http/Controllers/Auth/LoginController.php index 6b023f8..96ef86d 100644 --- a/app/Http/Controllers/Auth/LoginController.php +++ b/app/Http/Controllers/Auth/LoginController.php @@ -2,7 +2,7 @@ /** * Controller pour le login - * + * * @category Description * @package Category * @author Name @@ -19,7 +19,7 @@ use Illuminate\Foundation\Auth\AuthenticatesUsers; /** * Undocumented class - * + * * @category Description * @package Category * @author Name diff --git a/app/Http/Controllers/Bo/AdviceController.php b/app/Http/Controllers/Bo/AdviceController.php index 0d66ac4..4a1aa38 100644 --- a/app/Http/Controllers/Bo/AdviceController.php +++ b/app/Http/Controllers/Bo/AdviceController.php @@ -31,13 +31,13 @@ class AdviceController extends Controller public function update(Advice $advice, UpdateAdviceRequest $request) { $advice->fill($request->validated()); - if (is_a($request->picture1,"SplFileInfo")) { + if (is_a($request->picture1, "SplFileInfo")) { $advice->picture1 = Utils::storeImage($request->picture1, $advice->getTable()); } - if (is_a($request->picture2,"SplFileInfo")) { + if (is_a($request->picture2, "SplFileInfo")) { $advice->picture2 = Utils::storeImage($request->picture2, $advice->getTable()); } - if (is_a($request->picture3,"SplFileInfo")) { + if (is_a($request->picture3, "SplFileInfo")) { $advice->picture3 = Utils::storeImage($request->picture3, $advice->getTable()); } diff --git a/app/Http/Controllers/Bo/EncartsController.php b/app/Http/Controllers/Bo/EncartsController.php index 6cc4f17..faad408 100644 --- a/app/Http/Controllers/Bo/EncartsController.php +++ b/app/Http/Controllers/Bo/EncartsController.php @@ -30,7 +30,7 @@ class EncartsController extends Controller public function update(Encart $encart, UpdateEncartRequest $request) { $encart->fill($request->validated()); - if (is_a($request->picture,"SplFileInfo")) { + if (is_a($request->picture, "SplFileInfo")) { $encart->picture = Utils::storeImage($request->picture, $encart->getTable()); } diff --git a/app/Http/Controllers/Bo/MomentsController.php b/app/Http/Controllers/Bo/MomentsController.php index ffb66e9..d4ab9a2 100644 --- a/app/Http/Controllers/Bo/MomentsController.php +++ b/app/Http/Controllers/Bo/MomentsController.php @@ -9,7 +9,6 @@ use App\Models\Moment; class MomentsController extends Controller { - /** * Display a listing of the resource. * diff --git a/app/Http/Controllers/Bo/PictoBrandsController.php b/app/Http/Controllers/Bo/PictoBrandsController.php index f5aedf2..0da0131 100644 --- a/app/Http/Controllers/Bo/PictoBrandsController.php +++ b/app/Http/Controllers/Bo/PictoBrandsController.php @@ -43,7 +43,7 @@ class PictoBrandsController extends Controller public function store(StorePictoBrandRequest $request) { $pictobrand = new PictoBrand($request->validated()); - if (is_a($request->picture,"SplFileInfo")) { + if (is_a($request->picture, "SplFileInfo")) { $pictobrand->picture = Utils::storeImage($request->picture, $pictobrand->getTable()); } @@ -75,7 +75,7 @@ class PictoBrandsController extends Controller public function update(PictoBrand $pictobrand, UpdatePictoBrandRequest $request) { $pictobrand->fill($request->validated()); - if (is_a($request->picture,"SplFileInfo")) { + if (is_a($request->picture, "SplFileInfo")) { $pictobrand->picture = Utils::storeImage($request->picture, $pictobrand->getTable()); } diff --git a/app/Http/Controllers/Bo/PostsController.php b/app/Http/Controllers/Bo/PostsController.php index a9af0b0..c62a6df 100644 --- a/app/Http/Controllers/Bo/PostsController.php +++ b/app/Http/Controllers/Bo/PostsController.php @@ -43,10 +43,10 @@ class PostsController extends Controller public function store(StorePostRequest $request) { $post = new Post($request->validated()); - if (is_a($request->picture_home,"SplFileInfo")) { + if (is_a($request->picture_home, "SplFileInfo")) { $post->picture_home = Utils::storeImage($request->picture_home, $post->getTable()); } - if (is_a($request->picture_news,"SplFileInfo")) { + if (is_a($request->picture_news, "SplFileInfo")) { $post->picture_news = Utils::storeImage($request->picture_news, $post->getTable()); } $response = $this->changeUniquePostOnTop($post->on_top); @@ -82,10 +82,10 @@ class PostsController extends Controller public function update(Post $post, UpdatePostRequest $request) { $post->fill($request->validated()); - if (is_a($request->picture_home,"SplFileInfo")) { + if (is_a($request->picture_home, "SplFileInfo")) { $post->picture_home = Utils::storeImage($request->picture_home, $post->getTable()); } - if (is_a($request->picture_news,"SplFileInfo")) { + if (is_a($request->picture_news, "SplFileInfo")) { $post->picture_news = Utils::storeImage($request->picture_news, $post->getTable()); } $response = $this->changeUniquePostOnTop($post->on_top); diff --git a/app/Http/Controllers/Bo/SlidesController.php b/app/Http/Controllers/Bo/SlidesController.php index 08354a4..910ecdd 100644 --- a/app/Http/Controllers/Bo/SlidesController.php +++ b/app/Http/Controllers/Bo/SlidesController.php @@ -46,7 +46,7 @@ class SlidesController extends Controller $slide = new Slide($request->validated()); $slide->order = $this->getLastOrder(); - if (is_a($request->picture,"SplFileInfo")) { + if (is_a($request->picture, "SplFileInfo")) { $slide->picture = Utils::storeImage($request->picture, $slide->getTable()); } @@ -79,7 +79,7 @@ class SlidesController extends Controller public function update(StoreSlideRequest $request, Slide $slide) { $slide->fill($request->validated()); - if (is_a($request->picture,"SplFileInfo")) { + if (is_a($request->picture, "SplFileInfo")) { $slide->picture = Utils::storeImage($request->picture, $slide->getTable()); } diff --git a/app/Http/Controllers/FoodServiceController.php b/app/Http/Controllers/FoodServiceController.php index 3e69860..fb78bc4 100644 --- a/app/Http/Controllers/FoodServiceController.php +++ b/app/Http/Controllers/FoodServiceController.php @@ -14,14 +14,19 @@ class FoodServiceController extends Controller public function index() { $page = Page::foodservice(); - $seoDatum = SeoDatum::where('page',$page)->first(); + $seoDatum = SeoDatum::where('page', $page)->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(); - return view('front.food-service', compact('seoDatum' , 'encart_food', 'title_foodBloc2', - 'pictos_food', 'products_food')); + return view('front.food-service', compact( + 'seoDatum', + 'encart_food', + 'title_foodBloc2', + 'pictos_food', + 'products_food' + )); } } diff --git a/app/Http/Controllers/GammesController.php b/app/Http/Controllers/GammesController.php index ae6b750..976a0d9 100644 --- a/app/Http/Controllers/GammesController.php +++ b/app/Http/Controllers/GammesController.php @@ -14,11 +14,11 @@ class GammesController extends Controller $gammes = Gamme::whereNull('parent_gamme_id')->orderBy('title')->get(); //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(); - $seoDatum = SeoDatum::where('page',$page)->first(); + $seoDatum = SeoDatum::where('page', $page)->first(); return view('front.gammes.index', compact('gammes', 'nb_gammes', 'seoDatum')); } diff --git a/app/Http/Controllers/HomeController.php b/app/Http/Controllers/HomeController.php index e0e7dc8..e6d0410 100644 --- a/app/Http/Controllers/HomeController.php +++ b/app/Http/Controllers/HomeController.php @@ -17,7 +17,7 @@ class HomeController extends Controller { $page = Page::home(); - $seoDatum = SeoDatum::where('page',$page)->first(); + $seoDatum = SeoDatum::where('page', $page)->first(); $slider = Slider::where('published', 1)->first(); if ($slider) { diff --git a/app/Http/Controllers/LegalsController.php b/app/Http/Controllers/LegalsController.php index 346340b..46f6dbd 100644 --- a/app/Http/Controllers/LegalsController.php +++ b/app/Http/Controllers/LegalsController.php @@ -16,6 +16,6 @@ class LegalsController extends Controller $seoDatum = new SeoDatum(); $seoDatum->title = $mentions_legales->title; - return view('front.legals', compact('seoDatum' ,'mentions_legales')); + return view('front.legals', compact('seoDatum', 'mentions_legales')); } } diff --git a/app/Http/Controllers/MarqueController.php b/app/Http/Controllers/MarqueController.php index 7e41062..390bcdc 100644 --- a/app/Http/Controllers/MarqueController.php +++ b/app/Http/Controllers/MarqueController.php @@ -15,7 +15,7 @@ class MarqueController extends Controller public function index() { $page = Page::marque(); - $seoDatum = SeoDatum::where('page',$page)->first(); + $seoDatum = SeoDatum::where('page', $page)->first(); $encart_marqueHeader = Encart::where('page', Page::marqueHeader()->value)->first(); $encart_marqueBloc4l = Encart::where('page', Page::marqueBloc4l()->value)->first(); @@ -28,8 +28,17 @@ class MarqueController extends Controller $title_marqueBloc4 = Title::where('page', Page::marqueBloc4()->value)->first(); $moments = Moment::where('page', Page::marqueHistory()->value)->get(); - return view('front.a-propos', compact('seoDatum', 'encart_marqueHeader', 'encart_marqueBloc4l', - 'encart_marqueBloc4r', 'encart_marqueFooter', 'pictobrands_marque', 'title_marqueBloc2', - 'pictos_marqueBloc2', 'moments', 'title_marqueBloc4')); + return view('front.a-propos', compact( + 'seoDatum', + 'encart_marqueHeader', + 'encart_marqueBloc4l', + 'encart_marqueBloc4r', + 'encart_marqueFooter', + 'pictobrands_marque', + 'title_marqueBloc2', + 'pictos_marqueBloc2', + 'moments', + 'title_marqueBloc4' + )); } } diff --git a/app/Http/Controllers/NewsController.php b/app/Http/Controllers/NewsController.php index 53a534e..c861436 100644 --- a/app/Http/Controllers/NewsController.php +++ b/app/Http/Controllers/NewsController.php @@ -16,7 +16,7 @@ class NewsController extends Controller public function index() { $page = Page::news(); - $seoDatum = SeoDatum::where('page',$page)->first(); + $seoDatum = SeoDatum::where('page', $page)->first(); $advice_news = Advice::all()->first(); $texts_news = Text::where('page', Page::newsQuestions()->value)->get(); @@ -31,6 +31,6 @@ class NewsController extends Controller $products_news = Product::where('is_news', true)->get(); - return view('front.news', compact('seoDatum', 'advice_news' , 'texts_news', 'title_newsPosts', 'posts', 'products_news')); + return view('front.news', compact('seoDatum', 'advice_news', 'texts_news', 'title_newsPosts', 'posts', 'products_news')); } } diff --git a/app/Http/Controllers/ProductsController.php b/app/Http/Controllers/ProductsController.php index 2fc023a..168cdb1 100644 --- a/app/Http/Controllers/ProductsController.php +++ b/app/Http/Controllers/ProductsController.php @@ -19,7 +19,8 @@ class ProductsController extends Controller return view('front.product', compact('product', 'gamme', 'seoDatum')); } - public function search(Request $request) { + public function search(Request $request) + { $filter = $request->query('filter'); if (!empty($filter)) { diff --git a/app/Http/Middleware/Authenticate.php b/app/Http/Middleware/Authenticate.php index 9f0ec64..e7cc52d 100644 --- a/app/Http/Middleware/Authenticate.php +++ b/app/Http/Middleware/Authenticate.php @@ -2,7 +2,7 @@ /** * Middleware pour l'auth - * + * * @category Description * @package Category * @author Name @@ -17,7 +17,7 @@ use Illuminate\Auth\Middleware\Authenticate as Middleware; /** * Undocumented class - * + * * @category Description * @package Category * @author Name @@ -30,7 +30,7 @@ class Authenticate extends Middleware * Get the path the user should be redirected to when they are not authenticated. * * @param \Illuminate\Http\Request $request La requête - * + * * @return string|null */ protected function redirectTo($request) diff --git a/app/Http/Middleware/FrontEndGlobals.php b/app/Http/Middleware/FrontEndGlobals.php index f61f8bd..8e870d8 100644 --- a/app/Http/Middleware/FrontEndGlobals.php +++ b/app/Http/Middleware/FrontEndGlobals.php @@ -23,17 +23,17 @@ class FrontEndGlobals $routeParamsFR = Route::current()->parameters(); $routeParamsEN = $routeParamsFR; $routeParamsES = $routeParamsFR; - array_walk($routeParamsFR, array($this, 'unbind'),''); - array_walk($routeParamsEN, array($this, 'unbind'),'en'); - array_walk($routeParamsES, array($this, 'unbind'),'es'); - if (preg_match('/^(en|es)/', $currentRoute )) { - $currentRouteFR = preg_replace('/^(en|es)\./', '', $currentRoute,1); - $currentRouteEN = preg_replace('/^(en|es)/', 'en', $currentRoute,1); - $currentRouteES = preg_replace('/^(en|es)/', 'es', $currentRoute,1); + array_walk($routeParamsFR, array($this, 'unbind'), ''); + array_walk($routeParamsEN, array($this, 'unbind'), 'en'); + array_walk($routeParamsES, array($this, 'unbind'), 'es'); + if (preg_match('/^(en|es)/', $currentRoute)) { + $currentRouteFR = preg_replace('/^(en|es)\./', '', $currentRoute, 1); + $currentRouteEN = preg_replace('/^(en|es)/', 'en', $currentRoute, 1); + $currentRouteES = preg_replace('/^(en|es)/', 'es', $currentRoute, 1); } else { $currentRouteFR = $currentRoute; - $currentRouteEN = 'en.'.$currentRoute; - $currentRouteES = 'es.'.$currentRoute; + $currentRouteEN = 'en.' . $currentRoute; + $currentRouteES = 'es.' . $currentRoute; } View::share('currentRouteFR', $currentRouteFR); @@ -46,8 +46,9 @@ class FrontEndGlobals return $next($request); } - public function unbind(&$item,$k,$lang) { - if($k=='gammeSlug' || $k=='productSlug') { + public function unbind(&$item, $k, $lang) + { + if ($k == 'gammeSlug' || $k == 'productSlug') { $item = $item->getTranslation('slug', $lang); } } diff --git a/app/Lib/Utils.php b/app/Lib/Utils.php index bd71817..1d539ce 100644 --- a/app/Lib/Utils.php +++ b/app/Lib/Utils.php @@ -7,6 +7,7 @@ use Illuminate\Http\UploadedFile; use Illuminate\Support\Facades\File; use Illuminate\Support\Str; use SplFileInfo; + /** * Some utilities methods * diff --git a/app/Models/Advice.php b/app/Models/Advice.php index 82b6b24..5a0a00a 100644 --- a/app/Models/Advice.php +++ b/app/Models/Advice.php @@ -42,25 +42,25 @@ class Advice extends Model protected static function boot() { static::creating(function (Advice $advice) { - if (is_a($advice->picture1,"SplFileInfo")) { + if (is_a($advice->picture1, "SplFileInfo")) { $advice->picture1 = Utils::storeImage($advice->picture1, $advice->getTable()); } - if (is_a($advice->picture2,"SplFileInfo")) { + if (is_a($advice->picture2, "SplFileInfo")) { $advice->picture2 = Utils::storeImage($advice->picture2, $advice->getTable()); } - if (is_a($advice->picture3,"SplFileInfo")) { + if (is_a($advice->picture3, "SplFileInfo")) { $advice->picture3 = Utils::storeImage($advice->picture3, $advice->getTable()); } }); static::updating(function (Advice $advice) { - if (is_a($advice->picture1,"SplFileInfo")) { + if (is_a($advice->picture1, "SplFileInfo")) { $advice->picture1 = Utils::storeImage($advice->picture1, $advice->getTable()); } - if (is_a($advice->picture2,"SplFileInfo")) { + if (is_a($advice->picture2, "SplFileInfo")) { $advice->picture2 = Utils::storeImage($advice->picture2, $advice->getTable()); } - if (is_a($advice->picture3,"SplFileInfo")) { + if (is_a($advice->picture3, "SplFileInfo")) { $advice->picture3 = Utils::storeImage($advice->picture3, $advice->getTable()); } }); diff --git a/app/Models/Encart.php b/app/Models/Encart.php index c997309..4dd8794 100644 --- a/app/Models/Encart.php +++ b/app/Models/Encart.php @@ -37,13 +37,13 @@ class Encart extends Model protected static function boot() { static::creating(function (Encart $encart) { - if (is_a($encart->picture,"SplFileInfo")) { + if (is_a($encart->picture, "SplFileInfo")) { $encart->picture = Utils::storeImage($encart->picture, $encart->getTable()); } }); static::updating(function (Encart $encart) { - if (is_a($encart->picture,"SplFileInfo")) { + if (is_a($encart->picture, "SplFileInfo")) { $encart->picture = Utils::storeImage($encart->picture, $encart->getTable()); } }); diff --git a/app/Models/Picto.php b/app/Models/Picto.php index c30a342..70adefc 100644 --- a/app/Models/Picto.php +++ b/app/Models/Picto.php @@ -33,13 +33,13 @@ class Picto extends Model protected static function boot() { static::creating(function (Picto $picto) { - if (is_a($picto->picture,"SplFileInfo")) { + if (is_a($picto->picture, "SplFileInfo")) { $picto->picture = Utils::storeImage($picto->picture, $picto->getTable()); } }); static::updating(function (Picto $picto) { - if (is_a($picto->picture,"SplFileInfo")) { + if (is_a($picto->picture, "SplFileInfo")) { $picto->picture = Utils::storeImage($picto->picture, $picto->getTable()); } }); diff --git a/app/Models/PictoBrand.php b/app/Models/PictoBrand.php index f5232e7..bb08aba 100644 --- a/app/Models/PictoBrand.php +++ b/app/Models/PictoBrand.php @@ -30,13 +30,13 @@ class PictoBrand extends Model protected static function boot() { static::creating(function (PictoBrand $pictoBrand) { - if (is_a($pictoBrand->picture,"SplFileInfo")) { + if (is_a($pictoBrand->picture, "SplFileInfo")) { $pictoBrand->picture = Utils::storeImage($pictoBrand->picture, $pictoBrand->getTable()); } }); static::updating(function (PictoBrand $pictoBrand) { - if (is_a($pictoBrand->picture,"SplFileInfo")) { + if (is_a($pictoBrand->picture, "SplFileInfo")) { $pictoBrand->picture = Utils::storeImage($pictoBrand->picture, $pictoBrand->getTable()); } }); diff --git a/app/Models/Post.php b/app/Models/Post.php index 8e22b28..a36ab92 100644 --- a/app/Models/Post.php +++ b/app/Models/Post.php @@ -47,19 +47,19 @@ class Post extends Model protected static function boot() { static::creating(function (Post $post) { - if (is_a($post->picture_home,"SplFileInfo")) { + if (is_a($post->picture_home, "SplFileInfo")) { $post->picture_home = Utils::storeImage($post->picture_home, $post->getTable()); } - if (is_a($post->picture_news,"SplFileInfo")) { + if (is_a($post->picture_news, "SplFileInfo")) { $post->picture_news = Utils::storeImage($post->picture_news, $post->getTable()); } }); static::updating(function (Post $post) { - if (is_a($post->picture_home,"SplFileInfo")) { + if (is_a($post->picture_home, "SplFileInfo")) { $post->picture_home = Utils::storeImage($post->picture_home, $post->getTable()); } - if (is_a($post->picture_news,"SplFileInfo")) { + if (is_a($post->picture_news, "SplFileInfo")) { $post->picture_news = Utils::storeImage($post->picture_news, $post->getTable()); } }); diff --git a/app/Models/Slide.php b/app/Models/Slide.php index 87eebed..8fc4c75 100644 --- a/app/Models/Slide.php +++ b/app/Models/Slide.php @@ -48,13 +48,13 @@ class Slide extends Model protected static function boot() { static::creating(function (Slide $slide) { - if (is_a($slide->picture,"SplFileInfo")) { + if (is_a($slide->picture, "SplFileInfo")) { $slide->picture = Utils::storeImage($slide->picture, $slide->getTable()); } }); static::updating(function (Slide $slide) { - if (is_a($slide->picture,"SplFileInfo")) { + if (is_a($slide->picture, "SplFileInfo")) { $slide->picture = Utils::storeImage($slide->picture, $slide->getTable()); } }); diff --git a/app/Providers/AuthServiceProvider.php b/app/Providers/AuthServiceProvider.php index ce74491..d49c386 100644 --- a/app/Providers/AuthServiceProvider.php +++ b/app/Providers/AuthServiceProvider.php @@ -3,7 +3,6 @@ namespace App\Providers; use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider; -use Illuminate\Support\Facades\Gate; class AuthServiceProvider extends ServiceProvider { diff --git a/app/Providers/EventServiceProvider.php b/app/Providers/EventServiceProvider.php index a9f10a6..46acbe0 100644 --- a/app/Providers/EventServiceProvider.php +++ b/app/Providers/EventServiceProvider.php @@ -5,7 +5,6 @@ namespace App\Providers; use Illuminate\Auth\Events\Registered; use Illuminate\Auth\Listeners\SendEmailVerificationNotification; use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider; -use Illuminate\Support\Facades\Event; class EventServiceProvider extends ServiceProvider { diff --git a/app/Providers/RouteServiceProvider.php b/app/Providers/RouteServiceProvider.php index d1397b9..5224fd9 100644 --- a/app/Providers/RouteServiceProvider.php +++ b/app/Providers/RouteServiceProvider.php @@ -50,17 +50,16 @@ class RouteServiceProvider extends ServiceProvider ->group(base_path('routes/web.php')); }); - Route::bind('gammeSlug', function($value, $route) { - $gamme = Gamme::where('slug', 'LIKE', '%:"'.$value.'"%')->firstOrFail(); + Route::bind('gammeSlug', function ($value, $route) { + $gamme = Gamme::where('slug', 'LIKE', '%:"' . $value . '"%')->firstOrFail(); return $gamme; }); - Route::bind('productSlug', function($value, $route) { + Route::bind('productSlug', function ($value, $route) { $gamme = $route->parameter('gammeSlug'); - $product = Product::where('slug', 'LIKE', '%:"'.$value.'"%')->where('gamme_id', $gamme->id)->firstOrFail(); + $product = Product::where('slug', 'LIKE', '%:"' . $value . '"%')->where('gamme_id', $gamme->id)->firstOrFail(); return $product; }); - } /** diff --git a/app/Traits/CastsEnumsHasTranslations.php b/app/Traits/CastsEnumsHasTranslations.php index bc934a7..c81de92 100644 --- a/app/Traits/CastsEnumsHasTranslations.php +++ b/app/Traits/CastsEnumsHasTranslations.php @@ -5,10 +5,9 @@ namespace App\Traits; use Kwaadpepper\Enum\Traits\CastsEnums; use Spatie\Translatable\HasTranslations; -trait CastsEnumsHasTranslations { - - use CastsEnums, HasTranslations - { +trait CastsEnumsHasTranslations +{ + use CastsEnums, HasTranslations { CastsEnums::getAttributeValue as enumGetAttributeValue; CastsEnums::setAttribute as enumSetAttribute; HasTranslations::getAttributeValue as transGetAttributeValue; @@ -21,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); @@ -34,9 +33,8 @@ trait CastsEnumsHasTranslations { { if ($this->hasEnumCast($key)) { return $this->enumSetAttribute($key, $value); + } - } - - return $this->transSetAttribute($key,$value); + return $this->transSetAttribute($key, $value); } } diff --git a/config/app.php b/config/app.php index e1f87fb..7f91e09 100644 --- a/config/app.php +++ b/config/app.php @@ -39,7 +39,7 @@ return [ | */ - 'debug' => (bool) env('APP_DEBUG', false), + 'debug' => (bool)env('APP_DEBUG', false), /* |-------------------------------------------------------------------------- diff --git a/config/cache.php b/config/cache.php index 8736c7a..e9eb649 100644 --- a/config/cache.php +++ b/config/cache.php @@ -105,6 +105,6 @@ return [ | */ - 'prefix' => env('CACHE_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_cache'), + 'prefix' => env('CACHE_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_') . '_cache'), ]; diff --git a/config/database.php b/config/database.php index b42d9b3..3bfc47a 100644 --- a/config/database.php +++ b/config/database.php @@ -123,7 +123,7 @@ return [ 'options' => [ 'cluster' => env('REDIS_CLUSTER', 'redis'), - 'prefix' => env('REDIS_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_database_'), + 'prefix' => env('REDIS_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_') . '_database_'), ], 'default' => [ diff --git a/config/filesystems.php b/config/filesystems.php index 760ef97..e6b2e79 100644 --- a/config/filesystems.php +++ b/config/filesystems.php @@ -38,7 +38,7 @@ return [ 'public' => [ 'driver' => 'local', 'root' => storage_path('app/public'), - 'url' => env('APP_URL').'/storage', + 'url' => env('APP_URL') . '/storage', 'visibility' => 'public', ], diff --git a/config/sanctum.php b/config/sanctum.php index 442726a..3c92b7a 100644 --- a/config/sanctum.php +++ b/config/sanctum.php @@ -16,7 +16,7 @@ return [ 'stateful' => 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) : '' + env('APP_URL') ? ',' . parse_url(env('APP_URL'), PHP_URL_HOST) : '' ))), /* diff --git a/config/session.php b/config/session.php index ac0802b..c487a7e 100644 --- a/config/session.php +++ b/config/session.php @@ -128,7 +128,7 @@ return [ 'cookie' => env( 'SESSION_COOKIE', - Str::slug(env('APP_NAME', 'laravel'), '_').'_session' + Str::slug(env('APP_NAME', 'laravel'), '_') . '_session' ), /* diff --git a/config/translation.php b/config/translation.php index ad5dd37..faf38ec 100644 --- a/config/translation.php +++ b/config/translation.php @@ -52,8 +52,8 @@ return [ 'scan_paths' => [ //app_path(), //resource_path().'\views\back', - resource_path().'/views/front', - resource_path().'/views/layouts/frontend', + resource_path() . '/views/front', + resource_path() . '/views/layouts/frontend', ], /* diff --git a/routes/api.php b/routes/api.php index 1612b32..51535fb 100644 --- a/routes/api.php +++ b/routes/api.php @@ -1,8 +1,5 @@ id === (int) $id; + return (int)$user->id === (int)$id; }); diff --git a/routes/web.php b/routes/web.php index e5919c7..e888c48 100644 --- a/routes/web.php +++ b/routes/web.php @@ -54,60 +54,60 @@ Route::prefix('bo') ->name('bo.') ->middleware(['admin-secure']) ->group( - function () { - Auth::routes( - [ - 'login' => true, - 'logout' => true, - 'register' => false, - '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']) - ->group( - function () { - Route::get( - '/', - [ - HomeController::class, - 'home' - ] - )->name('home'); - Route::resources( - [ - 'sliders' => SlidersController::class, - 'slides' => SlidesController::class, - ] - ); - Route::resource('seo_data', SeoDataController::class) - ->except(['index', 'create', 'store', 'destroy', 'show']); - Route::resource('moments', MomentsController::class) - ->except(['create', 'store', 'destroy', 'show']); - Route::resource('encarts', EncartsController::class) - ->except(['index', 'create', 'store', 'destroy', 'show']); - Route::resource('pictos', PictosController::class)->except(['show']); - Route::resource('posts', PostsController::class)->except(['show']); - Route::resource('pictobrands', PictoBrandsController::class)->except(['show']); - Route::resource('gammes', GammesController::class)->except(['show']); - Route::resource('products', ProductsController::class)->except(['show']); - Route::resource('advice', AdviceController::class) - ->except(['index', 'create', 'store', 'destroy', 'show']); - Route::resource('texts', TextsController::class)->except(['show']); - Route::resource('titles', TitlesController::class) - ->except(['index', 'create', 'store', 'destroy', 'show']); - Route::get( - '/slide/change-order/{slide}/{action}', - [ - SlidesController::class, - 'changeOrder' - ] - )->name('slides.change-order'); - Route::get('/pictos/{page}', [PictosController::class, 'index'])->name('pictos.content'); - Route::get('/texts/{page}', [TextsController::class, 'index'])->name('texts.content'); - } - ); + function () { + Auth::routes( + [ + 'login' => true, + 'logout' => true, + 'register' => false, + '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']) + ->group( + function () { + Route::get( + '/', + [ + HomeController::class, + 'home' + ] + )->name('home'); + Route::resources( + [ + 'sliders' => SlidersController::class, + 'slides' => SlidesController::class, + ] + ); + Route::resource('seo_data', SeoDataController::class) + ->except(['index', 'create', 'store', 'destroy', 'show']); + Route::resource('moments', MomentsController::class) + ->except(['create', 'store', 'destroy', 'show']); + Route::resource('encarts', EncartsController::class) + ->except(['index', 'create', 'store', 'destroy', 'show']); + Route::resource('pictos', PictosController::class)->except(['show']); + Route::resource('posts', PostsController::class)->except(['show']); + Route::resource('pictobrands', PictoBrandsController::class)->except(['show']); + Route::resource('gammes', GammesController::class)->except(['show']); + Route::resource('products', ProductsController::class)->except(['show']); + Route::resource('advice', AdviceController::class) + ->except(['index', 'create', 'store', 'destroy', 'show']); + Route::resource('texts', TextsController::class)->except(['show']); + Route::resource('titles', TitlesController::class) + ->except(['index', 'create', 'store', 'destroy', 'show']); + Route::get( + '/slide/change-order/{slide}/{action}', + [ + SlidesController::class, + 'changeOrder' + ] + )->name('slides.change-order'); + Route::get('/pictos/{page}', [PictosController::class, 'index'])->name('pictos.content'); + Route::get('/texts/{page}', [TextsController::class, 'index'])->name('texts.content'); + } + ); } ); @@ -120,21 +120,21 @@ foreach ($langs as $lang) { ->group( function () use ($lang) { Route::get('/', [ControllersHomeController::class, 'index'])->name('home'); - Route::get('/'.Str::slug(Lang::get('urls.marque',[], $lang)), [ControllersMarqueController::class, 'index'])->name('wasup'); - Route::get('/'.Str::slug(Lang::get('urls.gammes',[], $lang)), [ControllersGammesController::class, 'index'])->name('gammes.index'); - Route::get('/'.Str::slug(Lang::get('urls.gamme',[], $lang)).'/{gammeSlug}', [ControllersGammesController::class, 'show'])->name('gammes.show'); + Route::get('/' . Str::slug(Lang::get('urls.marque', [], $lang)), [ControllersMarqueController::class, 'index'])->name('wasup'); + Route::get('/' . Str::slug(Lang::get('urls.gammes', [], $lang)), [ControllersGammesController::class, 'index'])->name('gammes.index'); + Route::get('/' . Str::slug(Lang::get('urls.gamme', [], $lang)) . '/{gammeSlug}', [ControllersGammesController::class, 'show'])->name('gammes.show'); Route::get( - '/'.Str::slug(Lang::get('urls.produit',[], $lang)).'/{gammeSlug}/{productSlug}', + '/' . Str::slug(Lang::get('urls.produit', [], $lang)) . '/{gammeSlug}/{productSlug}', [ControllersProductsController::class, 'show'] )->name('product.show'); - Route::get('/'.Str::slug(Lang::get('urls.news',[], $lang)), [ControllersNewsController::class, 'index'])->name('news'); - Route::get('/'.Str::slug(Lang::get('urls.food-service',[], $lang)), [ControllersFoodServiceController::class, 'index'])->name('food'); - 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.news', [], $lang)), [ControllersNewsController::class, 'index'])->name('news'); + Route::get('/' . Str::slug(Lang::get('urls.food-service', [], $lang)), [ControllersFoodServiceController::class, 'index'])->name('food'); + 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::view('/plan-site', 'front.site-map')->name('site-map'); - Route::get('/'.Str::slug(Lang::get('urls.search',[], $lang)), [ControllersProductsController::class, 'search'])->name('search'); + Route::get('/' . Str::slug(Lang::get('urls.search', [], $lang)), [ControllersProductsController::class, 'search'])->name('search'); //Classic - Route::get('/'.Str::slug(Lang::get('urls.contact',[], $lang)), [ControllersContactController::class, 'contact'])->name('contact'); + Route::get('/' . Str::slug(Lang::get('urls.contact', [], $lang)), [ControllersContactController::class, 'contact'])->name('contact'); Route::post('/contact', [ControllersContactController::class, 'contactSubmit'])->name('contact.submit'); } ); From 5ab87b7274dcf3d5e521d0e0153b29c0161109b4 Mon Sep 17 00:00:00 2001 From: Olivier Legat Date: Wed, 27 Jul 2022 14:53:32 +0200 Subject: [PATCH 04/11] phpcs compliance manual corrections --- app/Console/Kernel.php | 2 +- app/Http/Kernel.php | 1 - app/Http/Middleware/LangCheck.php | 3 +-- database/factories/AdviceFactory.php | 1 - database/factories/EncartFactory.php | 1 - database/factories/MomentFactory.php | 1 - database/factories/PictoBrandFactory.php | 1 - database/factories/PictoFactory.php | 1 - database/factories/SlideFactory.php | 1 - database/factories/SliderFactory.php | 1 - database/factories/TextFactory.php | 1 - database/factories/TitleFactory.php | 1 - database/factories/UserFactory.php | 1 - database/seeders/GammesSeeder.php | 9 +++++++++ database/seeders/MomentsSeeder.php | 6 ++++++ database/seeders/SlidersSeeder.php | 1 - database/seeders/TextsSeeder.php | 4 ++++ database/seeders/TitlesSeeder.php | 2 ++ phpcs.xml | 6 +++++- routes/web.php | 3 ++- 20 files changed, 30 insertions(+), 17 deletions(-) diff --git a/app/Console/Kernel.php b/app/Console/Kernel.php index 69914e9..31f4b24 100644 --- a/app/Console/Kernel.php +++ b/app/Console/Kernel.php @@ -34,7 +34,7 @@ class Kernel extends ConsoleKernel */ protected function commands() { - $this->load(__DIR__.'/Commands'); + $this->load(__DIR__ . '/Commands'); require base_path('routes/console.php'); } diff --git a/app/Http/Kernel.php b/app/Http/Kernel.php index ed8bdf1..7ae6f2f 100644 --- a/app/Http/Kernel.php +++ b/app/Http/Kernel.php @@ -9,7 +9,6 @@ use Illuminate\Foundation\Http\Kernel as HttpKernel; class Kernel extends HttpKernel { - /** * The application's global HTTP middleware stack. * diff --git a/app/Http/Middleware/LangCheck.php b/app/Http/Middleware/LangCheck.php index cfc56c8..9972ec9 100644 --- a/app/Http/Middleware/LangCheck.php +++ b/app/Http/Middleware/LangCheck.php @@ -9,7 +9,6 @@ use Illuminate\Support\Facades\View; class LangCheck { - protected $langs = ['fr','en','es']; /** * Handle an incoming request. @@ -64,7 +63,7 @@ class LangCheck $sess_lang = $request->session()->get('lang', config('app.locale')); app()->setLocale($sess_lang); $routePrefixer = ""; - if($sess_lang != 'fr') { + if ($sess_lang != 'fr') { $routePrefixer = $sess_lang . '.'; } View::share('routeprefixer', $routePrefixer); diff --git a/database/factories/AdviceFactory.php b/database/factories/AdviceFactory.php index ec44bf1..15a393f 100644 --- a/database/factories/AdviceFactory.php +++ b/database/factories/AdviceFactory.php @@ -9,7 +9,6 @@ use SplFileInfo; class AdviceFactory extends Factory { - /** * The name of the factory's corresponding model. * diff --git a/database/factories/EncartFactory.php b/database/factories/EncartFactory.php index 6ba1d58..b1dfc2f 100644 --- a/database/factories/EncartFactory.php +++ b/database/factories/EncartFactory.php @@ -9,7 +9,6 @@ use SplFileInfo; class EncartFactory extends Factory { - /** * The name of the factory's corresponding model. * diff --git a/database/factories/MomentFactory.php b/database/factories/MomentFactory.php index 18137a6..ae51971 100644 --- a/database/factories/MomentFactory.php +++ b/database/factories/MomentFactory.php @@ -8,7 +8,6 @@ use SplFileInfo; class MomentFactory extends Factory { - /** * The name of the factory's corresponding model. * diff --git a/database/factories/PictoBrandFactory.php b/database/factories/PictoBrandFactory.php index e1634a3..d0b380a 100644 --- a/database/factories/PictoBrandFactory.php +++ b/database/factories/PictoBrandFactory.php @@ -9,7 +9,6 @@ use SplFileInfo; class PictoBrandFactory extends Factory { - /** * The name of the factory's corresponding model. * diff --git a/database/factories/PictoFactory.php b/database/factories/PictoFactory.php index d35ebb4..b6c7604 100644 --- a/database/factories/PictoFactory.php +++ b/database/factories/PictoFactory.php @@ -9,7 +9,6 @@ use SplFileInfo; class PictoFactory extends Factory { - /** * The name of the factory's corresponding model. * diff --git a/database/factories/SlideFactory.php b/database/factories/SlideFactory.php index 94f0ac7..60e095b 100644 --- a/database/factories/SlideFactory.php +++ b/database/factories/SlideFactory.php @@ -10,7 +10,6 @@ use SplFileInfo; class SlideFactory extends Factory { - /** * The name of the factory's corresponding model. * diff --git a/database/factories/SliderFactory.php b/database/factories/SliderFactory.php index b00e373..cfb111e 100644 --- a/database/factories/SliderFactory.php +++ b/database/factories/SliderFactory.php @@ -8,7 +8,6 @@ use Illuminate\Support\Str; class SliderFactory extends Factory { - /** * The name of the factory's corresponding model. * diff --git a/database/factories/TextFactory.php b/database/factories/TextFactory.php index 4e205f1..419c912 100644 --- a/database/factories/TextFactory.php +++ b/database/factories/TextFactory.php @@ -7,7 +7,6 @@ use Illuminate\Database\Eloquent\Factories\Factory; class TextFactory extends Factory { - /** * The name of the factory's corresponding model. * diff --git a/database/factories/TitleFactory.php b/database/factories/TitleFactory.php index d31086c..3399b89 100644 --- a/database/factories/TitleFactory.php +++ b/database/factories/TitleFactory.php @@ -7,7 +7,6 @@ use Illuminate\Database\Eloquent\Factories\Factory; class TitleFactory extends Factory { - /** * The name of the factory's corresponding model. * diff --git a/database/factories/UserFactory.php b/database/factories/UserFactory.php index f4d1116..a24ce53 100644 --- a/database/factories/UserFactory.php +++ b/database/factories/UserFactory.php @@ -8,7 +8,6 @@ use Illuminate\Support\Str; class UserFactory extends Factory { - /** * The name of the factory's corresponding model. * diff --git a/database/seeders/GammesSeeder.php b/database/seeders/GammesSeeder.php index 6d16be5..91cae69 100644 --- a/database/seeders/GammesSeeder.php +++ b/database/seeders/GammesSeeder.php @@ -127,6 +127,7 @@ class GammesSeeder extends Seeder $gamme->parent_gamme_id = $gameParent; $gamme->title = 'Les classiques'; $gamme->slug = Str::slug($gamme->title); + // phpcs:ignore Generic.Files.LineLength.TooLong $gamme->text = 'Idéales pour toute la famille, les Chicken Franks classiques sont faciles et rapides à cuisiner. Faites votre choix parmi la multitude de saveurs disponibles.'; $gamme->color = '#000000'; $upload = new SplFileInfo(resource_path('seeds/gammes/88853_1.jpg')); @@ -153,6 +154,7 @@ class GammesSeeder extends Seeder $product->gamme_id = $gamme->id; $product->name = 'Chicken Franks Original'; $product->slug = Str::slug($product->name); + // phpcs:ignore Generic.Files.LineLength.TooLong $product->description = 'Les Franks de poulet original : un goût unique et qui s\'accordera facilement à tous vos plats. Elles sont congelées directement après leur production afin de garantir une qualité et un goût optimal.'; $upload = new SplFileInfo(resource_path('seeds/products/88891_2.png')); $imgpath = Utils::storeImage($upload, $product->getTable()); @@ -173,6 +175,7 @@ class GammesSeeder extends Seeder $gamme->parent_gamme_id = $gameParent; $gamme->title = 'Les mini'; $gamme->slug = Str::slug($gamme->title); + // phpcs:ignore Generic.Files.LineLength.TooLong $gamme->text = 'Rapide et pratique à réchauffer, ce format est idéal pour les moments de partage et les repas sur le pouce.'; $gamme->color = '#c0d8e0'; $upload = new SplFileInfo(resource_path('seeds/gammes/132505_1.jpg')); @@ -215,6 +218,7 @@ class GammesSeeder extends Seeder $product->gamme_id = $gamme->id; $product->name = 'Mini Chicken Franks Cheese'; $product->slug = Str::slug($product->name); + // phpcs:ignore Generic.Files.LineLength.TooLong $product->description = 'Les Mini Chicken Franks cheese... avec elles, plus besoin de se priver pour se faire plaisir à tout moment de la journée'; $upload = new SplFileInfo(resource_path('seeds/products/132505_2.png')); $imgpath = Utils::storeImage($upload, $product->getTable()); @@ -238,6 +242,7 @@ class GammesSeeder extends Seeder $product->gamme_id = $gamme->id; $product->name = 'Mini Chicken Franks Original'; $product->slug = Str::slug($product->name); + // phpcs:ignore Generic.Files.LineLength.TooLong $product->description = 'Les Mini Chicken Franks original, c\'est votre recette de Franks préférée en plus petit ! De quoi vous faire craquer !'; $upload = new SplFileInfo(resource_path('seeds/products/132504_2.png')); $imgpath = Utils::storeImage($upload, $product->getTable()); @@ -306,10 +311,12 @@ class GammesSeeder extends Seeder $product->gamme_id = $gamme->id; $product->name = 'Steak haché de poulet'; $product->slug = Str::slug($product->name); + // phpcs:ignore Generic.Files.LineLength.TooLong $product->description = 'Un steak haché de poulet façon bouchère avec un large grain. De la viande de qualité issue de la cuisse. Rien de plus, rien de moins.'; $upload = new SplFileInfo(resource_path('seeds/products/131700_1.png')); $imgpath = Utils::storeImage($upload, $product->getTable()); $product->picture = $imgpath; + // phpcs:ignore Generic.Files.LineLength.TooLong $product->alt_text_picture = 'Un produit incontournable du rayon surgelé maintenant disponible au rayon poulet.'; $product->pictos = json_encode(['poele' => $tabPoele]); $product->plusproduit = json_encode([$tabPlusProduit1, $tabPlusProduit2, $tabPlusProduit3]); @@ -325,6 +332,7 @@ class GammesSeeder extends Seeder $gamme = new Gamme(); $gamme->title = 'Volailles entières'; $gamme->slug = Str::slug($gamme->title); + // phpcs:ignore Generic.Files.LineLength.TooLong $gamme->text = 'Découvrez la gamme historique de Doux. Des volailles entières, nées, élevées et préparées en France, nourries exclusivement avec des végétaux, des minéraux et des vitamines.'; $gamme->color = '#d4eac8'; $upload = new SplFileInfo(resource_path('seeds/gammes/gamme_volaille.jpg')); @@ -346,6 +354,7 @@ class GammesSeeder extends Seeder $product->gamme_id = $gamme->id; $product->name = 'Poulet sans abats'; $product->slug = Str::slug($product->name); + // phpcs:ignore Generic.Files.LineLength.TooLong $product->description = 'Le poulet Doux est congelé dans les 24h après l\'abattage pour garantir ses qualités nutritionnelles et gustatives. Un produit historique qui a fait la réputation de la marque et qui vous satisfait depuis près de 90 ans !'; $upload = new SplFileInfo(resource_path('seeds/products/89779_1.png')); $imgpath = Utils::storeImage($upload, $product->getTable()); diff --git a/database/seeders/MomentsSeeder.php b/database/seeders/MomentsSeeder.php index 21c31cb..fb419f0 100644 --- a/database/seeders/MomentsSeeder.php +++ b/database/seeders/MomentsSeeder.php @@ -43,6 +43,7 @@ class MomentsSeeder extends Seeder $moment->page = Page::marqueHistory(); $moment->title = "1961"; $moment->subtitle = "Le poulet prend son envol."; + // phpcs:ignore Generic.Files.LineLength.TooLong $moment->text = "

Il s'exporte d’abord vers l’Allemagne et la Suisse, puis, dans les années 70 vers d’autres pays comme la Russie ou le Liban.

"; $upload = new SplFileInfo(resource_path('seeds/moments/1961.jpg')); $imgpath = Utils::storeImage($upload, $moment->getTable()); @@ -54,6 +55,7 @@ class MomentsSeeder extends Seeder $moment->page = Page::marqueHistory(); $moment->title = "1980"; $moment->subtitle = "L'expansion internationale se poursuit."; + // phpcs:ignore Generic.Files.LineLength.TooLong $moment->text = "

Le développement de la marque à l'export continue tout au long de la décennie, principalement vers le Moyen-Orient mais aussi en Afrique.

"; $upload = new SplFileInfo(resource_path('seeds/moments/1980.jpg')); $imgpath = Utils::storeImage($upload, $moment->getTable()); @@ -65,6 +67,7 @@ class MomentsSeeder extends Seeder $moment->page = Page::marqueHistory(); $moment->title = "1992"; $moment->subtitle = "La naissance d'un produit iconique !"; + // phpcs:ignore Generic.Files.LineLength.TooLong $moment->text = "

Le spécialiste de la volaille lance sa Chicken Franks Doux, un produit emblématique. Et vous l'adorez depuis !

"; $upload = new SplFileInfo(resource_path('seeds/moments/1992.jpg')); $imgpath = Utils::storeImage($upload, $moment->getTable()); @@ -76,6 +79,7 @@ class MomentsSeeder extends Seeder $moment->page = Page::marqueHistory(); $moment->title = "1992"; $moment->subtitle = "Un nouveau défi."; + // phpcs:ignore Generic.Files.LineLength.TooLong $moment->text = "

Toujours désireuse d'apporter plus de variété dans vos assiettes, la marque Doux se lance dans la production de produits élaborés destinés à l’export, tels que les nuggets, les burgers ou les escalopes panées.

"; $upload = new SplFileInfo(resource_path('seeds/moments/1992_bis.jpg')); $imgpath = Utils::storeImage($upload, $moment->getTable()); @@ -98,6 +102,7 @@ class MomentsSeeder extends Seeder $moment->page = Page::marqueHistory(); $moment->title = "2019"; $moment->subtitle = "Un vent de fraicheur."; + // phpcs:ignore Generic.Files.LineLength.TooLong $moment->text = "

La marque Doux s'offre un nouveau look plus moderne, sans rien changer au goût tant apprécié de ses produits.

"; $upload = new SplFileInfo(resource_path('seeds/moments/88832_2.png')); $imgpath = Utils::storeImage($upload, $moment->getTable()); @@ -109,6 +114,7 @@ class MomentsSeeder extends Seeder $moment->page = Page::marqueHistory(); $moment->title = "2021"; $moment->subtitle = "Doux Innove..."; + // phpcs:ignore Generic.Files.LineLength.TooLong $moment->text = "

...et lance le Steak haché de poulet façon bouchère et les Mini Chicken Franks : Découvrez ces nouveaux produits inédits !

"; $upload = new SplFileInfo(resource_path('seeds/moments/2021.jpg')); $imgpath = Utils::storeImage($upload, $moment->getTable()); diff --git a/database/seeders/SlidersSeeder.php b/database/seeders/SlidersSeeder.php index eaa1442..f69627d 100644 --- a/database/seeders/SlidersSeeder.php +++ b/database/seeders/SlidersSeeder.php @@ -15,7 +15,6 @@ class SlidersSeeder extends Seeder */ public function run() { - // Slider::factory(2)->create(['page' => Page::home(),]) Slider::factory(1)->create() ->each(function (Slider $slider) { diff --git a/database/seeders/TextsSeeder.php b/database/seeders/TextsSeeder.php index 9b5830d..34fbec3 100644 --- a/database/seeders/TextsSeeder.php +++ b/database/seeders/TextsSeeder.php @@ -29,13 +29,16 @@ class TextsSeeder extends Seeder $mentions = new Text(); $mentions->page = Page::mentions(); $mentions->title = "Mentions Légales & CGU"; + // phpcs:disable Generic.Files.LineLength.TooLong $mentions->text = '

Mentions légales et conditions générales d\'utilisation du site Doux

Introduction

 

Nous vous remercions de lire ces conditions générales d\'utilisation qui régissent les conditions d’accès et d’utilisation du site https://www.doux.fr/ 

Nous vous invitons à consulter régulièrement cette rubrique car la société SOCIETE BRETONNE DE VOLAILLE peut être amenée à la modifier à tout moment.

Tout utilisateur déclare avoir lu et accepté les mentions légales et les conditions générales d’utilisation et s’engage à s’y conformer.

Mise à jour le 14/10/21.

 

Mentions légales

Société Bretonne de Volaille (ci-après SBV), ZI du Lay 56660 Saint-Jean-Brévelay

Tél : 02 97 60 33 88, Société par Actions simplifiées au capital social de 83 470 000 euros – RCS de Vannes sous le numéro 808 448 757  
Editeur du Site : société LDC- Zi St Laurent – 72300Sablé sur Sarthe, SA au capital de 6 785 055,60 euros, RCS Le Mans n° 576 850 697. Tel : 02 43 62 70 00 

Directeur de la publication : Roland Tonarelli

Conception du site et réalisation :  Graphisweet marque de la Société Graphimedia

SAS au capital de 10000€.

SIRET : 879 404 895 00010

Siège social : Bâtiment MV Group - Espace Performance III - Centre Affaires Alphasis - 35760 Saint Grégoire 

Tél. : 02.99.65.43.69

Illustrations : Agence WHY 2 bis, place Saint-Melaine, 35000 Rennes, RCS Rennes numéro 926 950 312, Tel : 02 99 65 42 84

Le site est hébergé par : OVH, via LDC, SAS au capital de 10 069 020 euros, RCS Lille Métropole 537 407 926, 2 rue Kellermann – 59100 Roubaix, Tel : 09 72 10 10 07, Mail : hosting@ml.ovh.net

 

Droit d’auteur - Droit des marques – Protection des bases de données

La présentation et le contenu du site constituent, ensemble, une œuvre protégée par les lois en vigueur des droits d’auteur, de la propriété intellectuelle et industrielle.

Les créations apparaissant sur le site (dessins, photographies, images, textes, séquences animées sonores ou non et autres documentations représentées), sont objets de droits d’auteur, de propriété industrielle et/ou intellectuelle et sont, selon les cas, propriété de la société SOCIETE BRETONNE DE VOLAILLE ou de tiers ayant autorisé la société SOCIETE BRETONNE DE VOLAILLE à les utiliser. 

Aucune exploitation commerciale, reproduction, représentation, utilisation, adaptation, modification, incorporation, traduction, commercialisation, partielle ou intégrale de ces éléments (y compris ceux téléchargeables ou copiables) ne pourra en être faite sans l\'accord préalable et écrit de la société SOCIETE BRETONNE DE VOLAILLE, à l\'exception de l\'utilisation pour un usage privé sous réserve des dispositions différentes voire plus restrictives du Code de la propriété intellectuelle.

Toute utilisation non expressément autorisée peut engager la responsabilité civile et/ou pénale de son auteur. SOCIETE BRETONNE DE VOLAILLE se réserve le droit d\'engager des poursuites judiciaires à l\'encontre de toute personne qui n\'aurait pas respecté cette interdiction.

 

Vie privée – Données personnelles – Cookies

Nous vous invitons à vous reporter à notre Charte de confidentialité en cliquant ici.  


Mentions Sanitaires :

Pour votre santé :  

-mangez au moins cinq fruits et légumes par jour

-pratiquez une activité physique régulière

-évitez de manger trop gras, trop sucré, trop salé

-évitez de grignoter entre les repas

Pour toute information complémentaire, consultez le site : www.mangerbouger.fr

Responsabilité

La SOCIÉTÉ BRETONNE DE VOLAILLE a déployé ses meilleurs efforts pour s’assurer de l’exactitude des informations présentes sur son site internet (ci-après le Site). Cependant, la SOCIÉTÉ BRETONNE DE VOLAILLE n’est responsable ni de l’exactitude, ni des erreurs, ni des omissions contenues sur le Site. L’utilisateur est seul responsable de l’utilisation de telles informations.

La SOCIÉTÉ BRETONNE DE VOLAILLE ne donne aucune garantie, explicite ou implicite, et n’assume aucune responsabilité qui pourrait résulter de l’accès ou de l’utilisation de ce Site incluant toutes détériorations ou virus qui pourraient infecter l’équipement informatique ou tout autre bien de l’utilisateur. 

Par ailleurs. 

La SOCIÉTÉ BRETONNE DE VOLAILLE pourra unilatéralement et à tout moment interrompre temporairement ou définitivement l’accès à tout ou partie du Site, y compris notamment le contenu, les fonctionnalités ou les heures de disponibilité, sans que sa responsabilité ne puisse être recherchée et sans que cela ne puisse donner lieu à l’allocation de dommages et intérêts de quelque nature que ce soit.

Les pages du Site peuvent contenir des liens hypertextes renvoyant vers d\'autres sites internet gérés par des sociétés distinctes de SOCIÉTÉ BRETONNE DE VOLAILLE, et sur lesquels la SOCIÉTÉ BRETONNE DE VOLAILLE n\'exerce aucune sorte de contrôle. SOCIÉTÉ BRETONNE DE VOLAILLE n\'est pas responsable du contenu de tout autre site auquel vous pourriez avoir accès via le Site ou les autres sites internet du groupe LDC. Tout utilisateur ou visiteur du Site ne peut mettre en place un lien hypertexte en direction de ce Site sans l’autorisation expresse préalable de la SOCIÉTÉ BRETONNE DE VOLAILLE.

'; + // phpcs:enable $mentions->save(); $charte = new Text(); $charte->page = Page::charte(); $charte->title = "Charte de confidentialité"; + // phpcs:disable Generic.Files.LineLength.TooLong $charte->text = "

INTRODUCTION

Le nouveau Règlement Général de l’Union Européenne sur la Protection des Données (RGPD), entré en vigueur le 25 mai 2018, vise à mieux encadrer la collecte, le traitement et l’utilisation de vos données personnelles. La société Bretonne de Volaille, en sa qualité de responsable du traitement, renforce ses engagements pour garantir la protection et la sécurité des données à caractère personnel que vous lui confiez.

A ce titre, la présente Charte de confidentialité vous informe sur le type de données que nous collectons, comment nous les traitons, dans quelles finalités, de manière à rendre leur utilisation la plus adaptée à vos besoins.

@@ -112,6 +115,7 @@ class TextsSeeder extends Seeder

Si vous avez des questions, remarques ou réclamations relatives à la présente Charte de confidentialité, ou le traitement de vos données personnelles, veuillez-nous contacter à l’adresse e-mail suivante :

https://www.ldc.fr/rgpd/professionnels/

https://www.ldc.fr/rgpd/consommateurs/

"; + // phpcs:enable $charte->save(); } } diff --git a/database/seeders/TitlesSeeder.php b/database/seeders/TitlesSeeder.php index ad18afe..ff8b0c6 100644 --- a/database/seeders/TitlesSeeder.php +++ b/database/seeders/TitlesSeeder.php @@ -18,6 +18,7 @@ class TitlesSeeder extends Seeder $title = new Title(); $title->page = Page::marqueBloc2(); $title->title = 'Nos valeurs'; + // phpcs:ignore Generic.Files.LineLength.TooLong $title->text = 'Lorem ip sum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostr'; $title->save(); @@ -38,6 +39,7 @@ class TitlesSeeder extends Seeder $title = new Title(); $title->page = Page::foodBloc2(); $title->title = 'Les avantges de Food Service'; + // phpcs:ignore Generic.Files.LineLength.TooLong $title->text = 'Doux lance sa marque consacrée aux professionnels de la restauration. Une sélection de produits pensée pour facilitrer la vie grâce à une offre évolutive en fonction des besoins.'; $title->save(); diff --git a/phpcs.xml b/phpcs.xml index 15c4e11..bd7759f 100644 --- a/phpcs.xml +++ b/phpcs.xml @@ -67,7 +67,11 @@ - + + + + + diff --git a/routes/web.php b/routes/web.php index e888c48..6bf839e 100644 --- a/routes/web.php +++ b/routes/web.php @@ -120,6 +120,7 @@ foreach ($langs as $lang) { ->group( function () use ($lang) { Route::get('/', [ControllersHomeController::class, 'index'])->name('home'); + // phpcs:disable Generic.Files.LineLength.TooLong Route::get('/' . Str::slug(Lang::get('urls.marque', [], $lang)), [ControllersMarqueController::class, 'index'])->name('wasup'); Route::get('/' . Str::slug(Lang::get('urls.gammes', [], $lang)), [ControllersGammesController::class, 'index'])->name('gammes.index'); Route::get('/' . Str::slug(Lang::get('urls.gamme', [], $lang)) . '/{gammeSlug}', [ControllersGammesController::class, 'show'])->name('gammes.show'); @@ -131,11 +132,11 @@ foreach ($langs as $lang) { Route::get('/' . Str::slug(Lang::get('urls.food-service', [], $lang)), [ControllersFoodServiceController::class, 'index'])->name('food'); 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::view('/plan-site', 'front.site-map')->name('site-map'); Route::get('/' . Str::slug(Lang::get('urls.search', [], $lang)), [ControllersProductsController::class, 'search'])->name('search'); //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 } ); } From 16f829b63464101ebdbf87e3d7211d51b3d795c5 Mon Sep 17 00:00:00 2001 From: Olivier Legat Date: Wed, 27 Jul 2022 15:15:15 +0200 Subject: [PATCH 05/11] phpcs warning compliance manual corrections --- app/Console/Commands/AdminCreate.php | 10 ---------- app/Console/Kernel.php | 2 +- app/Http/Controllers/Bo/EncartsController.php | 1 + app/Http/Controllers/Bo/MomentsController.php | 1 + app/Http/Controllers/Bo/PictoBrandsController.php | 6 ++++-- app/Http/Controllers/Bo/PictosController.php | 6 ++++-- app/Http/Controllers/Bo/ProductsController.php | 1 + app/Http/Controllers/Bo/SeoDataController.php | 1 + app/Http/Controllers/Bo/SlidersController.php | 3 ++- app/Http/Controllers/Bo/TextsController.php | 6 ++++-- app/Http/Controllers/ContactController.php | 3 ++- app/Http/Controllers/NewsController.php | 9 ++++++++- app/Http/Requests/StoreProductRequest.php | 3 +-- app/Http/Requests/UpdateEncartRequest.php | 4 ---- app/Models/Advice.php | 1 + app/Models/Gamme.php | 1 + app/Models/Post.php | 1 + app/Providers/AuthServiceProvider.php | 4 +--- app/Providers/RouteServiceProvider.php | 14 ++++---------- config/app.php | 2 -- config/auth.php | 5 ----- config/cache.php | 2 +- config/translation.php | 2 -- database/factories/UserFactory.php | 1 + 24 files changed, 40 insertions(+), 49 deletions(-) diff --git a/app/Console/Commands/AdminCreate.php b/app/Console/Commands/AdminCreate.php index 6631d90..66fc87b 100644 --- a/app/Console/Commands/AdminCreate.php +++ b/app/Console/Commands/AdminCreate.php @@ -22,16 +22,6 @@ class AdminCreate extends Command */ protected $description = 'Create Admin User'; - /** - * Create a new command instance. - * - * @return void - */ - public function __construct() - { - parent::__construct(); - } - /** * Execute the console command. * diff --git a/app/Console/Kernel.php b/app/Console/Kernel.php index 31f4b24..35e792e 100644 --- a/app/Console/Kernel.php +++ b/app/Console/Kernel.php @@ -24,7 +24,7 @@ class Kernel extends ConsoleKernel */ protected function schedule(Schedule $schedule) { - // $schedule->command('inspire')->hourly(); + //write schedules here } /** diff --git a/app/Http/Controllers/Bo/EncartsController.php b/app/Http/Controllers/Bo/EncartsController.php index faad408..77c328e 100644 --- a/app/Http/Controllers/Bo/EncartsController.php +++ b/app/Http/Controllers/Bo/EncartsController.php @@ -15,6 +15,7 @@ class EncartsController extends Controller * @param Encart $encart * @return \Illuminate\Http\Response */ + //phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter.FoundInExtendedClass public function edit(Encart $encart) { return view('back.encarts.edit', compact('encart')); diff --git a/app/Http/Controllers/Bo/MomentsController.php b/app/Http/Controllers/Bo/MomentsController.php index d4ab9a2..6820470 100644 --- a/app/Http/Controllers/Bo/MomentsController.php +++ b/app/Http/Controllers/Bo/MomentsController.php @@ -27,6 +27,7 @@ class MomentsController extends Controller * @param Moment $moment * @return \Illuminate\Http\Response */ + //phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter.FoundInExtendedClass public function edit(Moment $moment) { return view('back.moments.edit', compact('moment')); diff --git a/app/Http/Controllers/Bo/PictoBrandsController.php b/app/Http/Controllers/Bo/PictoBrandsController.php index 0da0131..2a06035 100644 --- a/app/Http/Controllers/Bo/PictoBrandsController.php +++ b/app/Http/Controllers/Bo/PictoBrandsController.php @@ -48,9 +48,11 @@ class PictoBrandsController extends Controller } if (!$pictobrand->saveOrFail()) { - return redirect()->route('bo.pictobrands.edit', $pictobrand->id)->with('error', 'Le pictogramme n\'a pas été crée'); + return redirect()->route('bo.pictobrands.edit', $pictobrand->id) + ->with('error', 'Le pictogramme n\'a pas été crée'); } - return redirect()->route('bo.pictobrands.edit', $pictobrand->id)->with('success', 'Pictogramme créé !'); + return redirect()->route('bo.pictobrands.edit', $pictobrand->id) + ->with('success', 'Pictogramme créé !'); } /** diff --git a/app/Http/Controllers/Bo/PictosController.php b/app/Http/Controllers/Bo/PictosController.php index 8330bcb..4318b6f 100644 --- a/app/Http/Controllers/Bo/PictosController.php +++ b/app/Http/Controllers/Bo/PictosController.php @@ -101,9 +101,11 @@ class PictosController extends Controller public function destroy(Picto $picto) { if (!$picto->delete()) { - return redirect()->route('bo.pictos.content', $picto->page)->with('error', trans('La suppression a échoué')); + return redirect()->route('bo.pictos.content', $picto->page) + ->with('error', trans('La suppression a échoué')); } - return redirect()->route('bo.pictos.content', $picto->page)->with('success', trans('Suppression faite avec succès')); + return redirect()->route('bo.pictos.content', $picto->page) + ->with('success', trans('Suppression faite avec succès')); } } diff --git a/app/Http/Controllers/Bo/ProductsController.php b/app/Http/Controllers/Bo/ProductsController.php index e280f86..082c98f 100644 --- a/app/Http/Controllers/Bo/ProductsController.php +++ b/app/Http/Controllers/Bo/ProductsController.php @@ -121,6 +121,7 @@ class ProductsController extends Controller 'name' => '', 'url' => '', ); + //phpcs:ignore Generic.Files.LineLength.TooLong $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')); diff --git a/app/Http/Controllers/Bo/SeoDataController.php b/app/Http/Controllers/Bo/SeoDataController.php index a35a637..da1a6ae 100644 --- a/app/Http/Controllers/Bo/SeoDataController.php +++ b/app/Http/Controllers/Bo/SeoDataController.php @@ -14,6 +14,7 @@ class SeoDataController extends Controller * @param \App\Models\SeoDatum $SeoDatum * @return \Illuminate\Http\Response */ + //phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter.FoundInExtendedClass public function edit(SeoDatum $SeoDatum) { return view('back.seo_data.edit', compact('SeoDatum')); diff --git a/app/Http/Controllers/Bo/SlidersController.php b/app/Http/Controllers/Bo/SlidersController.php index 8d397a7..6898901 100644 --- a/app/Http/Controllers/Bo/SlidersController.php +++ b/app/Http/Controllers/Bo/SlidersController.php @@ -27,6 +27,7 @@ class SlidersController extends Controller * @param Slider $slider * @return \Illuminate\Http\Response */ + //phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter.FoundInExtendedClass public function create(Slider $slider) { return view('back.sliders.create', compact('slider')); @@ -54,6 +55,7 @@ class SlidersController extends Controller * @param Slider $slider * @return \Illuminate\Http\Response */ + //phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter.FoundInExtendedClass public function edit(Slider $slider) { return view('back.sliders.edit', compact('slider')); @@ -90,7 +92,6 @@ class SlidersController extends Controller if ($count === 1) { return redirect()->back()->withErrors("Suppression impossible : Vous devez conserver au moins 1 Slider"); } - // @todo : controller les slides liés if (!$slider->delete()) { return redirect()->route('bo.sliders.index')->with('error', trans('La suppression a échoué')); diff --git a/app/Http/Controllers/Bo/TextsController.php b/app/Http/Controllers/Bo/TextsController.php index bb39dd2..159d2cf 100644 --- a/app/Http/Controllers/Bo/TextsController.php +++ b/app/Http/Controllers/Bo/TextsController.php @@ -95,9 +95,11 @@ class TextsController extends Controller public function destroy(Text $text) { if (!$text->delete()) { - return redirect()->route('bo.texts.content', $text->page)->with('error', trans('La suppression a échoué')); + return redirect()->route('bo.texts.content', $text->page) + ->with('error', trans('La suppression a échoué')); } - return redirect()->route('bo.texts.content', $text->page)->with('success', trans('Suppression faite avec succès')); + return redirect()->route('bo.texts.content', $text->page) + ->with('success', trans('Suppression faite avec succès')); } } diff --git a/app/Http/Controllers/ContactController.php b/app/Http/Controllers/ContactController.php index e3f68f1..265a09d 100644 --- a/app/Http/Controllers/ContactController.php +++ b/app/Http/Controllers/ContactController.php @@ -18,6 +18,7 @@ class ContactController extends Controller Mail::to(config('mail.contactsList.contactform'))->send(new SendContactMail($request->validated())); $lang = session()->get('lang', config('app.locale')); - return redirect()->route(session()->get('lang', config('app.locale')) === 'fr' ? 'contact' : $lang . ".contact")->with('status', true); + return redirect()->route(session()->get('lang', config('app.locale')) === 'fr' ? 'contact' : $lang . ".contact") + ->with('status', true); } } diff --git a/app/Http/Controllers/NewsController.php b/app/Http/Controllers/NewsController.php index c861436..7ac2a09 100644 --- a/app/Http/Controllers/NewsController.php +++ b/app/Http/Controllers/NewsController.php @@ -31,6 +31,13 @@ class NewsController extends Controller $products_news = Product::where('is_news', true)->get(); - return view('front.news', compact('seoDatum', 'advice_news', 'texts_news', 'title_newsPosts', 'posts', 'products_news')); + return view('front.news', compact( + 'seoDatum', + 'advice_news', + 'texts_news', + 'title_newsPosts', + 'posts', + 'products_news' + )); } } diff --git a/app/Http/Requests/StoreProductRequest.php b/app/Http/Requests/StoreProductRequest.php index 76e5bb7..2f48523 100644 --- a/app/Http/Requests/StoreProductRequest.php +++ b/app/Http/Requests/StoreProductRequest.php @@ -24,6 +24,7 @@ class StoreProductRequest extends FormRequest * * @return void */ + //phpcs:ignore Generic.Metrics.CyclomaticComplexity.TooHigh protected function prepareForValidation() { try { @@ -184,8 +185,6 @@ class StoreProductRequest extends FormRequest 'is_news' => 'nullable|boolean', 'is_food_service' => 'nullable|boolean', 'is_halal' => 'nullable|boolean', - // 'seo_title' => 'required|max:255', - // 'seo_description' => 'required|max:255', ]; } diff --git a/app/Http/Requests/UpdateEncartRequest.php b/app/Http/Requests/UpdateEncartRequest.php index 851f93e..c2b20b9 100644 --- a/app/Http/Requests/UpdateEncartRequest.php +++ b/app/Http/Requests/UpdateEncartRequest.php @@ -26,10 +26,6 @@ class UpdateEncartRequest extends FormRequest return [ 'title' => 'required|max:255', 'subtitle' => 'sometimes|max:255', - // TODO 'subtitle' => [ - // Rule::requiredIf(), 'max:255' - // 'required|max:255' - // ], 'text' => 'required|max:2047', 'picture' => 'sometimes|image|mimes:jpeg,png,jpg|max:2048', 'alt_text_picture' => 'sometimes|max:255', diff --git a/app/Models/Advice.php b/app/Models/Advice.php index 5a0a00a..dd4bb3f 100644 --- a/app/Models/Advice.php +++ b/app/Models/Advice.php @@ -39,6 +39,7 @@ class Advice extends Model 'text2', ]; + //phpcs:ignore Generic.Metrics.CyclomaticComplexity.TooHigh protected static function boot() { static::creating(function (Advice $advice) { diff --git a/app/Models/Gamme.php b/app/Models/Gamme.php index 07752f5..3a68dd7 100644 --- a/app/Models/Gamme.php +++ b/app/Models/Gamme.php @@ -35,6 +35,7 @@ class Gamme extends Model 'alt_text_banner', ]; + //phpcs:ignore Generic.Metrics.CyclomaticComplexity.TooHigh protected static function boot() { static::creating(function (Gamme $gamme) { diff --git a/app/Models/Post.php b/app/Models/Post.php index a36ab92..caf4a5b 100644 --- a/app/Models/Post.php +++ b/app/Models/Post.php @@ -44,6 +44,7 @@ class Post extends Model 'alt_text_picture_news' ]; + //phpcs:ignore Generic.Metrics.CyclomaticComplexity.TooHigh protected static function boot() { static::creating(function (Post $post) { diff --git a/app/Providers/AuthServiceProvider.php b/app/Providers/AuthServiceProvider.php index d49c386..d2151bd 100644 --- a/app/Providers/AuthServiceProvider.php +++ b/app/Providers/AuthServiceProvider.php @@ -11,9 +11,7 @@ class AuthServiceProvider extends ServiceProvider * * @var array */ - protected $policies = [ - // 'App\Models\Model' => 'App\Policies\ModelPolicy', - ]; + protected $policies = []; /** * Register any authentication / authorization services. diff --git a/app/Providers/RouteServiceProvider.php b/app/Providers/RouteServiceProvider.php index 5224fd9..874fe1a 100644 --- a/app/Providers/RouteServiceProvider.php +++ b/app/Providers/RouteServiceProvider.php @@ -21,15 +21,6 @@ class RouteServiceProvider extends ServiceProvider */ public const HOME = '/bo'; - /** - * The controller namespace for the application. - * - * When present, controller route declarations will automatically be prefixed with this namespace. - * - * @var string|null - */ - // protected $namespace = 'App\\Http\\Controllers'; - /** * Define your route model bindings, pattern filters, etc. * @@ -50,6 +41,7 @@ class RouteServiceProvider extends ServiceProvider ->group(base_path('routes/web.php')); }); + //phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter.FoundInExtendedClassAfterLastUsed Route::bind('gammeSlug', function ($value, $route) { $gamme = Gamme::where('slug', 'LIKE', '%:"' . $value . '"%')->firstOrFail(); return $gamme; @@ -57,7 +49,9 @@ class RouteServiceProvider extends ServiceProvider Route::bind('productSlug', function ($value, $route) { $gamme = $route->parameter('gammeSlug'); - $product = Product::where('slug', 'LIKE', '%:"' . $value . '"%')->where('gamme_id', $gamme->id)->firstOrFail(); + $product = Product::where('slug', 'LIKE', '%:"' . $value . '"%') + ->where('gamme_id', $gamme->id) + ->firstOrFail(); return $product; }); } diff --git a/config/app.php b/config/app.php index 7f91e09..f0f9238 100644 --- a/config/app.php +++ b/config/app.php @@ -171,7 +171,6 @@ return [ */ App\Providers\AppServiceProvider::class, App\Providers\AuthServiceProvider::class, - // App\Providers\BroadcastServiceProvider::class, App\Providers\EventServiceProvider::class, App\Providers\RouteServiceProvider::class, @@ -217,7 +216,6 @@ return [ 'Queue' => Illuminate\Support\Facades\Queue::class, 'RateLimiter' => Illuminate\Support\Facades\RateLimiter::class, 'Redirect' => Illuminate\Support\Facades\Redirect::class, - // 'Redis' => Illuminate\Support\Facades\Redis::class, 'Request' => Illuminate\Support\Facades\Request::class, 'Response' => Illuminate\Support\Facades\Response::class, 'Route' => Illuminate\Support\Facades\Route::class, diff --git a/config/auth.php b/config/auth.php index e29a3f7..a62f993 100644 --- a/config/auth.php +++ b/config/auth.php @@ -64,11 +64,6 @@ return [ 'driver' => 'eloquent', 'model' => App\Models\User::class, ], - - // 'users' => [ - // 'driver' => 'database', - // 'table' => 'users', - // ], ], /* diff --git a/config/cache.php b/config/cache.php index e9eb649..b092dd2 100644 --- a/config/cache.php +++ b/config/cache.php @@ -62,7 +62,7 @@ return [ env('MEMCACHED_PASSWORD'), ], 'options' => [ - // Memcached::OPT_CONNECT_TIMEOUT => 2000, + ], 'servers' => [ [ diff --git a/config/translation.php b/config/translation.php index faf38ec..45b49a7 100644 --- a/config/translation.php +++ b/config/translation.php @@ -50,8 +50,6 @@ return [ | */ 'scan_paths' => [ - //app_path(), - //resource_path().'\views\back', resource_path() . '/views/front', resource_path() . '/views/layouts/frontend', ], diff --git a/database/factories/UserFactory.php b/database/factories/UserFactory.php index a24ce53..1a70635 100644 --- a/database/factories/UserFactory.php +++ b/database/factories/UserFactory.php @@ -38,6 +38,7 @@ class UserFactory extends Factory */ public function unverified() { + // phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter.FoundInExtendedClass return $this->state(function (array $attributes) { return [ 'email_verified_at' => null, From 94374cf378e8ea7b85fc1d07a289fce4bbc5ecd5 Mon Sep 17 00:00:00 2001 From: Olivier Legat Date: Wed, 27 Jul 2022 15:19:29 +0200 Subject: [PATCH 06/11] composer security compliance : update guzzle --- composer.lock | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/composer.lock b/composer.lock index dc57716..8d989a5 100644 --- a/composer.lock +++ b/composer.lock @@ -615,16 +615,16 @@ }, { "name": "guzzlehttp/guzzle", - "version": "7.4.1", + "version": "7.4.4", "source": { "type": "git", "url": "https://github.com/guzzle/guzzle.git", - "reference": "ee0a041b1760e6a53d2a39c8c34115adc2af2c79" + "reference": "e3ff079b22820c2029d4c2a87796b6a0b8716ad8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/ee0a041b1760e6a53d2a39c8c34115adc2af2c79", - "reference": "ee0a041b1760e6a53d2a39c8c34115adc2af2c79", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/e3ff079b22820c2029d4c2a87796b6a0b8716ad8", + "reference": "e3ff079b22820c2029d4c2a87796b6a0b8716ad8", "shasum": "" }, "require": { @@ -719,7 +719,7 @@ ], "support": { "issues": "https://github.com/guzzle/guzzle/issues", - "source": "https://github.com/guzzle/guzzle/tree/7.4.1" + "source": "https://github.com/guzzle/guzzle/tree/7.4.4" }, "funding": [ { @@ -735,7 +735,7 @@ "type": "tidelift" } ], - "time": "2021-12-06T18:43:05+00:00" + "time": "2022-06-09T21:39:15+00:00" }, { "name": "guzzlehttp/promises", From f4f3256ce58e2be885c7403bffcceb3dbe79b566 Mon Sep 17 00:00:00 2001 From: Vincent BRIDIER Date: Thu, 11 Aug 2022 12:34:27 +0200 Subject: [PATCH 07/11] 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 From 54ecb006389d45242cfe25fd66b7a9ea6039b812 Mon Sep 17 00:00:00 2001 From: Olivier Legat Date: Mon, 29 Aug 2022 17:23:10 +0200 Subject: [PATCH 08/11] phpcs clean --- app/Console/Kernel.php | 2 +- app/Enums/Page.php | 5 + app/Enums/Role.php | 5 + .../Auth/ConfirmPasswordController.php | 3 +- .../Auth/ForgotPasswordController.php | 5 +- app/Http/Controllers/Auth/LoginController.php | 3 +- .../Controllers/Auth/RegisterController.php | 3 +- .../Auth/ResetPasswordController.php | 3 +- .../Auth/VerificationController.php | 3 +- app/Http/Controllers/Bo/AdviceController.php | 5 +- app/Http/Controllers/Bo/EncartsController.php | 5 +- app/Http/Controllers/Bo/GammesController.php | 20 +- app/Http/Controllers/Bo/HomeController.php | 6 +- app/Http/Controllers/Bo/MomentsController.php | 5 +- .../Controllers/Bo/PictoBrandsController.php | 10 +- app/Http/Controllers/Bo/PictosController.php | 16 +- app/Http/Controllers/Bo/PostsController.php | 13 +- .../Controllers/Bo/ProductsController.php | 27 +- app/Http/Controllers/Bo/SeoDataController.php | 5 +- app/Http/Controllers/Bo/SlidersController.php | 10 +- app/Http/Controllers/Bo/SlidesController.php | 20 +- app/Http/Controllers/Bo/TextsController.php | 12 +- app/Http/Controllers/Bo/TitlesController.php | 5 +- app/Http/Controllers/ContactController.php | 11 + app/Http/Controllers/Controller.php | 3 + .../Controllers/FoodServiceController.php | 5 + app/Http/Controllers/GammesController.php | 16 +- app/Http/Controllers/HomeController.php | 7 +- app/Http/Controllers/LegalsController.php | 7 +- app/Http/Controllers/MarqueController.php | 5 + app/Http/Controllers/NewsController.php | 5 + app/Http/Controllers/PolicyController.php | 7 +- app/Http/Controllers/ProductsController.php | 15 +- .../Controllers/TranslationController.php | 23 -- app/Http/Kernel.php | 1 + app/Http/Middleware/Authenticate.php | 6 +- app/Http/Middleware/BackEndGlobals.php | 4 +- app/Http/Middleware/FrontEndGlobals.php | 25 +- app/Http/Middleware/LangCheck.php | 41 ++- app/Http/Requests/StorePostRequest.php | 22 +- app/Http/Requests/StoreProductRequest.php | 259 +++++++++--------- app/Http/Requests/StoreSlideRequest.php | 9 +- app/Lib/Utils.php | 14 +- app/Mail/SendContactMail.php | 6 +- app/Models/Advice.php | 17 +- app/Models/Encart.php | 20 ++ app/Models/Gamme.php | 41 ++- app/Models/Moment.php | 20 ++ app/Models/Picto.php | 20 ++ app/Models/PictoBrand.php | 15 + app/Models/Post.php | 17 +- app/Models/Product.php | 19 +- app/Models/SeoDatum.php | 36 +++ app/Models/Slide.php | 20 ++ app/Models/Slider.php | 20 ++ app/Models/Text.php | 21 +- app/Models/Title.php | 15 + app/Models/User.php | 10 + app/Providers/RouteServiceProvider.php | 46 +++- app/Traits/CastsEnumsHasTranslations.php | 9 + config/app.php | 4 +- config/bo.php | 1 + config/mail.php | 2 +- config/purifier.php | 14 +- config/translatable.php | 12 + config/translation.php | 7 + database/factories/UserFactory.php | 2 +- routes/web.php | 62 +++-- 68 files changed, 824 insertions(+), 308 deletions(-) delete mode 100644 app/Http/Controllers/TranslationController.php create mode 100644 config/translatable.php diff --git a/app/Console/Kernel.php b/app/Console/Kernel.php index ab42c78..d465299 100644 --- a/app/Console/Kernel.php +++ b/app/Console/Kernel.php @@ -23,7 +23,7 @@ class Kernel extends ConsoleKernel */ protected function schedule(Schedule $schedule) { - // write schedules here + // Write schedules here. } /** diff --git a/app/Enums/Page.php b/app/Enums/Page.php index e8848d4..78a95c8 100644 --- a/app/Enums/Page.php +++ b/app/Enums/Page.php @@ -31,6 +31,11 @@ use Kwaadpepper\Enum\BaseEnumRoutable; */ class Page extends BaseEnumRoutable { + /** + * Enum values + * + * @return array + */ protected static function values(): array { return [ diff --git a/app/Enums/Role.php b/app/Enums/Role.php index 730b402..744dc44 100644 --- a/app/Enums/Role.php +++ b/app/Enums/Role.php @@ -10,6 +10,11 @@ use Kwaadpepper\Enum\BaseEnumRoutable; */ class Role extends BaseEnumRoutable { + /** + * Enum values + * + * @return array + */ protected static function values(): array { return [ diff --git a/app/Http/Controllers/Auth/ConfirmPasswordController.php b/app/Http/Controllers/Auth/ConfirmPasswordController.php index f6112b2..af3a5e4 100644 --- a/app/Http/Controllers/Auth/ConfirmPasswordController.php +++ b/app/Http/Controllers/Auth/ConfirmPasswordController.php @@ -8,6 +8,8 @@ use Illuminate\Foundation\Auth\ConfirmsPasswords; class ConfirmPasswordController extends Controller { + use ConfirmsPasswords; + /* |-------------------------------------------------------------------------- | Confirm Password Controller @@ -18,7 +20,6 @@ class ConfirmPasswordController extends Controller | this trait and override any functions that require customization. | */ - use ConfirmsPasswords; /** * Where to redirect users when the intended url fails. diff --git a/app/Http/Controllers/Auth/ForgotPasswordController.php b/app/Http/Controllers/Auth/ForgotPasswordController.php index 75ef4e6..b68fe6d 100644 --- a/app/Http/Controllers/Auth/ForgotPasswordController.php +++ b/app/Http/Controllers/Auth/ForgotPasswordController.php @@ -7,6 +7,8 @@ use Illuminate\Foundation\Auth\SendsPasswordResetEmails; class ForgotPasswordController extends Controller { + use SendsPasswordResetEmails; + /* |-------------------------------------------------------------------------- | Password Reset Controller @@ -17,5 +19,6 @@ class ForgotPasswordController extends Controller | your application to your users. Feel free to explore this trait. | */ - use SendsPasswordResetEmails; + + // On fait rien. } diff --git a/app/Http/Controllers/Auth/LoginController.php b/app/Http/Controllers/Auth/LoginController.php index 74705c8..2e25fd4 100644 --- a/app/Http/Controllers/Auth/LoginController.php +++ b/app/Http/Controllers/Auth/LoginController.php @@ -28,6 +28,8 @@ use Illuminate\Foundation\Auth\AuthenticatesUsers; */ class LoginController extends Controller { + use AuthenticatesUsers; + /* |-------------------------------------------------------------------------- | Login Controller @@ -38,7 +40,6 @@ class LoginController extends Controller | to conveniently provide its functionality to your applications. | */ - use AuthenticatesUsers; /** * Where to redirect users after login. diff --git a/app/Http/Controllers/Auth/RegisterController.php b/app/Http/Controllers/Auth/RegisterController.php index 15cb0fa..d9cb3be 100644 --- a/app/Http/Controllers/Auth/RegisterController.php +++ b/app/Http/Controllers/Auth/RegisterController.php @@ -11,6 +11,8 @@ use Illuminate\Support\Facades\Validator; class RegisterController extends Controller { + use RegistersUsers; + /* |-------------------------------------------------------------------------- | Register Controller @@ -21,7 +23,6 @@ class RegisterController extends Controller | provide this functionality without requiring any additional code. | */ - use RegistersUsers; /** * Where to redirect users after registration. diff --git a/app/Http/Controllers/Auth/ResetPasswordController.php b/app/Http/Controllers/Auth/ResetPasswordController.php index fa4081b..9f994b1 100644 --- a/app/Http/Controllers/Auth/ResetPasswordController.php +++ b/app/Http/Controllers/Auth/ResetPasswordController.php @@ -8,6 +8,8 @@ use Illuminate\Foundation\Auth\ResetsPasswords; class ResetPasswordController extends Controller { + use ResetsPasswords; + /* |-------------------------------------------------------------------------- | Password Reset Controller @@ -18,7 +20,6 @@ class ResetPasswordController extends Controller | explore this trait and override any methods you wish to tweak. | */ - use ResetsPasswords; /** * Where to redirect users after resetting their password. diff --git a/app/Http/Controllers/Auth/VerificationController.php b/app/Http/Controllers/Auth/VerificationController.php index 74ab841..36666ec 100644 --- a/app/Http/Controllers/Auth/VerificationController.php +++ b/app/Http/Controllers/Auth/VerificationController.php @@ -8,6 +8,8 @@ use Illuminate\Foundation\Auth\VerifiesEmails; class VerificationController extends Controller { + use VerifiesEmails; + /* |-------------------------------------------------------------------------- | Email Verification Controller @@ -18,7 +20,6 @@ class VerificationController extends Controller | be re-sent if the user didn't receive the original email message. | */ - use VerifiesEmails; /** * Where to redirect users after verification. diff --git a/app/Http/Controllers/Bo/AdviceController.php b/app/Http/Controllers/Bo/AdviceController.php index a91534a..679e0e9 100644 --- a/app/Http/Controllers/Bo/AdviceController.php +++ b/app/Http/Controllers/Bo/AdviceController.php @@ -12,10 +12,11 @@ class AdviceController extends Controller /** * Show the form for editing the specified resource. * - * @param Advice $advice + * @param Advice $advice * @return \Illuminate\Http\Response + * + * @phpcs:disable Generic.CodeAnalysis.UnusedFunctionParameter.FoundInExtendedClass */ - // phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter.FoundInExtendedClass public function edit(Advice $advice) { return view('back.advice.edit', compact('advice')); diff --git a/app/Http/Controllers/Bo/EncartsController.php b/app/Http/Controllers/Bo/EncartsController.php index 98867f1..f0c63c0 100644 --- a/app/Http/Controllers/Bo/EncartsController.php +++ b/app/Http/Controllers/Bo/EncartsController.php @@ -12,10 +12,11 @@ class EncartsController extends Controller /** * Show the form for editing the specified resource. * - * @param Encart $encart + * @param Encart $encart * @return \Illuminate\Http\Response + * + * @phpcs:disable Generic.CodeAnalysis.UnusedFunctionParameter.FoundInExtendedClass */ - //phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter.FoundInExtendedClass public function edit(Encart $encart) { return view('back.encarts.edit', compact('encart')); diff --git a/app/Http/Controllers/Bo/GammesController.php b/app/Http/Controllers/Bo/GammesController.php index 403652d..6295de8 100644 --- a/app/Http/Controllers/Bo/GammesController.php +++ b/app/Http/Controllers/Bo/GammesController.php @@ -36,10 +36,12 @@ class GammesController extends Controller /** * Show the form for creating a new resource. * - * @param Gamme $gamme + * @param Gamme $gamme + * * @return \Illuminate\Http\Response + * + * @phpcs:disable Generic.CodeAnalysis.UnusedFunctionParameter.FoundInExtendedClass */ - // phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter.FoundInExtendedClass public function create(Gamme $gamme) { $parentGammes = Gamme::whereNull('parent_gamme_id') @@ -53,7 +55,8 @@ class GammesController extends Controller * Store a newly created resource in storage. * * @param \Illuminate\Http\StoreGammeRequest $request - * @return \Illuminate\Http\Response + * + * @return \Illuminate\Http\RedirectResponse */ public function store(StoreGammeRequest $request) { @@ -74,10 +77,12 @@ class GammesController extends Controller /** * Show the form for editing the specified resource. * - * @param Gamme $gamme + * @param Gamme $gamme + * * @return \Illuminate\Http\Response + * + * @phpcs:disable Generic.CodeAnalysis.UnusedFunctionParameter.FoundInExtendedClass */ - // phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter.FoundInExtendedClass public function edit(Gamme $gamme) { $parentGammes = Gamme::whereNull('parent_gamme_id') @@ -90,9 +95,10 @@ class GammesController extends Controller /** * Update the specified resource in storage. * - * @param \Illuminate\Http\UpdateGammeRequest $request * @param Gamme $gamme - * @return \Illuminate\Http\Response + * @param \Illuminate\Http\UpdateGammeRequest $request + * + * @return \Illuminate\Http\RedirectResponse */ public function update(Gamme $gamme, UpdateGammeRequest $request) { diff --git a/app/Http/Controllers/Bo/HomeController.php b/app/Http/Controllers/Bo/HomeController.php index e5dc521..962d39e 100644 --- a/app/Http/Controllers/Bo/HomeController.php +++ b/app/Http/Controllers/Bo/HomeController.php @@ -6,7 +6,11 @@ use App\Http\Controllers\Controller; class HomeController extends Controller { - // BO + /** + * BO Home View + * + * @return \Illuminate\Contracts\View\View + */ public function home() { return view('back.home'); diff --git a/app/Http/Controllers/Bo/MomentsController.php b/app/Http/Controllers/Bo/MomentsController.php index 7cae140..a927382 100644 --- a/app/Http/Controllers/Bo/MomentsController.php +++ b/app/Http/Controllers/Bo/MomentsController.php @@ -24,10 +24,11 @@ class MomentsController extends Controller /** * Show the form for editing the specified resource. * - * @param Moment $moment + * @param Moment $moment * @return \Illuminate\Http\Response + * + * @phpcs:disable Generic.CodeAnalysis.UnusedFunctionParameter.FoundInExtendedClass */ - //phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter.FoundInExtendedClass public function edit(Moment $moment) { return view('back.moments.edit', compact('moment')); diff --git a/app/Http/Controllers/Bo/PictoBrandsController.php b/app/Http/Controllers/Bo/PictoBrandsController.php index 56a72a5..8da642d 100644 --- a/app/Http/Controllers/Bo/PictoBrandsController.php +++ b/app/Http/Controllers/Bo/PictoBrandsController.php @@ -25,10 +25,11 @@ class PictoBrandsController extends Controller /** * Show the form for creating a new resource. * - * @param PictoBrand $pictobrand + * @param PictoBrand $pictobrand * @return \Illuminate\Http\Response + * + * @phpcs:disable Generic.CodeAnalysis.UnusedFunctionParameter.FoundInExtendedClass */ - // phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter.FoundInExtendedClass public function create(PictoBrand $pictobrand) { return view('back.pictobrands.create', compact('pictobrand')); @@ -58,10 +59,11 @@ class PictoBrandsController extends Controller /** * Show the form for editing the specified resource. * - * @param PictoBrand $pictobrand + * @param PictoBrand $pictobrand * @return \Illuminate\Http\Response + * + * @phpcs:disable Generic.CodeAnalysis.UnusedFunctionParameter.FoundInExtendedClass */ - // phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter.FoundInExtendedClass public function edit(PictoBrand $pictobrand) { return view('back.pictobrands.edit', compact('pictobrand')); diff --git a/app/Http/Controllers/Bo/PictosController.php b/app/Http/Controllers/Bo/PictosController.php index 22449d0..5ca867c 100644 --- a/app/Http/Controllers/Bo/PictosController.php +++ b/app/Http/Controllers/Bo/PictosController.php @@ -14,6 +14,8 @@ class PictosController extends Controller /** * Display a listing of the resource. * + * @param Page $page + * * @return \Illuminate\Http\Response */ public function index(Page $page) @@ -26,10 +28,11 @@ class PictosController extends Controller /** * Show the form for creating a new resource. * - * @param Picto $picto + * @param Picto $picto * @return \Illuminate\Http\Response + * + * @phpcs:disable Generic.CodeAnalysis.UnusedFunctionParameter.FoundInExtendedClass */ - // phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter.FoundInExtendedClass public function create(Picto $picto) { return view('back.pictos.create', compact('picto')); @@ -47,8 +50,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()) { @@ -60,10 +63,11 @@ class PictosController extends Controller /** * Show the form for editing the specified resource. * - * @param Picto $picto + * @param Picto $picto * @return \Illuminate\Http\Response + * + * @phpcs:disable Generic.CodeAnalysis.UnusedFunctionParameter.FoundInExtendedClass */ - // phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter.FoundInExtendedClass public function edit(Picto $picto) { return view('back.pictos.edit', compact('picto')); diff --git a/app/Http/Controllers/Bo/PostsController.php b/app/Http/Controllers/Bo/PostsController.php index 8241b7f..6219256 100644 --- a/app/Http/Controllers/Bo/PostsController.php +++ b/app/Http/Controllers/Bo/PostsController.php @@ -11,7 +11,7 @@ use App\Models\Post; class PostsController extends Controller { /** - * Display a listing of the resource. + * Display the posts view. * * @return \Illuminate\Http\Response */ @@ -25,10 +25,10 @@ class PostsController extends Controller /** * Show the form for creating a new resource. * - * @param Post $post + * @param Post $post * @return \Illuminate\Http\Response + * @phpcs:disable Generic.CodeAnalysis.UnusedFunctionParameter.FoundInExtendedClass */ - // phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter.FoundInExtendedClass public function create(Post $post) { return view('back.posts.create', compact('post')); @@ -63,10 +63,11 @@ class PostsController extends Controller /** * Show the form for editing the specified resource. * - * @param Post $post + * @param Post $post * @return \Illuminate\Http\Response + * + * @phpcs:disable Generic.CodeAnalysis.UnusedFunctionParameter.FoundInExtendedClass */ - // phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter.FoundInExtendedClass public function edit(Post $post) { return view('back.posts.edit', compact('post')); @@ -75,8 +76,8 @@ class PostsController extends Controller /** * Update the specified resource in storage. * - * @param \Illuminate\Http\UpdatePostRequest $request * @param Post $post + * @param \Illuminate\Http\UpdatePostRequest $request * @return \Illuminate\Http\Response */ public function update(Post $post, UpdatePostRequest $request) diff --git a/app/Http/Controllers/Bo/ProductsController.php b/app/Http/Controllers/Bo/ProductsController.php index 00e73b6..1262a0b 100644 --- a/app/Http/Controllers/Bo/ProductsController.php +++ b/app/Http/Controllers/Bo/ProductsController.php @@ -26,14 +26,16 @@ class ProductsController extends Controller /** * Show the form for creating a new resource. * - * @param Product $product - * @return \Illuminate\Http\Response + * @param Product $product + * + * @return \Illuminate\Contracts\View\View + * + * @phpcs:disable Generic.CodeAnalysis.UnusedFunctionParameter.FoundInExtendedClass */ - // phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter.FoundInExtendedClass public function create(Product $product) { $gammes = Gamme::all()->sortBy('title'); - // default structure + produits + // Default structure + produits. $tabFour = array( 'id' => 0, 'name' => 'Four', @@ -162,10 +164,11 @@ class ProductsController extends Controller /** * Show the form for editing the specified resource. * - * @param Product $product + * @param Product $product * @return \Illuminate\Http\Response + * + * @phpcs:disable Generic.CodeAnalysis.UnusedFunctionParameter.FoundInExtendedClass */ - // phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter.FoundInExtendedClass public function edit(Product $product) { $gammes = Gamme::all()->sortBy('title'); @@ -181,9 +184,9 @@ class ProductsController extends Controller */ 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 +194,20 @@ class ProductsController extends Controller } foreach ($plusproduit as $plus) { - // boucle pour stockage des images uploadées + // 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) diff --git a/app/Http/Controllers/Bo/SeoDataController.php b/app/Http/Controllers/Bo/SeoDataController.php index 35e94b4..4ba9253 100644 --- a/app/Http/Controllers/Bo/SeoDataController.php +++ b/app/Http/Controllers/Bo/SeoDataController.php @@ -11,10 +11,11 @@ class SeoDataController extends Controller /** * Show the form for editing the specified resource. * - * @param \App\Models\SeoDatum $SeoDatum + * @param \App\Models\SeoDatum $SeoDatum * @return \Illuminate\Http\Response + * + * @phpcs:disable Generic.CodeAnalysis.UnusedFunctionParameter.FoundInExtendedClass */ - //phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter.FoundInExtendedClass public function edit(SeoDatum $SeoDatum) { return view('back.seo_data.edit', compact('SeoDatum')); diff --git a/app/Http/Controllers/Bo/SlidersController.php b/app/Http/Controllers/Bo/SlidersController.php index 31788ed..c9568dd 100644 --- a/app/Http/Controllers/Bo/SlidersController.php +++ b/app/Http/Controllers/Bo/SlidersController.php @@ -24,10 +24,11 @@ class SlidersController extends Controller /** * Show the form for creating a new resource. * - * @param Slider $slider + * @param Slider $slider * @return \Illuminate\Http\Response + * + * @phpcs:disable Generic.CodeAnalysis.UnusedFunctionParameter.FoundInExtendedClass */ - //phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter.FoundInExtendedClass public function create(Slider $slider) { return view('back.sliders.create', compact('slider')); @@ -52,10 +53,11 @@ class SlidersController extends Controller /** * Show the form for editing the specified resource. * - * @param Slider $slider + * @param Slider $slider * @return \Illuminate\Http\Response + * + * @phpcs:disable Generic.CodeAnalysis.UnusedFunctionParameter.FoundInExtendedClass */ - //phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter.FoundInExtendedClass public function edit(Slider $slider) { return view('back.sliders.edit', compact('slider')); diff --git a/app/Http/Controllers/Bo/SlidesController.php b/app/Http/Controllers/Bo/SlidesController.php index 94f8ad7..67a2d4e 100644 --- a/app/Http/Controllers/Bo/SlidesController.php +++ b/app/Http/Controllers/Bo/SlidesController.php @@ -25,10 +25,10 @@ class SlidesController extends Controller /** * Show the form for creating a new resource. * - * @param Slide $slide + * @param Slide $slide * @return \Illuminate\Http\Response + * @phpcs:disable Generic.CodeAnalysis.UnusedFunctionParameter.FoundInExtendedClass */ - // phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter.FoundInExtendedClass public function create(Slide $slide) { $sliders = Slider::all(); @@ -58,10 +58,10 @@ class SlidesController extends Controller /** * Show the form for editing the specified resource. * - * @param Slide $slide + * @param Slide $slide * @return \Illuminate\Http\Response + * phpcs:disable Generic.CodeAnalysis.UnusedFunctionParameter.FoundInExtendedClass */ - // phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter.FoundInExtendedClass public function edit(Slide $slide) { $sliders = Slider::all(); @@ -105,7 +105,15 @@ class SlidesController extends Controller return redirect()->route('bo.slides.index')->with('success', trans('Suppression faite avec succès')); } - public function changeOrder(Slide $slide, $action) + /** + * change order for a slide + * + * @param Slide $slide + * @param string $action + * + * @return \Illuminate\Http\RedirectResponse + */ + public function changeOrder(Slide $slide, string $action) { if ($action === 'up') { $tmp = Slide::where('order', '<', $slide->order)->orderBy('order', 'DESC')->first(); @@ -126,6 +134,8 @@ class SlidesController extends Controller /** * retreive order position to put a new slide to + * + * @return integer */ private function getLastOrder() { diff --git a/app/Http/Controllers/Bo/TextsController.php b/app/Http/Controllers/Bo/TextsController.php index c47d9bc..5b85284 100644 --- a/app/Http/Controllers/Bo/TextsController.php +++ b/app/Http/Controllers/Bo/TextsController.php @@ -24,10 +24,11 @@ class TextsController extends Controller /** * Show the form for creating a new resource. * - * @param Text $text + * @param Text $text * @return \Illuminate\Http\Response + * + * @phpcs:disable Generic.CodeAnalysis.UnusedFunctionParameter.FoundInExtendedClass */ - // phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter.FoundInExtendedClass public function create(Text $text) { return view('back.texts.create', compact('text')); @@ -57,10 +58,11 @@ class TextsController extends Controller /** * Show the form for editing the specified resource. * - * @param Text $text + * @param Text $text * @return \Illuminate\Http\Response + * + * @phpcs:disable Generic.CodeAnalysis.UnusedFunctionParameter.FoundInExtendedClass */ - // phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter.FoundInExtendedClass public function edit(Text $text) { return view('back.texts.edit', compact('text')); @@ -69,8 +71,8 @@ class TextsController extends Controller /** * Update the specified resource in storage. * - * @param \Illuminate\Http\StoreTextRequest $request * @param Text $text + * @param \Illuminate\Http\StoreTextRequest $request * @return \Illuminate\Http\Response */ public function update(Text $text, StoreTextRequest $request) diff --git a/app/Http/Controllers/Bo/TitlesController.php b/app/Http/Controllers/Bo/TitlesController.php index c33a8fe..e75cded 100644 --- a/app/Http/Controllers/Bo/TitlesController.php +++ b/app/Http/Controllers/Bo/TitlesController.php @@ -11,10 +11,11 @@ class TitlesController extends Controller /** * Show the form for editing the specified resource. * - * @param Title $title + * @param Title $title * @return \Illuminate\Http\Response + * + * @phpcs:disable Generic.CodeAnalysis.UnusedFunctionParameter.FoundInExtendedClass */ - // phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter.FoundInExtendedClass public function edit(Title $title) { return view('back.titles.edit', compact('title')); diff --git a/app/Http/Controllers/ContactController.php b/app/Http/Controllers/ContactController.php index 265a09d..6f26c25 100644 --- a/app/Http/Controllers/ContactController.php +++ b/app/Http/Controllers/ContactController.php @@ -8,11 +8,22 @@ use Illuminate\Support\Facades\Mail; class ContactController extends Controller { + /** + * Show the contact view. + * + * @return \Illuminate\Contracts\View\View + */ public function contact() { return view('front.contact'); } + /** + * Send mail when submit the form. + * + * @param ContactFormRequest $request + * @return \Illuminate\Http\RedirectResponse + */ public function contactSubmit(ContactFormRequest $request) { Mail::to(config('mail.contactsList.contactform'))->send(new SendContactMail($request->validated())); diff --git a/app/Http/Controllers/Controller.php b/app/Http/Controllers/Controller.php index 8d6c82b..8b05f8c 100644 --- a/app/Http/Controllers/Controller.php +++ b/app/Http/Controllers/Controller.php @@ -14,6 +14,9 @@ class Controller extends BaseController use DispatchesJobs; use ValidatesRequests; + /** + * Perform any actions required when creating the object. + */ public function __construct() { view()->share('availableCountries', Country::toArray()); diff --git a/app/Http/Controllers/FoodServiceController.php b/app/Http/Controllers/FoodServiceController.php index 7633f06..cf4d29a 100644 --- a/app/Http/Controllers/FoodServiceController.php +++ b/app/Http/Controllers/FoodServiceController.php @@ -11,6 +11,11 @@ use App\Models\Title; class FoodServiceController extends Controller { + /** + * Show the FoodService view. + * + * @return \Illuminate\Contracts\View\View + */ public function index() { $page = Page::foodservice(); diff --git a/app/Http/Controllers/GammesController.php b/app/Http/Controllers/GammesController.php index 5fc8fb2..1525d38 100644 --- a/app/Http/Controllers/GammesController.php +++ b/app/Http/Controllers/GammesController.php @@ -9,10 +9,15 @@ use App\Models\SeoDatum; class GammesController extends Controller { + /** + * Show the Gammes view. + * + * @return \Illuminate\Contracts\View\View + */ 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'); $nb_gammes = $gammes->count(); @@ -23,6 +28,13 @@ class GammesController extends Controller return view('front.gammes.index', compact('gammes', 'nb_gammes', 'seoDatum')); } + /** + * Show one Gamme + * + * @param Gamme $gamme + * + * @return \Illuminate\Contracts\View\View + */ public function show(Gamme $gamme) { $gammes = collect([]); @@ -43,7 +55,7 @@ class GammesController extends Controller ->orderBy('name') ->get(); - // make ghost seoDatum from the gamme + // Make ghost seoDatum from the gamme. $seoDatum = new SeoDatum(); $seoDatum->title = $gamme->title; $seoDatum->description = $gamme->text; diff --git a/app/Http/Controllers/HomeController.php b/app/Http/Controllers/HomeController.php index f3807e7..fef0541 100644 --- a/app/Http/Controllers/HomeController.php +++ b/app/Http/Controllers/HomeController.php @@ -13,6 +13,11 @@ use Illuminate\Support\Carbon; class HomeController extends Controller { + /** + * Show the Homepage view. + * + * @return \Illuminate\Contracts\View\View + */ public function index() { @@ -46,7 +51,7 @@ class HomeController extends Controller ['date_end', '>', Carbon::now()->format('Y-m-d H:i:s')], ['on_top', true] ])->first(); - // Limitation à 3 produits affichés sur la homepage + // Limitation à 3 produits affichés sur la homepage. $products_home = Product::where('is_on_top', true)->take(3)->get(); return view('front.home', compact('slider', 'slides', 'seoDatum', 'encart_home', 'post_home', 'products_home')); diff --git a/app/Http/Controllers/LegalsController.php b/app/Http/Controllers/LegalsController.php index 120cfcd..a31bc1d 100644 --- a/app/Http/Controllers/LegalsController.php +++ b/app/Http/Controllers/LegalsController.php @@ -8,11 +8,16 @@ use App\Models\Text; class LegalsController extends Controller { + /** + * Show the legal disclaimer view. + * + * @return \Illuminate\Contracts\View\View + */ public function index() { $mentions_legales = Text::where('page', Page::mentions()->value)->first(); - // make ghost seoDatum from the gamme + // Make ghost seoDatum from the gamme. $seoDatum = new SeoDatum(); $seoDatum->title = $mentions_legales->title; diff --git a/app/Http/Controllers/MarqueController.php b/app/Http/Controllers/MarqueController.php index 2404ea5..4a63d5e 100644 --- a/app/Http/Controllers/MarqueController.php +++ b/app/Http/Controllers/MarqueController.php @@ -12,6 +12,11 @@ use App\Models\Title; class MarqueController extends Controller { + /** + * Show the Marque view. + * + * @return \Illuminate\Contracts\View\View + */ public function index() { $page = Page::marque(); diff --git a/app/Http/Controllers/NewsController.php b/app/Http/Controllers/NewsController.php index c95c65c..0d50c7b 100644 --- a/app/Http/Controllers/NewsController.php +++ b/app/Http/Controllers/NewsController.php @@ -13,6 +13,11 @@ use Illuminate\Support\Carbon; class NewsController extends Controller { + /** + * Show the News view. + * + * @return \Illuminate\Contracts\View\View + */ public function index() { $page = Page::news(); diff --git a/app/Http/Controllers/PolicyController.php b/app/Http/Controllers/PolicyController.php index 1ec4601..5a3ee59 100644 --- a/app/Http/Controllers/PolicyController.php +++ b/app/Http/Controllers/PolicyController.php @@ -8,11 +8,16 @@ use App\Models\Text; class PolicyController extends Controller { + /** + * Show the Privacy policy view. + * + * @return \Illuminate\Contracts\View\View + */ public function index() { $privacy_policy = Text::where('page', Page::charte()->value)->first(); - // make ghost seoDatum from the gamme + // Make ghost seoDatum from the gamme. $seoDatum = new SeoDatum(); $seoDatum->title = $privacy_policy->title; diff --git a/app/Http/Controllers/ProductsController.php b/app/Http/Controllers/ProductsController.php index be5558d..3984905 100644 --- a/app/Http/Controllers/ProductsController.php +++ b/app/Http/Controllers/ProductsController.php @@ -9,7 +9,14 @@ use Illuminate\Http\Request; class ProductsController extends Controller { - // phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter.FoundInExtendedClassBeforeLastUsed + /** + * Show one product + * + * @param Gamme $gamme + * @param Product $product + * @return \Illuminate\Contracts\View\View + * @phpcs:disable Generic.CodeAnalysis.UnusedFunctionParameter.FoundInExtendedClassBeforeLastUsed + */ public function show(Gamme $gamme, Product $product) { $seoDatum = new SeoDatum(); @@ -19,6 +26,12 @@ class ProductsController extends Controller return view('front.product', compact('product', 'gamme', 'seoDatum')); } + /** + * Display a list of products resulting from search query + * + * @param \Illuminate\Http\Request $request + * @return \Illuminate\Contracts\View\View + */ public function search(Request $request) { $filter = $request->query('filter'); diff --git a/app/Http/Controllers/TranslationController.php b/app/Http/Controllers/TranslationController.php deleted file mode 100644 index ab86e78..0000000 --- a/app/Http/Controllers/TranslationController.php +++ /dev/null @@ -1,23 +0,0 @@ -full() !== url()->previous()) { - return redirect()->back(); - } - return redirect()->route('home'); - } -} diff --git a/app/Http/Kernel.php b/app/Http/Kernel.php index 7ae6f2f..2299fc3 100644 --- a/app/Http/Kernel.php +++ b/app/Http/Kernel.php @@ -36,6 +36,7 @@ class Kernel extends HttpKernel \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class, \Illuminate\Session\Middleware\StartSession::class, \Illuminate\View\Middleware\ShareErrorsFromSession::class, + 'lang-check', \App\Http\Middleware\VerifyCsrfToken::class, \Illuminate\Routing\Middleware\SubstituteBindings::class, ], diff --git a/app/Http/Middleware/Authenticate.php b/app/Http/Middleware/Authenticate.php index e7cc52d..ce0d636 100644 --- a/app/Http/Middleware/Authenticate.php +++ b/app/Http/Middleware/Authenticate.php @@ -14,6 +14,7 @@ namespace App\Http\Middleware; use Illuminate\Auth\Middleware\Authenticate as Middleware; +use Illuminate\Http\Request; /** * Undocumented class @@ -29,11 +30,10 @@ class Authenticate extends Middleware /** * Get the path the user should be redirected to when they are not authenticated. * - * @param \Illuminate\Http\Request $request La requête - * + * @param \Illuminate\Http\Request $request * @return string|null */ - protected function redirectTo($request) + protected function redirectTo(Request $request) { if (!$request->expectsJson()) { return route('bo.login'); diff --git a/app/Http/Middleware/BackEndGlobals.php b/app/Http/Middleware/BackEndGlobals.php index cddb249..03a39a3 100644 --- a/app/Http/Middleware/BackEndGlobals.php +++ b/app/Http/Middleware/BackEndGlobals.php @@ -17,8 +17,8 @@ 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) diff --git a/app/Http/Middleware/FrontEndGlobals.php b/app/Http/Middleware/FrontEndGlobals.php index 20b80ed..a7c001d 100644 --- a/app/Http/Middleware/FrontEndGlobals.php +++ b/app/Http/Middleware/FrontEndGlobals.php @@ -4,21 +4,23 @@ namespace App\Http\Middleware; use Illuminate\Support\Facades\View; use Closure; +use Illuminate\Database\Eloquent\Model; use Illuminate\Http\Request; use Illuminate\Support\Facades\Route; +use Spatie\Translatable\HasTranslations; 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 + // Header menu. $currentRoute = Route::current()->getName(); $routeParamsFR = Route::current()->parameters(); $routeParamsEN = $routeParamsFR; @@ -46,10 +48,21 @@ class FrontEndGlobals return $next($request); } - public function unbind(&$item, $k, $lang) + /** + * Switch locale for translatable models + * + * @param \Illuminate\Database\Eloquent\Model $item + * @param string $key + * @param string $locale + * @return void + * @phpcs:disable Generic.CodeAnalysis.UnusedFunctionParameter.FoundBeforeLastUsed + */ + private function unbind(Model &$item, string $key, string $locale) { - if ($k == 'gammeSlug' || $k == 'productSlug') { - $item = $item->getTranslation('slug', $lang); + // phpcs:enable + $classUses = class_uses($item); + if ($classUses and (\in_array(HasTranslations::class, $classUses))) { + $item = (clone $item)->setLocale($locale); } } } diff --git a/app/Http/Middleware/LangCheck.php b/app/Http/Middleware/LangCheck.php index 25eeac8..0fa7bd6 100644 --- a/app/Http/Middleware/LangCheck.php +++ b/app/Http/Middleware/LangCheck.php @@ -9,7 +9,13 @@ use Illuminate\Support\Facades\View; class LangCheck { + /** + * The available languages. + * + * @var array + */ protected $langs = ['fr','en','es']; + /** * Handle an incoming request. * @@ -22,24 +28,24 @@ 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; @@ -62,49 +68,56 @@ class LangCheck $sess_lang = $request->session()->get('lang', config('app.locale')); app()->setLocale($sess_lang); + config(['app.locale' => $sess_lang]); $routePrefixer = ""; if ($sess_lang != 'fr') { $routePrefixer = $sess_lang . '.'; } View::share('routeprefixer', $routePrefixer); - return $next($request); } /** + * Register Current user choice for language * + * @param string $lang + * @param \Illuminate\Http\Request $request + * + * @return void */ - private function saveUserLocale($lang, Request $request) + private function saveUserLocale(string $lang, Request $request) { - // Set cookie + // Set cookie. Cookie::queue(Cookie::forever('language', strtolower($lang))); - // set session + // Set session. $request->session()->put('lang', strtolower($lang)); } /** * checks if we have saved locale info for current user * if not find then save that locale + * @param \Illuminate\Http\Request $request + * * @return boolean */ 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/Requests/StorePostRequest.php b/app/Http/Requests/StorePostRequest.php index b89b81c..49f8324 100644 --- a/app/Http/Requests/StorePostRequest.php +++ b/app/Http/Requests/StorePostRequest.php @@ -5,6 +5,7 @@ namespace App\Http\Requests; use Carbon\Exceptions\InvalidFormatException; use Illuminate\Foundation\Http\FormRequest; use Illuminate\Support\Carbon; +use Illuminate\Validation\ValidationException; class StorePostRequest extends FormRequest { @@ -14,6 +15,18 @@ class StorePostRequest extends FormRequest * @return boolean */ public function authorize() + { + return auth()->check(); + } + + /** + * Prepare the data for validation. + * + * @return void + * + * @throws ValidationException When prepare merge fails to parse dates. + */ + protected function prepareForValidation() { try { $this->merge([ @@ -21,12 +34,13 @@ class StorePostRequest extends FormRequest 'date_end' => Carbon::parse("$this->date_end_date $this->date_end_time:00")->toDateTimeString(), 'on_top' => $this->on_top ? true : false, ]); - // phpcs:ignore Generic.CodeAnalysis.EmptyStatement.DetectedCatch } catch (InvalidFormatException $e) { - // On fait rien + $error = ValidationException::withMessages([ + 'date_start_date' => ['Format de date incorrect'], + 'date_end_date' => ['Format de date incorrect'], + ]); + throw $error; } - - return auth()->check(); } /** diff --git a/app/Http/Requests/StoreProductRequest.php b/app/Http/Requests/StoreProductRequest.php index f99acd1..fe831dd 100644 --- a/app/Http/Requests/StoreProductRequest.php +++ b/app/Http/Requests/StoreProductRequest.php @@ -3,7 +3,6 @@ namespace App\Http\Requests; use App\Models\Gamme; -use Carbon\Exceptions\InvalidFormatException; use Illuminate\Foundation\Http\FormRequest; use Illuminate\Support\Str; @@ -23,142 +22,136 @@ class StoreProductRequest extends FormRequest * Prepare the data for validation. * * @return void + * @phpcs:disable Generic.Metrics.CyclomaticComplexity.TooHigh */ - //phpcs:ignore Generic.Metrics.CyclomaticComplexity.TooHigh protected function prepareForValidation() { - try { - $tabFour = array( - 'id' => 0, - 'name' => 'Four', - 'url' => '/assets/images/four.png', - 'time' => $this->time_cook0, - 'temp' => $this->temp_cook0, - 'status' => $this->is_activated0 ? true : false - ); - $tabFriteuse = array( - 'id' => 1, - 'name' => 'Friteuse', - 'url' => '/assets/images/friteuse.png', - 'time' => $this->time_cook1, - 'temp' => $this->temp_cook1, - 'status' => $this->is_activated1 ? true : false - ); - $tabPoele = array( - 'id' => 2, - 'name' => 'Poêle', - 'url' => '/assets/images/poele.png', - 'time' => $this->time_cook2, - 'temp' => $this->temp_cook2, - 'status' => $this->is_activated2 ? true : false - ); - $tabCocotte = array( - 'id' => 3, - 'name' => 'Cocotte', - 'url' => '/assets/images/cocotte.png', - 'time' => $this->time_cook3, - 'temp' => $this->temp_cook3, - 'status' => $this->is_activated3 ? true : false - ); - $tabPlancha = array( - 'id' => 4, - 'name' => 'Plancha', - 'url' => '/assets/images/plancha.png', - 'time' => $this->time_cook4, - 'temp' => $this->temp_cook4, - 'status' => $this->is_activated4 ? true : false - ); - $tabBainMarie = array( - 'id' => 5, - 'name' => 'Bain Marie', - 'url' => '/assets/images/bainmarie.png', - 'time' => $this->time_cook5, - 'temp' => $this->temp_cook5, - 'status' => $this->is_activated5 ? true : false - ); - $tabBarbecue = array( - 'id' => 6, - 'name' => 'Barbecue', - 'url' => '/assets/images/barbecue.png', - 'time' => $this->time_cook6, - 'temp' => $this->temp_cook6, - 'status' => $this->is_activated6 ? true : false - ); - $tabMicroOndes = array( - 'id' => 7, - 'name' => 'Micro Ondes', - 'url' => '/assets/images/micro-onde.png', - 'time' => $this->time_cook7, - 'temp' => $this->temp_cook7, - 'status' => $this->is_activated7 ? true : false - ); - $tabCasserole = array( - 'id' => 8, - 'name' => 'Casserole', - 'url' => '/assets/images/casserole.png', - 'time' => $this->time_cook8, - 'temp' => $this->temp_cook8, - 'status' => $this->is_activated8 ? true : false - ); - $tabCuisson = json_encode([ - 'four' => $tabFour, - 'friteuse' => $tabFriteuse, - 'poele' => $tabPoele, - 'cocotte' => $tabCocotte, - 'plancha' => $tabPlancha, - 'bainmarie' => $tabBainMarie, - 'barbecue' => $tabBarbecue, - 'microondes' => $tabMicroOndes, - 'casserole' => $tabCasserole - ]); + $tabFour = array( + 'id' => 0, + 'name' => 'Four', + 'url' => '/assets/images/four.png', + 'time' => $this->time_cook0, + 'temp' => $this->temp_cook0, + 'status' => $this->is_activated0 ? true : false + ); + $tabFriteuse = array( + 'id' => 1, + 'name' => 'Friteuse', + 'url' => '/assets/images/friteuse.png', + 'time' => $this->time_cook1, + 'temp' => $this->temp_cook1, + 'status' => $this->is_activated1 ? true : false + ); + $tabPoele = array( + 'id' => 2, + 'name' => 'Poêle', + 'url' => '/assets/images/poele.png', + 'time' => $this->time_cook2, + 'temp' => $this->temp_cook2, + 'status' => $this->is_activated2 ? true : false + ); + $tabCocotte = array( + 'id' => 3, + 'name' => 'Cocotte', + 'url' => '/assets/images/cocotte.png', + 'time' => $this->time_cook3, + 'temp' => $this->temp_cook3, + 'status' => $this->is_activated3 ? true : false + ); + $tabPlancha = array( + 'id' => 4, + 'name' => 'Plancha', + 'url' => '/assets/images/plancha.png', + 'time' => $this->time_cook4, + 'temp' => $this->temp_cook4, + 'status' => $this->is_activated4 ? true : false + ); + $tabBainMarie = array( + 'id' => 5, + 'name' => 'Bain Marie', + 'url' => '/assets/images/bainmarie.png', + 'time' => $this->time_cook5, + 'temp' => $this->temp_cook5, + 'status' => $this->is_activated5 ? true : false + ); + $tabBarbecue = array( + 'id' => 6, + 'name' => 'Barbecue', + 'url' => '/assets/images/barbecue.png', + 'time' => $this->time_cook6, + 'temp' => $this->temp_cook6, + 'status' => $this->is_activated6 ? true : false + ); + $tabMicroOndes = array( + 'id' => 7, + 'name' => 'Micro Ondes', + 'url' => '/assets/images/micro-onde.png', + 'time' => $this->time_cook7, + 'temp' => $this->temp_cook7, + 'status' => $this->is_activated7 ? true : false + ); + $tabCasserole = array( + 'id' => 8, + 'name' => 'Casserole', + 'url' => '/assets/images/casserole.png', + 'time' => $this->time_cook8, + 'temp' => $this->temp_cook8, + 'status' => $this->is_activated8 ? true : false + ); + $tabCuisson = json_encode([ + 'four' => $tabFour, + 'friteuse' => $tabFriteuse, + 'poele' => $tabPoele, + 'cocotte' => $tabCocotte, + 'plancha' => $tabPlancha, + 'bainmarie' => $tabBainMarie, + 'barbecue' => $tabBarbecue, + 'microondes' => $tabMicroOndes, + 'casserole' => $tabCasserole + ]); - $urlPlusProduit = ""; - if ($this->pictogramme0) { - $urlPlusProduit = "/assets/images/" . $this->pictogramme0->getClientOriginalName(); - } - $tabPlusProduit1 = array( - 'id' => 0, - 'name' => $this->content0, - 'url' => $urlPlusProduit, - ); - $urlPlusProduit = ""; - if ($this->pictogramme1) { - $urlPlusProduit = "/assets/images/" . $this->pictogramme1->getClientOriginalName(); - } - $tabPlusProduit2 = array( - 'id' => 1, - 'name' => $this->content1, - 'url' => $urlPlusProduit, - ); - $urlPlusProduit = ""; - if ($this->pictogramme2) { - $urlPlusProduit = "/assets/images/" . $this->pictogramme2->getClientOriginalName(); - } - $tabPlusProduit3 = array( - 'id' => 2, - 'name' => $this->content2, - 'url' => $urlPlusProduit, - ); - $tabPlusProduit = json_encode([$tabPlusProduit1, $tabPlusProduit2, $tabPlusProduit3]); - - $this->merge([ - 'slug' => Str::slug($this->name), - 'gamme_id' => - $this->is_food_service ? - Gamme::where("slug->fr", "food-service")->firstOrFail()->id : - $this->gamme_id, - 'pictos' => $tabCuisson, - 'plusproduit' => $tabPlusProduit, - 'is_published' => $this->is_published ? true : false, - 'is_on_top' => $this->is_on_top ? true : false, - 'is_news' => $this->is_news ? true : false, - 'is_food_service' => $this->is_food_service ? true : false, - 'is_halal' => $this->is_halal ? true : false, - ]); - // phpcs:ignore Generic.CodeAnalysis.EmptyStatement.DetectedCatch - } catch (InvalidFormatException $e) { - // On fait rien - }//end try + $urlPlusProduit = ""; + if ($this->pictogramme0) { + $urlPlusProduit = "/assets/images/" . $this->pictogramme0->getClientOriginalName(); + } + $tabPlusProduit1 = array( + 'id' => 0, + 'name' => $this->content0, + 'url' => $urlPlusProduit, + ); + $urlPlusProduit = ""; + if ($this->pictogramme1) { + $urlPlusProduit = "/assets/images/" . $this->pictogramme1->getClientOriginalName(); + } + $tabPlusProduit2 = array( + 'id' => 1, + 'name' => $this->content1, + 'url' => $urlPlusProduit, + ); + $urlPlusProduit = ""; + if ($this->pictogramme2) { + $urlPlusProduit = "/assets/images/" . $this->pictogramme2->getClientOriginalName(); + } + $tabPlusProduit3 = array( + 'id' => 2, + 'name' => $this->content2, + 'url' => $urlPlusProduit, + ); + $tabPlusProduit = json_encode([$tabPlusProduit1, $tabPlusProduit2, $tabPlusProduit3]); + $this->merge([ + 'slug' => Str::slug($this->name), + 'gamme_id' => + $this->is_food_service ? + Gamme::where("slug->fr", "food-service")->firstOrFail()->id : + $this->gamme_id, + 'pictos' => $tabCuisson, + 'plusproduit' => $tabPlusProduit, + 'is_published' => $this->is_published ? true : false, + 'is_on_top' => $this->is_on_top ? true : false, + 'is_news' => $this->is_news ? true : false, + 'is_food_service' => $this->is_food_service ? true : false, + 'is_halal' => $this->is_halal ? true : false, + ]); } /** diff --git a/app/Http/Requests/StoreSlideRequest.php b/app/Http/Requests/StoreSlideRequest.php index a94bcf2..309b83e 100644 --- a/app/Http/Requests/StoreSlideRequest.php +++ b/app/Http/Requests/StoreSlideRequest.php @@ -22,6 +22,8 @@ class StoreSlideRequest extends FormRequest * Prepare the data for validation. * * @return void + * + * @throws ValidationException When prepare merge fails to parse dates. */ protected function prepareForValidation() { @@ -30,9 +32,12 @@ class StoreSlideRequest extends FormRequest 'date_start' => Carbon::parse("$this->date_start_date $this->date_start_time:00")->toDateTimeString(), 'date_end' => Carbon::parse("$this->date_end_date $this->date_end_time:00")->toDateTimeString(), ]); - // phpcs:ignore Generic.CodeAnalysis.EmptyStatement.DetectedCatch } catch (InvalidFormatException $e) { - // On fait rien + $error = \Illuminate\Validation\ValidationException::withMessages([ + 'date_start_date' => ['Format de date incorrect'], + 'date_end_date' => ['Format de date incorrect'], + ]); + throw $error; } $this->merge([ 'title' => 'lorem title ' . rand(), diff --git a/app/Lib/Utils.php b/app/Lib/Utils.php index 19e6f97..5b87098 100644 --- a/app/Lib/Utils.php +++ b/app/Lib/Utils.php @@ -23,6 +23,9 @@ class Utils * @param \Illuminate\Http\UploadedFile|\SplFileInfo|string $image * @param string $folderName * @return string The storage path + * + * @throws \ErrorException If file copy fails. + * @throws Exception If didn't manage to return a file path. */ public static function storeImage($image, string $folderName): string { @@ -39,7 +42,7 @@ class Utils $image = $image; $newPath = self::prepareMoveFile($image->getBaseName(), $folderName); if (!File::copy($image->getRealPath(), $newPath)) { - throw new \Exception(sprintf( + throw new \ErrorException(sprintf( 'Failed to copy file %s to %s', $image->getRealPath(), $newPath @@ -52,6 +55,15 @@ class Utils } throw new Exception(sprintf('Cannot handle image %s', \gettype($image))); } + + /** + * Prepare storage path and return + * the image full path + * + * @param string $filename The basename for the file. + * @param string $folderName Foldername for storage. + * @return string + */ private static function prepareMoveFile(string $filename, string $folderName): string { $pathFolder = \storage_path("app/public/images/$folderName"); diff --git a/app/Mail/SendContactMail.php b/app/Mail/SendContactMail.php index abfdc38..794c86c 100644 --- a/app/Mail/SendContactMail.php +++ b/app/Mail/SendContactMail.php @@ -33,6 +33,8 @@ class SendContactMail extends Mailable /** * The form data. + * + * @var array */ protected $data; @@ -47,9 +49,11 @@ class SendContactMail extends Mailable /** * Create a new message instance. * + * @param array $data + * * @return void */ - public function __construct($data) + public function __construct(array $data) { $this->data = $data; } diff --git a/app/Models/Advice.php b/app/Models/Advice.php index dd4bb3f..4313c19 100644 --- a/app/Models/Advice.php +++ b/app/Models/Advice.php @@ -13,6 +13,11 @@ class Advice extends Model use HasFactory; use HasTranslations; + /** + * The attributes that are mass assignable. + * + * @var array + */ protected $fillable = [ 'title1', 'title2', @@ -26,6 +31,11 @@ class Advice extends Model 'text2', ]; + /** + * The attributes that are translatable. + * + * @var array + */ public $translatable = [ 'title1', 'title2', @@ -39,7 +49,12 @@ class Advice extends Model 'text2', ]; - //phpcs:ignore Generic.Metrics.CyclomaticComplexity.TooHigh + /** + * Perform any actions required after the model boots. + * + * @return void + * @phpcs:disable Generic.Metrics.CyclomaticComplexity.TooHigh + */ protected static function boot() { static::creating(function (Advice $advice) { diff --git a/app/Models/Encart.php b/app/Models/Encart.php index 4dd8794..1ea0d58 100644 --- a/app/Models/Encart.php +++ b/app/Models/Encart.php @@ -14,10 +14,20 @@ class Encart extends Model use HasFactory; use CastsEnumsHasTranslations; + /** + * Map attribute names to enum classes. + * + * @var array + */ public $enumCasts = [ 'page' => Page::class ]; + /** + * The attributes that are mass assignable. + * + * @var array + */ protected $fillable = [ 'title', 'subtitle', @@ -26,6 +36,11 @@ class Encart extends Model 'alt_text_picture', ]; + /** + * The attributes that are translatable. + * + * @var array + */ public $translatable = [ 'title', 'subtitle', @@ -34,6 +49,11 @@ class Encart extends Model 'alt_text_picture', ]; + /** + * Perform any actions required after the model boots. + * + * @return void + */ protected static function boot() { static::creating(function (Encart $encart) { diff --git a/app/Models/Gamme.php b/app/Models/Gamme.php index 3a68dd7..d0ab6b0 100644 --- a/app/Models/Gamme.php +++ b/app/Models/Gamme.php @@ -13,6 +13,11 @@ class Gamme extends Model use HasFactory; use HasTranslations; + /** + * The attributes that are mass assignable. + * + * @var array + */ protected $fillable = [ 'parent_gamme_id', 'title', @@ -25,6 +30,11 @@ class Gamme extends Model 'alt_text_banner', ]; + /** + * The attributes that are translatable. + * + * @var array + */ public $translatable = [ 'title', 'slug', @@ -35,7 +45,12 @@ class Gamme extends Model 'alt_text_banner', ]; - //phpcs:ignore Generic.Metrics.CyclomaticComplexity.TooHigh + /** + * Perform any actions required after the model boots. + * + * @return void + * @phpcs:disable Generic.Metrics.CyclomaticComplexity.TooHigh + */ protected static function boot() { static::creating(function (Gamme $gamme) { @@ -47,7 +62,7 @@ class Gamme extends Model } if ($gamme->parent_gamme_id != null) { - // Si Creation gamme enfant sans enfant, alors il faut update sa couleur selon celle du parent + // Si Creation gamme enfant sans enfant, alors il faut update sa couleur selon celle du parent. $gamme->color = Gamme::whereId($gamme->parent_gamme_id)->select(['color'])->first()->color; } }); @@ -60,7 +75,7 @@ class Gamme extends Model $gamme->banner = Utils::storeImage($gamme->banner, $gamme->getTable()); } if ($gamme->parent_gamme_id === null) { - // Si Update gamme parente, alors il faut update la couleur des enfants + // Si Update gamme parente, alors il faut update la couleur des enfants. Gamme::whereParentGammeId($gamme->id) ->update(['color' => $gamme->color]); } elseif ($gamme->childGammes()->exists()) { @@ -73,7 +88,7 @@ class Gamme extends Model Gamme::whereParentGammeId($gamme->id) ->update(['parent_gamme_id' => null]); } else { - // Si Update gamme enfant sans enfant, alors il faut update sa couleur selon celle du parent + // Si Update gamme enfant sans enfant, alors il faut update sa couleur selon celle du parent. $gamme->color = Gamme::whereId($gamme->parent_gamme_id)->select(['color'])->first()->color; } }); @@ -106,6 +121,11 @@ class Gamme extends Model parent::boot(); } + /** + * map hex color notation to rgba() syntax + * + * @return string + */ public function getRgbaColorAttribute() { $color = $this->color; @@ -121,11 +141,21 @@ class Gamme extends Model return "rgba($r,$g,$b,1)"; } + /** + * HasMany childGammes relation + * + * @return \Illuminate\Database\Eloquent\Relations\HasMany + */ public function childGammes() { return $this->hasMany(Gamme::class, 'parent_gamme_id'); } + /** + * BelongsTo parentGamme relation + * + * @return \Illuminate\Database\Eloquent\Relations\BelongsTo + */ public function parentGamme() { return $this->belongsTo(Gamme::class); @@ -133,6 +163,9 @@ class Gamme extends Model /** * Get Products for the Range. + * HasMany products relation + * + * @return \Illuminate\Database\Eloquent\Relations\HasMany */ public function products() { diff --git a/app/Models/Moment.php b/app/Models/Moment.php index c474cde..aa7008b 100644 --- a/app/Models/Moment.php +++ b/app/Models/Moment.php @@ -14,10 +14,20 @@ class Moment extends Model use HasFactory; use CastsEnumsHasTranslations; + /** + * Map attribute names to enum classes. + * + * @var array + */ public $enumCasts = [ 'page' => Page::class ]; + /** + * The attributes that are mass assignable. + * + * @var array + */ protected $fillable = [ 'title', 'subtitle', @@ -26,6 +36,11 @@ class Moment extends Model 'alt_text_picture', ]; + /** + * The attributes that are translatable. + * + * @var array + */ public $translatable = [ 'title', 'subtitle', @@ -34,6 +49,11 @@ class Moment extends Model 'alt_text_picture', ]; + /** + * Perform any actions required after the model boots. + * + * @return void + */ protected static function boot() { static::creating(function (Moment $moment) { diff --git a/app/Models/Picto.php b/app/Models/Picto.php index 70adefc..98d606b 100644 --- a/app/Models/Picto.php +++ b/app/Models/Picto.php @@ -14,22 +14,42 @@ class Picto extends Model use HasFactory; use CastsEnumsHasTranslations; + /** + * Map attribute names to enum classes. + * + * @var array + */ public $enumCasts = [ 'page' => Page::class ]; + /** + * The attributes that are mass assignable. + * + * @var array + */ protected $fillable = [ 'picture', 'alt_text_picture', 'text', ]; + /** + * The attributes that are translatable. + * + * @var array + */ public $translatable = [ 'picture', 'alt_text_picture', 'text', ]; + /** + * Perform any actions required after the model boots. + * + * @return void + */ protected static function boot() { static::creating(function (Picto $picto) { diff --git a/app/Models/PictoBrand.php b/app/Models/PictoBrand.php index bb08aba..c6eafd8 100644 --- a/app/Models/PictoBrand.php +++ b/app/Models/PictoBrand.php @@ -13,6 +13,11 @@ class PictoBrand extends Model use HasFactory; use HasTranslations; + /** + * The attributes that are mass assignable. + * + * @var array + */ protected $fillable = [ 'title', 'picture', @@ -20,6 +25,11 @@ class PictoBrand extends Model 'text', ]; + /** + * The attributes that are translatable. + * + * @var array + */ public $translatable = [ 'title', 'picture', @@ -27,6 +37,11 @@ class PictoBrand extends Model 'text', ]; + /** + * Perform any actions required after the model boots. + * + * @return void + */ protected static function boot() { static::creating(function (PictoBrand $pictoBrand) { diff --git a/app/Models/Post.php b/app/Models/Post.php index caf4a5b..00903d6 100644 --- a/app/Models/Post.php +++ b/app/Models/Post.php @@ -23,6 +23,11 @@ class Post extends Model 'date_end' => 'datetime', ]; + /** + * The attributes that are mass assignable. + * + * @var array + */ protected $fillable = [ 'title', 'text', @@ -35,6 +40,11 @@ class Post extends Model 'on_top' ]; + /** + * The attributes that are translatable. + * + * @var array + */ protected $translatable = [ 'title', 'text', @@ -44,7 +54,12 @@ class Post extends Model 'alt_text_picture_news' ]; - //phpcs:ignore Generic.Metrics.CyclomaticComplexity.TooHigh + /** + * Perform any actions required after the model boots. + * + * @return void + * @phpcs:disable Generic.Metrics.CyclomaticComplexity.TooHigh + */ protected static function boot() { static::creating(function (Post $post) { diff --git a/app/Models/Product.php b/app/Models/Product.php index e1d8429..e687e93 100644 --- a/app/Models/Product.php +++ b/app/Models/Product.php @@ -13,6 +13,11 @@ class Product extends Model use HasFactory; use HasTranslations; + /** + * The attributes that are mass assignable. + * + * @var array + */ protected $fillable = [ 'gamme_id', 'name', @@ -31,6 +36,11 @@ class Product extends Model 'seo_description', ]; + /** + * The attributes that are translatable. + * + * @var array + */ public $translatable = [ 'name', 'slug', @@ -43,6 +53,11 @@ class Product extends Model 'seo_description', ]; + /** + * Perform any actions required after the model boots. + * + * @return void + */ protected static function boot() { static::creating(function (Product $product) { @@ -66,7 +81,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; @@ -82,6 +97,8 @@ class Product extends Model /** * Get the Range that owns the product. + * + * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ public function gamme() { diff --git a/app/Models/SeoDatum.php b/app/Models/SeoDatum.php index b6c48be..5efb675 100644 --- a/app/Models/SeoDatum.php +++ b/app/Models/SeoDatum.php @@ -12,6 +12,11 @@ class SeoDatum extends Model use HasFactory; use CastsEnumsHasTranslations; + /** + * Map attribute names to enum classes. + * + * @var array + */ public $enumCasts = [ 'page' => Page::class ]; @@ -47,4 +52,35 @@ class SeoDatum extends Model { return 'page'; } + + /** + * Get Generic attribute value + * + * @param mixed $key + * @return mixed + */ + public function getAttributeValue($key) + { + if ($this->hasEnumCast($key)) { + $value = parent::getAttributeValue($key); + return $this->castToEnum($key, $value); + } + + return $this->TransGetAttributeValue($key); + } + + /** + * Set a given attribute on the model. + * + * @param mixed $key + * @param mixed $value + * @return mixed + */ + public function setAttribute($key, $value) + { + if ($this->hasEnumCast($key)) { + return $this->EnumSetAttribute($key, $value); + } + return $this->TransSetAttribute($key, $value); + } } diff --git a/app/Models/Slide.php b/app/Models/Slide.php index 8fc4c75..86687b0 100644 --- a/app/Models/Slide.php +++ b/app/Models/Slide.php @@ -23,6 +23,11 @@ class Slide extends Model 'date_end' => 'datetime', ]; + /** + * The attributes that are mass assignable. + * + * @var array + */ protected $fillable = [ 'title', 'text', @@ -36,6 +41,11 @@ class Slide extends Model 'date_end' ]; + /** + * The attributes that are translatable. + * + * @var array + */ public $translatable = [ 'title', 'text', @@ -45,6 +55,11 @@ class Slide extends Model 'alt_text_picture' ]; + /** + * Perform any actions required after the model boots. + * + * @return void + */ protected static function boot() { static::creating(function (Slide $slide) { @@ -72,6 +87,11 @@ class Slide extends Model parent::boot(); } + /** + * BelongsTo slider relation + * + * @return \Illuminate\Database\Eloquent\Relations\BelongsTo + */ public function slider() { return $this->belongsTo(Slider::class); diff --git a/app/Models/Slider.php b/app/Models/Slider.php index 557d28d..260c0a0 100644 --- a/app/Models/Slider.php +++ b/app/Models/Slider.php @@ -12,6 +12,11 @@ class Slider extends Model use HasFactory; use HasTranslations; + /** + * The attributes that are mass assignable. + * + * @var array + */ protected $fillable = [ 'label', 'slug', @@ -19,17 +24,32 @@ class Slider extends Model 'published' ]; + /** + * The attributes that are translatable. + * + * @var array + */ public $translatable = [ 'label', 'slug', 'commentaire' ]; + /** + * HasMany slides relation + * + * @return \Illuminate\Database\Eloquent\Relations\HasMany + */ public function slides() { return $this->hasMany(Slide::class, 'slider_id')->orderBy('order', 'ASC'); } + /** + * HasMany showable slides relation + * + * @return \Illuminate\Database\Eloquent\Relations\HasMany + */ public function showableSlides() { $now = Carbon::now(); diff --git a/app/Models/Text.php b/app/Models/Text.php index 65cc06a..86f227f 100644 --- a/app/Models/Text.php +++ b/app/Models/Text.php @@ -3,24 +3,41 @@ namespace App\Models; use App\Enums\Page; -use App\Traits\CastsEnumsHasTranslations; use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Model; +use Kwaadpepper\Enum\Traits\CastsEnums; +use Spatie\Translatable\HasTranslations; class Text extends Model { use HasFactory; - use CastsEnumsHasTranslations; + use CastsEnums; + use HasTranslations; + /** + * Map attribute names to enum classes. + * + * @var array + */ public $enumCasts = [ 'page' => Page::class ]; + /** + * The attributes that are mass assignable. + * + * @var array + */ protected $fillable = [ 'title', 'text', ]; + /** + * The attributes that are translatable. + * + * @var array + */ public $translatable = [ 'title', 'text', diff --git a/app/Models/Title.php b/app/Models/Title.php index 18ca140..0288d7d 100644 --- a/app/Models/Title.php +++ b/app/Models/Title.php @@ -12,15 +12,30 @@ class Title extends Model use HasFactory; use CastsEnumsHasTranslations; + /** + * Map attribute names to enum classes. + * + * @var array + */ public $enumCasts = [ 'page' => Page::class ]; + /** + * The attributes that are mass assignable. + * + * @var array + */ protected $fillable = [ 'title', 'text', ]; + /** + * The attributes that are translatable. + * + * @var array + */ public $translatable = [ 'title', 'text', diff --git a/app/Models/User.php b/app/Models/User.php index e239721..d1fc5a7 100644 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -15,6 +15,11 @@ class User extends Authenticatable use Notifiable; use CastsEnums; + /** + * Map attribute names to enum classes. + * + * @var array + */ public $enumCasts = [ 'role' => Role::class ]; @@ -49,6 +54,11 @@ class User extends Authenticatable 'email_verified_at' => 'datetime', ]; + /** + * Perform any actions required after the model boots. + * + * @return void + */ protected static function boot() { static::creating(function (User $user) { diff --git a/app/Providers/RouteServiceProvider.php b/app/Providers/RouteServiceProvider.php index 35524d3..a518879 100644 --- a/app/Providers/RouteServiceProvider.php +++ b/app/Providers/RouteServiceProvider.php @@ -4,6 +4,7 @@ namespace App\Providers; use App\Models\Gamme; use App\Models\Product; +use Illuminate\Database\Eloquent\Builder; use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider; use Illuminate\Support\Facades\Route; @@ -31,18 +32,45 @@ class RouteServiceProvider extends ServiceProvider ->group(base_path('routes/web.php')); }); - //phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter.FoundInExtendedClassAfterLastUsed - Route::bind('gammeSlug', function ($value, $route) { - $gamme = Gamme::where('slug', 'LIKE', '%:"' . $value . '"%')->firstOrFail(); - return $gamme; + Route::bind('gammeSlug', function ($value) { + /** @var string $locale @var string $defaultLocale @var string $value */ + $vars = $this->getRouteBinderVars($value); + \extract($vars); + /** @var \App\Models\Gamme */ + $gamme = Gamme::where(function (Builder $q) use ($locale, $defaultLocale, $value) { + $q->whereRaw("JSON_EXTRACT(slug, '$.$locale') = '$value'") + ->orWhereRaw("JSON_EXTRACT(slug, '$.$defaultLocale') = '$value'"); + })->firstOrFail(); + return $gamme->setLocale($locale); }); Route::bind('productSlug', function ($value, $route) { - $gamme = $route->parameter('gammeSlug'); - $product = Product::where('slug', 'LIKE', '%:"' . $value . '"%') - ->where('gamme_id', $gamme->id) - ->firstOrFail(); - return $product; + /** @var \Illuminate\Routing\Route $route */ + $gamme = $route->parameter('gammeSlug'); + + /** @var string $locale @var string $defaultLocale @var string $value */ + $vars = $this->getRouteBinderVars($value); + \extract($vars); + /** @var \App\Models\Product */ + $product = Product::where(function (Builder $q) use ($locale, $defaultLocale, $value) { + $q->whereRaw("JSON_EXTRACT(slug, '$.$locale') = '$value'") + ->orWhereRaw("JSON_EXTRACT(slug, '$.$defaultLocale') = '$value'"); + })->where('gamme_id', $gamme->id) + ->firstOrFail(); + return $product->setLocale($locale); }); } + + /** + * Get route binder common + * @param string $value + * @return string[] + */ + private function getRouteBinderVars(string $value): array + { + $locale = \app()->getLocale(); + $defaultLocale = \config('translatable.fallback_locale'); + $value = \filter_var($value, \FILTER_SANITIZE_STRING); + return compact('locale', 'defaultLocale', 'value'); + } } diff --git a/app/Traits/CastsEnumsHasTranslations.php b/app/Traits/CastsEnumsHasTranslations.php index 9975e38..5682eea 100644 --- a/app/Traits/CastsEnumsHasTranslations.php +++ b/app/Traits/CastsEnumsHasTranslations.php @@ -16,6 +16,10 @@ trait CastsEnumsHasTranslations /** * Manually mix getAttributeValue from CastsEnums and HasTranslations + * + * @param mixed $key + * + * @return string */ public function getAttributeValue($key) { @@ -28,6 +32,11 @@ trait CastsEnumsHasTranslations /** * Manually mix setAttribute from CastsEnums and HasTranslations + * + * @param mixed $key + * @param mixed $value + * + * @return mixed */ public function setAttribute($key, $value) { diff --git a/config/app.php b/config/app.php index 4b4ebd9..08fee42 100644 --- a/config/app.php +++ b/config/app.php @@ -139,6 +139,7 @@ return [ /* * Laravel Framework Service Providers... */ + Illuminate\Auth\AuthServiceProvider::class, Illuminate\Broadcasting\BroadcastServiceProvider::class, Illuminate\Bus\BusServiceProvider::class, @@ -169,6 +170,7 @@ return [ /* * Application Service Providers... */ + App\Providers\AppServiceProvider::class, App\Providers\AuthServiceProvider::class, App\Providers\EventServiceProvider::class, @@ -227,7 +229,7 @@ return [ 'Validator' => Illuminate\Support\Facades\Validator::class, 'View' => Illuminate\Support\Facades\View::class, - // Enums + // Enums. 'Page' => \App\Enums\Page::class, ], diff --git a/config/bo.php b/config/bo.php index b1149ab..a061aed 100644 --- a/config/bo.php +++ b/config/bo.php @@ -1,6 +1,7 @@ env('MAIL_FROM_NAME', 'Example'), ], - // Contacts List + // Contacts List. 'contactsList' => [ 'contactform' => explode(",", env('MAIL_LIST_CONTACTFORM', 'equipe.web@ldc.fr')) ], diff --git a/config/purifier.php b/config/purifier.php index a86a47c..d0efb83 100644 --- a/config/purifier.php +++ b/config/purifier.php @@ -26,7 +26,7 @@ return [ 'settings' => [ 'default' => [ 'HTML.SafeIframe' => true, -// For iframes +// 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', @@ -44,7 +44,7 @@ return [ 'rev' => 1, 'debug' => true, 'elements' => [ - // http://developers.whatwg.org/sections.html + // See : http://developers.whatwg.org/sections.html . ['section', 'Block', 'Flow', 'Common'], ['nav', 'Block', 'Flow', 'Common'], ['article', 'Block', 'Flow', 'Common'], @@ -52,16 +52,16 @@ return [ ['header', 'Block', 'Flow', 'Common'], ['footer', 'Block', 'Flow', 'Common'], - // Content model actually excludes several tags, not modelled here + // Content model actually excludes several tags, not modelled here. ['address', 'Block', 'Flow', 'Common'], ['hgroup', 'Block', 'Required: h1 | h2 | h3 | h4 | h5 | h6', 'Common'], - // http://developers.whatwg.org/grouping-content.html + // See : http://developers.whatwg.org/grouping-content.html . ['figure', 'Block', 'Optional: (figcaption, Flow) | (Flow, figcaption) | Flow', 'Common'], ['figcaption', 'Inline', 'Flow', 'Common'], ['oembed', 'Inline', 'Flow', 'Common'], - // http://developers.whatwg.org/the-video-element.html#the-video-element + // See : http://developers.whatwg.org/the-video-element.html#the-video-element . ['video', 'Block', 'Optional: (source, Flow) | (Flow, source) | Flow', 'Common', [ 'src' => 'URI', 'type' => 'Text', @@ -76,7 +76,7 @@ return [ 'type' => 'Text', ]], - // http://developers.whatwg.org/text-level-semantics.html + // See : http://developers.whatwg.org/text-level-semantics.html . ['s', 'Inline', 'Inline', 'Common'], ['var', 'Inline', 'Inline', 'Common'], ['sub', 'Inline', 'Inline', 'Common'], @@ -84,7 +84,7 @@ return [ ['mark', 'Inline', 'Inline', 'Common'], ['wbr', 'Inline', 'Empty', 'Core'], - // http://developers.whatwg.org/edits.html + // See : http://developers.whatwg.org/edits.html . ['ins', 'Block', 'Flow', 'Common', ['cite' => 'URI', 'datetime' => 'CDATA']], ['del', 'Block', 'Flow', 'Common', ['cite' => 'URI', 'datetime' => 'CDATA']], ], diff --git a/config/translatable.php b/config/translatable.php new file mode 100644 index 0000000..e3040c2 --- /dev/null +++ b/config/translatable.php @@ -0,0 +1,12 @@ + 'fr', +]; diff --git a/config/translation.php b/config/translation.php index b2a2b29..727575b 100644 --- a/config/translation.php +++ b/config/translation.php @@ -1,6 +1,7 @@ 'database', /* @@ -22,6 +24,7 @@ return [ | configuration here to configure the routes with your preferred group options. | */ + 'route_group_config' => [ 'middleware' => [ 'web', @@ -38,6 +41,7 @@ return [ | when finding missing translations. | */ + 'translation_methods' => ['trans', '__'], /* @@ -49,6 +53,7 @@ return [ | looking for missing translations. | */ + 'scan_paths' => [ resource_path() . '/views/front', resource_path() . '/views/layouts/frontend', @@ -62,6 +67,7 @@ return [ | Define the URL used to access the language management too. | */ + 'ui_url' => 'bo/languages', /* @@ -72,6 +78,7 @@ return [ | Define the settings for the database driver here. | */ + 'database' => [ 'connection' => '', diff --git a/database/factories/UserFactory.php b/database/factories/UserFactory.php index 8a63f40..d24a902 100644 --- a/database/factories/UserFactory.php +++ b/database/factories/UserFactory.php @@ -27,7 +27,7 @@ class UserFactory extends Factory 'email' => $this->faker->unique()->safeEmail(), 'email_verified_at' => now(), 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', -// password +// Password is : password . 'remember_token' => Str::random(10), ]; } diff --git a/routes/web.php b/routes/web.php index fefef40..56f6697 100644 --- a/routes/web.php +++ b/routes/web.php @@ -61,14 +61,14 @@ Route::prefix('bo') 'logout' => true, 'register' => false, 'reset' => false, - // for resetting passwords + // For resetting passwords. 'confirm' => false, - // for additional password confirmations + // For additional password confirmations. 'verify' => false, - // for email verification + // For email verification. ] ); - Route::middleware(['auth:web', 'back-end-globals', 'lang-check']) + Route::middleware(['auth:web', 'back-end-globals']) ->group( function () { Route::get( @@ -117,29 +117,55 @@ Route::prefix('bo') $langs = ['en', 'es', '']; foreach ($langs as $lang) { - Route::middleware(['front-end-globals', 'lang-check']) + Route::middleware(['front-end-globals']) ->prefix($lang) ->name($lang == '' ? '' : $lang . '.') ->group( function () use ($lang) { Route::get('/', [ControllersHomeController::class, 'index'])->name('home'); - // phpcs:disable Generic.Files.LineLength.TooLong - Route::get('/' . Str::slug(Lang::get('urls.marque', [], $lang)), [ControllersMarqueController::class, 'index'])->name('wasup'); - Route::get('/' . Str::slug(Lang::get('urls.gammes', [], $lang)), [ControllersGammesController::class, 'index'])->name('gammes.index'); - Route::get('/' . Str::slug(Lang::get('urls.gamme', [], $lang)) . '/{gammeSlug}', [ControllersGammesController::class, 'show'])->name('gammes.show'); + Route::get( - '/' . Str::slug(Lang::get('urls.produit', [], $lang)) . '/{gammeSlug}/{productSlug}', + '/' . Str::slug(Lang::get('urls.marque', [], $lang)), + [ControllersMarqueController::class, 'index'] + )->name('wasup'); + Route::get( + '/' . Str::slug(Lang::get('urls.gammes', [], $lang)), + [ControllersGammesController::class, 'index'] + )->name('gammes.index'); + Route::get( + '/' . Str::slug(Lang::get('urls.gamme', [], $lang)) . '/{gammeSlug:slug}', + [ControllersGammesController::class, 'show'] + )->name('gammes.show'); + Route::get( + '/' . Str::slug(Lang::get('urls.produit', [], $lang)) . '/{gammeSlug:slug}/{productSlug:slug}', [ControllersProductsController::class, 'show'] )->name('product.show'); - Route::get('/' . Str::slug(Lang::get('urls.news', [], $lang)), [ControllersNewsController::class, 'index'])->name('news'); - Route::get('/' . Str::slug(Lang::get('urls.food-service', [], $lang)), [ControllersFoodServiceController::class, 'index'])->name('food'); - 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 - Route::get('/' . Str::slug(Lang::get('urls.contact', [], $lang)), [ControllersContactController::class, 'contact'])->name('contact'); + Route::get( + '/' . Str::slug(Lang::get('urls.news', [], $lang)), + [ControllersNewsController::class, 'index'] + )->name('news'); + Route::get( + '/' . Str::slug(Lang::get('urls.food-service', [], $lang)), + [ControllersFoodServiceController::class, 'index'] + )->name('food'); + 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. + 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 From 40e5a6fb9eda48898a63f761a36d504ba089936b Mon Sep 17 00:00:00 2001 From: Olivier Legat Date: Thu, 15 Sep 2022 11:09:33 +0200 Subject: [PATCH 09/11] update with data lang from DEV, fix Text model --- app/Models/Text.php | 6 +- resources/lang/en.json | 14 ++-- resources/lang/es.json | 166 ++++++++++++++++++------------------- resources/lang/es/rgpd.php | 40 ++++----- 4 files changed, 112 insertions(+), 114 deletions(-) diff --git a/app/Models/Text.php b/app/Models/Text.php index 86f227f..e5a1edc 100644 --- a/app/Models/Text.php +++ b/app/Models/Text.php @@ -3,16 +3,14 @@ namespace App\Models; use App\Enums\Page; +use App\Traits\CastsEnumsHasTranslations; use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Model; -use Kwaadpepper\Enum\Traits\CastsEnums; -use Spatie\Translatable\HasTranslations; class Text extends Model { use HasFactory; - use CastsEnums; - use HasTranslations; + use CastsEnumsHasTranslations; /** * Map attribute names to enum classes. diff --git a/resources/lang/en.json b/resources/lang/en.json index c120df9..ad14877 100644 --- a/resources/lang/en.json +++ b/resources/lang/en.json @@ -7,7 +7,7 @@ "Les produits": "products", "Doux": "Doux", "Résultats": "Results", - "Découvrez DOUX, des produits de volailles françaises.": "", + "Découvrez DOUX, des produits de volailles françaises.": "Discover DOUX, French poultry products.", "Notre Histoire": "", "Nous contacter": "", "Adresse": "", @@ -40,11 +40,11 @@ "Insérer une pièce jointe": "", "Food service": "", "En savoir plus": "", - "Nous travaillons toujours pour améliorer nos recettes et proposer des produits de meilleur qualité": "", - "Découvrir": "", - "Nos gammes produits": "", - "Toutes nos gammes": "", - "Des produits incontournables, Authentiques et Innovants !": "", + "Nous travaillons toujours pour améliorer nos recettes et proposer des produits de meilleur qualité": "We are always working to improve our recipes and offer better quality products", + "Découvrir": "Discover", + "Nos gammes produits": "Our product lines", + "Toutes nos gammes": "All our product lines", + "Des produits incontournables, Authentiques et Innovants !": "Must-have, Authentic and Innovative products!", "Gammes": "", "Poulet, Cordon bleu ou Wing's ?": "", "Découvrez tous nos produits à base de volaille.": "", @@ -85,4 +85,4 @@ "les questions<\/span>
utiles<\/span>": "Usefull<\/span>
questions<\/span>", "Nos nouveautés": "", "Nous travaillons toujours pour améliorer nos recettes et proposer des produits de meilleure qualité": "" -} +} \ No newline at end of file diff --git a/resources/lang/es.json b/resources/lang/es.json index 59c5083..0196286 100644 --- a/resources/lang/es.json +++ b/resources/lang/es.json @@ -2,87 +2,87 @@ "Marque": "Marca", "Produits": "productos", "Actualités": "Noticias", - "Accueil": "", - "Découvrez DOUX, des produits de volailles françaises.": "", - "Qui sommes-nous": "", - "Notre Histoire": "", - "Nous contacter": "", - "Adresse": "", - "Votre message a bien été envoyé !": "", - "Nos services mettent tout en oeuvre pour y répondre au plus vite.": "", - "Oups ! Une erreur s’est produite...": "", - "Votre message n’a pas pu être envoyé.
Nous en sommes désolés et vous prions
de bien vouloir réessayer plus tard.": "", - "Vos coordonnées": "", - "Monsieur": "", - "Madame": "", - "Nom": "", - "Prénom": "", - "Code postal": "", - "Ville": "", - "Téléphone": "", - "Email": "", - "Préciser votre demande": "", - "Réclamation produit": "", - "La marque": "", - "Contact commercial": "", - "Autre demande": "", - "Nom du produit": "", - "Code barre": "", - "Lieu d'achat": "", - "Numéro de lot": "", - "Date Limite de Consommation": "", - "Date de consommation": "", - "Message": "", - "Photo de l'emballage": "", - "Insérer une pièce jointe": "", - "Food service": "", - "En savoir plus": "", - "Les produits": "", - "Nous travaillons toujours pour améliorer nos recettes et proposer des produits de meilleur qualité": "", - "Découvrir": "", - "Nos gammes produits": "", - "Toutes nos gammes": "", - "Des produits incontournables, Authentiques et Innovants !": "", - "Gammes": "", - "Poulet, Cordon bleu ou Wing's ?": "", - "Découvrez tous nos produits à base de volaille.": "", + "Accueil": "Inicio", + "Découvrez DOUX, des produits de volailles françaises.": "Descubra la marca DOUX de productos franceses de carne de ave.", + "Qui sommes-nous": "¿Quiénes somos?", + "Notre Histoire": "A su lado desde 1933", + "Nous contacter": "Para contactar con nosotros", + "Adresse": "Domicilio", + "Votre message a bien été envoyé !": "Su mensaje ha sido enviado", + "Nos services mettent tout en oeuvre pour y répondre au plus vite.": "Nuestros servicios harán lo posible para responderle cuanto antes.", + "Oups ! Une erreur s’est produite...": "¡Ups! Se ha producido un error...", + "Votre message n’a pas pu être envoyé.
Nous en sommes désolés et vous prions
de bien vouloir réessayer plus tard.": "Su mensaje no ha podido ser enviado.
Lo sentimos. Por favor,
inténtelo más tarde.", + "Vos coordonnées": "Sus datos:", + "Monsieur": "Señor", + "Madame": "Señora", + "Nom": "Apellidos", + "Prénom": "Nombre", + "Code postal": "Código Postal", + "Ville": "Localidad", + "Téléphone": "Teléfono", + "Email": "E-mail", + "Préciser votre demande": "Precise su solicitud:", + "Réclamation produit": "Reclamación por un producto", + "La marque": "La marca", + "Contact commercial": "Contacto comercial", + "Autre demande": "Otra solicitud", + "Nom du produit": "Nombre del producto", + "Code barre": "Código de barras", + "Lieu d'achat": "Lugar de compra", + "Numéro de lot": "Número de lote", + "Date Limite de Consommation": "Fecha límite de consumo", + "Date de consommation": "Fecha de consumo", + "Message": "Mensaje", + "Photo de l'emballage": "Foto del embalaje", + "Insérer une pièce jointe": "Adjuntar un documento", + "Food service": "Food Service", + "En savoir plus": "Adjuntar un documento", + "Les produits": "Productos", + "Nous travaillons toujours pour améliorer nos recettes et proposer des produits de meilleur qualité": "Seguimos trabajando para mejorar nuestras recetas y proponer productos de mejor calidad", + "Découvrir": "Descubrir", + "Nos gammes produits": "Nuestras gamas de productos", + "Toutes nos gammes": "Todas nuestras gamas", + "Des produits incontournables, Authentiques et Innovants !": "Recorra nuestras gamas y, sin duda, encontrará productos de su gusto.", + "Gammes": "Gamas", + "Poulet, Cordon bleu ou Wing's ?": "¿Pollo, Cordon Bleu o Wing's?", + "Découvrez tous nos produits à base de volaille.": "Descubra todos nuestros productos a base de carne de ave.", "les +<\/span>Produit<\/span>": "Las ventajas<\/span>del producto<\/span>", - "Résultats": "", - "Cuisiner en famille": "", - "Poulet rôti": "", - "Grignottes de poulet": "", - "Cuisine de chef": "", - "Suggestion de poulet frit": "", - "Mentions légales": "", - "Charte de confidentialité": "", - "Plan du site": "", - "Contact": "", - "Gestion des cookies": "", - "Recherchez un produit": "", - "Doux": "", - "Une question ? Une idée ? Un conseil ?
Des informations sur nos produits ?": "", - "N’hésitez-pas à nous contacter en renseignant le formulaire ci-dessous.
Nous traiterons votre demande avec la plus grande attention dans les meilleurs délais.": "", - "Doux, La référence française de la volaille": "", - "Sélectionnez un pays": "", - "Sélectionnez un département": "", - "Guadeloupe": "", - "Martinique": "", - "Guyane": "", - "La Réunion": "", - "Mayotte": "", - "Saint-Pierre-et-Miquelon": "", - "Saint-Barthélémy": "", - "Saint-Martin": "", - "Polynésie française": "", - "Île de Clipperton": "", - "Wallis-et-Futuna": "", - "Nouvelle-Calédonie": "", - "Terres australes et antarctiques françaises": "", - "Doux Food Services": "", - "Tous les produits Doux": "", - "Les actualités Doux": "", - "Nos conseils ...": "", - "les questions<\/span>
utiles<\/span>": "", - "Nos nouveautés": "", - "Nous travaillons toujours pour améliorer nos recettes et proposer des produits de meilleure qualité": "" -} + "Résultats": "Resultados", + "Cuisiner en famille": "Cocinar en familia", + "Poulet rôti": "Pollo asado", + "Grignottes de poulet": "Productos de pollo para picar", + "Cuisine de chef": "Cocina del chef", + "Suggestion de poulet frit": "Sugerencia de pollo frito", + "Mentions légales": "Menciones legales", + "Charte de confidentialité": "Documento-marco de confidencialidad", + "Plan du site": "Mapa de la página web", + "Contact": "Contacto", + "Gestion des cookies": "Gestión de las cookies", + "Recherchez un produit": "Busque un producto", + "Doux": "Doux", + "Une question ? Une idée ? Un conseil ?
Des informations sur nos produits ?": "¿Preguntas? ¿Ideas? ¿Consejos?
¿Información sobre nuestros productos?", + "N’hésitez-pas à nous contacter en renseignant le formulaire ci-dessous.
Nous traiterons votre demande avec la plus grande attention dans les meilleurs délais.": "No dude en ponerse en contacto con nosotros cumplimentando el siguiente formulario.
Tramitaremos su petición de forma pertinente lo antes posible.", + "Doux, La référence française de la volaille": "Doux, La referencia francesa de la carne de ave", + "Sélectionnez un pays": "Seleccione un país", + "Sélectionnez un département": "Seleccione una provincia", + "Guadeloupe": "Guadalupe", + "Martinique": "Martinica", + "Guyane": "Guayana", + "La Réunion": "Reunión", + "Mayotte": "Mayotte", + "Saint-Pierre-et-Miquelon": "San Pedro y Miquelón", + "Saint-Barthélémy": "San Bartolomé", + "Saint-Martin": "San Martín", + "Polynésie française": "Polinesia francesa", + "Île de Clipperton": "Isla Clipperton", + "Wallis-et-Futuna": "Wallis y Futuna", + "Nouvelle-Calédonie": "Nueva Caledonia", + "Terres australes et antarctiques françaises": "Territorios australes y antárticos franceses", + "Doux Food Services": "Doux Food Services", + "Tous les produits Doux": "Todos los productos Doux", + "Les actualités Doux": "Las últimas noticias de Doux", + "Nos conseils ...": "Nuestros consejos…", + "les questions<\/span>
utiles<\/span>": "Preguntas<\/span>
útiles<\/span>", + "Nos nouveautés": "nuestras novedades", + "Nous travaillons toujours pour améliorer nos recettes et proposer des produits de meilleure qualité": "Seguimos trabajando para mejorar nuestras recetas y proponer productos de mejor calidad" +} \ No newline at end of file diff --git a/resources/lang/es/rgpd.php b/resources/lang/es/rgpd.php index a671846..4a34f4a 100644 --- a/resources/lang/es/rgpd.php +++ b/resources/lang/es/rgpd.php @@ -3,44 +3,44 @@ return array ( 'analytics' => array ( - 'desc' => '', + 'desc' => 'Los servicios de medida de audiencia permiten generar estadísticas de visitas a la página web, útiles para poder mejorarla.', 'title' => 'Google Analytics', ), 'banner' => array ( 'desc' => array ( - 'introclose' => '', - 'introopen' => '', - 'more' => '', + 'introclose' => 'Usamos cookies con fines analíticos y para asegurarnos de que nuestra web funcione correctamente. Si continúa navegando en esta web o si cierra esta ventana, acepta el uso de estas cookies.', + 'introopen' => 'Esta web almacena las cookies en su ordenador. LDC utiliza esta información para mejorar y personalizar su experiencia de navegación y para analizar y obtener los indicadores relativos a nuestros visitantes en nuestra web y en otros soportes.
Puede hacer clic en «Aceptar» si consiente el uso de estas cookies.', + 'more' => '
Si rechaza el uso de estas cookies, no se recopilará su información durante su visita a nuestra web. Se utilizará una cookie en su navegador para recordar de no recopilar sus preferencias. No tendrá acceso a algunas funciones.
Puede cambiar de opinión y modificar su consentimiento en cualquier momento volviendo a esta web.
Para obtener más información sobre las cookies que utilizamos, consulte nuestra política de confidencialidad.', ), - 'lessdetails' => '', - 'moredetails' => '', - 'title' => '', + 'lessdetails' => 'Menos detalles...', + 'moredetails' => 'Más detalles...', + 'title' => '¡La web Doux utiliza cookies!', ), 'contact' => array ( - 'acceptcgu' => '', - 'disclaimer' => '', + 'acceptcgu' => 'Acepto las condiciones generales de uso de la web y autorizo a Société Bretonne de Volaille a tratar mis datos personales de acuerdo con la Política de confidencialidad.', + 'disclaimer' => 'La información que nos comunique se recopilará y tratará por Société Bretonne de Volaille, responsable de tratamiento según los objetivos definidos en nuestra Política de confidencialidad. Esta información está destinada al personal de Société Bretonne de Volaille y puede compartirse con sus subcontratistas.
Puede retirar su consentimiento en cualquier momento. Para cualquier información adicional sobre sus datos personales y sus derechos, consulte nuestra Política de confidencialidad.', ), 'cookie' => array ( - 'allow' => '', - 'deny' => '', + 'allow' => 'Autorizar', + 'deny' => 'Rechazar', ), 'cookies' => array ( - 'acceptall' => '', - 'allowall' => '', - 'denyall' => '', - 'personalize' => '', - 'return' => '', - 'settignsall' => '', + 'acceptall' => 'OK, ACEPTAR TODO', + 'allowall' => 'ACEPTAR TODO', + 'denyall' => 'RECHAZAR TODO', + 'personalize' => 'PERSONALIZAR', + 'return' => 'VOLVER', + 'settignsall' => 'Preferencia para todos los servicios', ), 'manage' => array ( - 'explain' => '', - 'subtitle' => '', - 'title' => '', + 'explain' => 'Las funcionalidades de esta página web se basan en servicios propuestos por terceros.
Si usted acepta, estos terceros instalarán cookies en su equipo que le permitirán visualizar en la página web el contenido alojado por ellos.
A través de estas cookies, estos terceros recopilarán y utilizarán sus datos de navegación para sus propios fines, de conformidad con su propia política de confidencialidad (en el siguiente enlace). Esta página le permitirá dar o retirar su consentimiento, tanto de forma global, como servicio por servicio.', + 'subtitle' => 'El respeto de su privacidad es nuestra prioridad.', + 'title' => 'Panel de gestión de las cookies', ), ); From bf208d3c17ee4f57e6863669139f2f4b46b2dfa1 Mon Sep 17 00:00:00 2001 From: Olivier Legat Date: Thu, 15 Sep 2022 11:18:26 +0200 Subject: [PATCH 10/11] composer update --- composer.lock | 1135 ++++++++++++++++++++----------------------------- 1 file changed, 461 insertions(+), 674 deletions(-) diff --git a/composer.lock b/composer.lock index 75c8d83..6dcb8ef 100644 --- a/composer.lock +++ b/composer.lock @@ -124,28 +124,28 @@ }, { "name": "doctrine/inflector", - "version": "2.0.4", + "version": "2.0.5", "source": { "type": "git", "url": "https://github.com/doctrine/inflector.git", - "reference": "8b7ff3e4b7de6b2c84da85637b59fd2880ecaa89" + "reference": "ade2b3bbfb776f27f0558e26eed43b5d9fe1b392" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/inflector/zipball/8b7ff3e4b7de6b2c84da85637b59fd2880ecaa89", - "reference": "8b7ff3e4b7de6b2c84da85637b59fd2880ecaa89", + "url": "https://api.github.com/repos/doctrine/inflector/zipball/ade2b3bbfb776f27f0558e26eed43b5d9fe1b392", + "reference": "ade2b3bbfb776f27f0558e26eed43b5d9fe1b392", "shasum": "" }, "require": { "php": "^7.2 || ^8.0" }, "require-dev": { - "doctrine/coding-standard": "^8.2", - "phpstan/phpstan": "^0.12", - "phpstan/phpstan-phpunit": "^0.12", - "phpstan/phpstan-strict-rules": "^0.12", - "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0", - "vimeo/psalm": "^4.10" + "doctrine/coding-standard": "^9", + "phpstan/phpstan": "^1.8", + "phpstan/phpstan-phpunit": "^1.1", + "phpstan/phpstan-strict-rules": "^1.3", + "phpunit/phpunit": "^8.5 || ^9.5", + "vimeo/psalm": "^4.25" }, "type": "library", "autoload": { @@ -195,7 +195,7 @@ ], "support": { "issues": "https://github.com/doctrine/inflector/issues", - "source": "https://github.com/doctrine/inflector/tree/2.0.4" + "source": "https://github.com/doctrine/inflector/tree/2.0.5" }, "funding": [ { @@ -211,7 +211,7 @@ "type": "tidelift" } ], - "time": "2021-10-22T20:16:43+00:00" + "time": "2022-09-07T09:01:28+00:00" }, { "name": "doctrine/lexer", @@ -291,16 +291,16 @@ }, { "name": "dragonmantank/cron-expression", - "version": "v3.3.1", + "version": "v3.3.2", "source": { "type": "git", "url": "https://github.com/dragonmantank/cron-expression.git", - "reference": "be85b3f05b46c39bbc0d95f6c071ddff669510fa" + "reference": "782ca5968ab8b954773518e9e49a6f892a34b2a8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/dragonmantank/cron-expression/zipball/be85b3f05b46c39bbc0d95f6c071ddff669510fa", - "reference": "be85b3f05b46c39bbc0d95f6c071ddff669510fa", + "url": "https://api.github.com/repos/dragonmantank/cron-expression/zipball/782ca5968ab8b954773518e9e49a6f892a34b2a8", + "reference": "782ca5968ab8b954773518e9e49a6f892a34b2a8", "shasum": "" }, "require": { @@ -340,7 +340,7 @@ ], "support": { "issues": "https://github.com/dragonmantank/cron-expression/issues", - "source": "https://github.com/dragonmantank/cron-expression/tree/v3.3.1" + "source": "https://github.com/dragonmantank/cron-expression/tree/v3.3.2" }, "funding": [ { @@ -348,7 +348,7 @@ "type": "github" } ], - "time": "2022-01-18T15:43:28+00:00" + "time": "2022-09-10T18:51:20+00:00" }, { "name": "egulias/email-validator", @@ -553,24 +553,24 @@ }, { "name": "graham-campbell/result-type", - "version": "v1.0.4", + "version": "v1.1.0", "source": { "type": "git", "url": "https://github.com/GrahamCampbell/Result-Type.git", - "reference": "0690bde05318336c7221785f2a932467f98b64ca" + "reference": "a878d45c1914464426dc94da61c9e1d36ae262a8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/GrahamCampbell/Result-Type/zipball/0690bde05318336c7221785f2a932467f98b64ca", - "reference": "0690bde05318336c7221785f2a932467f98b64ca", + "url": "https://api.github.com/repos/GrahamCampbell/Result-Type/zipball/a878d45c1914464426dc94da61c9e1d36ae262a8", + "reference": "a878d45c1914464426dc94da61c9e1d36ae262a8", "shasum": "" }, "require": { - "php": "^7.0 || ^8.0", - "phpoption/phpoption": "^1.8" + "php": "^7.2.5 || ^8.0", + "phpoption/phpoption": "^1.9" }, "require-dev": { - "phpunit/phpunit": "^6.5.14 || ^7.5.20 || ^8.5.19 || ^9.5.8" + "phpunit/phpunit": "^8.5.28 || ^9.5.21" }, "type": "library", "autoload": { @@ -599,7 +599,7 @@ ], "support": { "issues": "https://github.com/GrahamCampbell/Result-Type/issues", - "source": "https://github.com/GrahamCampbell/Result-Type/tree/v1.0.4" + "source": "https://github.com/GrahamCampbell/Result-Type/tree/v1.1.0" }, "funding": [ { @@ -611,26 +611,26 @@ "type": "tidelift" } ], - "time": "2021-11-21T21:41:47+00:00" + "time": "2022-07-30T15:56:11+00:00" }, { "name": "guzzlehttp/guzzle", - "version": "7.4.4", + "version": "7.5.0", "source": { "type": "git", "url": "https://github.com/guzzle/guzzle.git", - "reference": "e3ff079b22820c2029d4c2a87796b6a0b8716ad8" + "reference": "b50a2a1251152e43f6a37f0fa053e730a67d25ba" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/e3ff079b22820c2029d4c2a87796b6a0b8716ad8", - "reference": "e3ff079b22820c2029d4c2a87796b6a0b8716ad8", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/b50a2a1251152e43f6a37f0fa053e730a67d25ba", + "reference": "b50a2a1251152e43f6a37f0fa053e730a67d25ba", "shasum": "" }, "require": { "ext-json": "*", "guzzlehttp/promises": "^1.5", - "guzzlehttp/psr7": "^1.8.3 || ^2.1", + "guzzlehttp/psr7": "^1.9 || ^2.4", "php": "^7.2.5 || ^8.0", "psr/http-client": "^1.0", "symfony/deprecation-contracts": "^2.2 || ^3.0" @@ -639,10 +639,10 @@ "psr/http-client-implementation": "1.0" }, "require-dev": { - "bamarni/composer-bin-plugin": "^1.4.1", + "bamarni/composer-bin-plugin": "^1.8.1", "ext-curl": "*", "php-http/client-integration-tests": "^3.0", - "phpunit/phpunit": "^8.5.5 || ^9.3.5", + "phpunit/phpunit": "^8.5.29 || ^9.5.23", "psr/log": "^1.1 || ^2.0 || ^3.0" }, "suggest": { @@ -652,8 +652,12 @@ }, "type": "library", "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": false + }, "branch-alias": { - "dev-master": "7.4-dev" + "dev-master": "7.5-dev" } }, "autoload": { @@ -719,7 +723,7 @@ ], "support": { "issues": "https://github.com/guzzle/guzzle/issues", - "source": "https://github.com/guzzle/guzzle/tree/7.4.4" + "source": "https://github.com/guzzle/guzzle/tree/7.5.0" }, "funding": [ { @@ -735,20 +739,20 @@ "type": "tidelift" } ], - "time": "2022-06-09T21:39:15+00:00" + "time": "2022-08-28T15:39:27+00:00" }, { "name": "guzzlehttp/promises", - "version": "1.5.1", + "version": "1.5.2", "source": { "type": "git", "url": "https://github.com/guzzle/promises.git", - "reference": "fe752aedc9fd8fcca3fe7ad05d419d32998a06da" + "reference": "b94b2807d85443f9719887892882d0329d1e2598" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/promises/zipball/fe752aedc9fd8fcca3fe7ad05d419d32998a06da", - "reference": "fe752aedc9fd8fcca3fe7ad05d419d32998a06da", + "url": "https://api.github.com/repos/guzzle/promises/zipball/b94b2807d85443f9719887892882d0329d1e2598", + "reference": "b94b2807d85443f9719887892882d0329d1e2598", "shasum": "" }, "require": { @@ -803,7 +807,7 @@ ], "support": { "issues": "https://github.com/guzzle/promises/issues", - "source": "https://github.com/guzzle/promises/tree/1.5.1" + "source": "https://github.com/guzzle/promises/tree/1.5.2" }, "funding": [ { @@ -819,20 +823,20 @@ "type": "tidelift" } ], - "time": "2021-10-22T20:56:57+00:00" + "time": "2022-08-28T14:55:35+00:00" }, { "name": "guzzlehttp/psr7", - "version": "2.1.0", + "version": "2.4.1", "source": { "type": "git", "url": "https://github.com/guzzle/psr7.git", - "reference": "089edd38f5b8abba6cb01567c2a8aaa47cec4c72" + "reference": "69568e4293f4fa993f3b0e51c9723e1e17c41379" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/089edd38f5b8abba6cb01567c2a8aaa47cec4c72", - "reference": "089edd38f5b8abba6cb01567c2a8aaa47cec4c72", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/69568e4293f4fa993f3b0e51c9723e1e17c41379", + "reference": "69568e4293f4fa993f3b0e51c9723e1e17c41379", "shasum": "" }, "require": { @@ -846,17 +850,21 @@ "psr/http-message-implementation": "1.0" }, "require-dev": { - "bamarni/composer-bin-plugin": "^1.4.1", + "bamarni/composer-bin-plugin": "^1.8.1", "http-interop/http-factory-tests": "^0.9", - "phpunit/phpunit": "^8.5.8 || ^9.3.10" + "phpunit/phpunit": "^8.5.29 || ^9.5.23" }, "suggest": { "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses" }, "type": "library", "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": false + }, "branch-alias": { - "dev-master": "2.1-dev" + "dev-master": "2.4-dev" } }, "autoload": { @@ -918,7 +926,7 @@ ], "support": { "issues": "https://github.com/guzzle/psr7/issues", - "source": "https://github.com/guzzle/psr7/tree/2.1.0" + "source": "https://github.com/guzzle/psr7/tree/2.4.1" }, "funding": [ { @@ -934,7 +942,7 @@ "type": "tidelift" } ], - "time": "2021-10-06T17:43:30+00:00" + "time": "2022-08-28T14:45:39+00:00" }, { "name": "joedixon/laravel-translation", @@ -988,27 +996,27 @@ }, { "name": "kwaadpepper/enum", - "version": "2.1.2", + "version": "2.1.3", "source": { "type": "git", "url": "https://github.com/Kwaadpepper/enum.git", - "reference": "bbd08723895cad5a41bc0d57e565fe64fa13ca41" + "reference": "cc695e6a07ee57a1220942581c303842e186b22f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Kwaadpepper/enum/zipball/bbd08723895cad5a41bc0d57e565fe64fa13ca41", - "reference": "bbd08723895cad5a41bc0d57e565fe64fa13ca41", + "url": "https://api.github.com/repos/Kwaadpepper/enum/zipball/cc695e6a07ee57a1220942581c303842e186b22f", + "reference": "cc695e6a07ee57a1220942581c303842e186b22f", "shasum": "" }, "require": { - "php": "^7.3" + "php": ">=7.3" }, "require-dev": { - "orchestra/testbench": "^5", - "phpunit/php-code-coverage": "^9.2", - "phpunit/phpunit": "~9.0", - "slevomat/coding-standard": "^7.0", - "squizlabs/php_codesniffer": "^3.5" + "orchestra/testbench": "^6", + "phpunit/php-code-coverage": "^9", + "phpunit/phpunit": "~9", + "slevomat/coding-standard": "^7", + "squizlabs/php_codesniffer": "^3" }, "type": "library", "extra": { @@ -1042,9 +1050,9 @@ ], "support": { "issues": "https://github.com/Kwaadpepper/enum/issues", - "source": "https://github.com/Kwaadpepper/enum/tree/2.1.2" + "source": "https://github.com/Kwaadpepper/enum/tree/2.1.3" }, - "time": "2021-11-18T16:52:08+00:00" + "time": "2022-07-28T15:18:54+00:00" }, { "name": "kwaadpepper/exception-handler", @@ -1109,16 +1117,16 @@ }, { "name": "laravel/framework", - "version": "v8.83.4", + "version": "v8.83.23", "source": { "type": "git", "url": "https://github.com/laravel/framework.git", - "reference": "97a549f1a83cfb32dab1eecab4c4d40a984a72b5" + "reference": "bdc707f8b9bcad289b24cd182d98ec7480ac4491" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/97a549f1a83cfb32dab1eecab4c4d40a984a72b5", - "reference": "97a549f1a83cfb32dab1eecab4c4d40a984a72b5", + "url": "https://api.github.com/repos/laravel/framework/zipball/bdc707f8b9bcad289b24cd182d98ec7480ac4491", + "reference": "bdc707f8b9bcad289b24cd182d98ec7480ac4491", "shasum": "" }, "require": { @@ -1278,29 +1286,30 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2022-03-08T16:12:54+00:00" + "time": "2022-07-26T13:30:00+00:00" }, { "name": "laravel/serializable-closure", - "version": "v1.1.1", + "version": "v1.2.2", "source": { "type": "git", "url": "https://github.com/laravel/serializable-closure.git", - "reference": "9e4b005daa20b0c161f3845040046dc9ddc1d74e" + "reference": "47afb7fae28ed29057fdca37e16a84f90cc62fae" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/serializable-closure/zipball/9e4b005daa20b0c161f3845040046dc9ddc1d74e", - "reference": "9e4b005daa20b0c161f3845040046dc9ddc1d74e", + "url": "https://api.github.com/repos/laravel/serializable-closure/zipball/47afb7fae28ed29057fdca37e16a84f90cc62fae", + "reference": "47afb7fae28ed29057fdca37e16a84f90cc62fae", "shasum": "" }, "require": { "php": "^7.3|^8.0" }, "require-dev": { - "pestphp/pest": "^1.18", - "phpstan/phpstan": "^0.12.98", - "symfony/var-dumper": "^5.3" + "nesbot/carbon": "^2.61", + "pestphp/pest": "^1.21.3", + "phpstan/phpstan": "^1.8.2", + "symfony/var-dumper": "^5.4.11" }, "type": "library", "extra": { @@ -1337,20 +1346,20 @@ "issues": "https://github.com/laravel/serializable-closure/issues", "source": "https://github.com/laravel/serializable-closure" }, - "time": "2022-02-11T19:23:53+00:00" + "time": "2022-09-08T13:45:54+00:00" }, { "name": "laravel/tinker", - "version": "v2.7.0", + "version": "v2.7.2", "source": { "type": "git", "url": "https://github.com/laravel/tinker.git", - "reference": "5f2f9815b7631b9f586a3de7933c25f9327d4073" + "reference": "dff39b661e827dae6e092412f976658df82dbac5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/tinker/zipball/5f2f9815b7631b9f586a3de7933c25f9327d4073", - "reference": "5f2f9815b7631b9f586a3de7933c25f9327d4073", + "url": "https://api.github.com/repos/laravel/tinker/zipball/dff39b661e827dae6e092412f976658df82dbac5", + "reference": "dff39b661e827dae6e092412f976658df82dbac5", "shasum": "" }, "require": { @@ -1403,22 +1412,22 @@ ], "support": { "issues": "https://github.com/laravel/tinker/issues", - "source": "https://github.com/laravel/tinker/tree/v2.7.0" + "source": "https://github.com/laravel/tinker/tree/v2.7.2" }, - "time": "2022-01-10T08:52:49+00:00" + "time": "2022-03-23T12:38:24+00:00" }, { "name": "laravel/ui", - "version": "v3.4.5", + "version": "v3.4.6", "source": { "type": "git", "url": "https://github.com/laravel/ui.git", - "reference": "f11d295de1508c5bb56206a620b00b6616de414c" + "reference": "65ec5c03f7fee2c8ecae785795b829a15be48c2c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/ui/zipball/f11d295de1508c5bb56206a620b00b6616de414c", - "reference": "f11d295de1508c5bb56206a620b00b6616de414c", + "url": "https://api.github.com/repos/laravel/ui/zipball/65ec5c03f7fee2c8ecae785795b829a15be48c2c", + "reference": "65ec5c03f7fee2c8ecae785795b829a15be48c2c", "shasum": "" }, "require": { @@ -1464,9 +1473,9 @@ "ui" ], "support": { - "source": "https://github.com/laravel/ui/tree/v3.4.5" + "source": "https://github.com/laravel/ui/tree/v3.4.6" }, - "time": "2022-02-21T14:59:16+00:00" + "time": "2022-05-20T13:38:08+00:00" }, { "name": "ldc/web-admin-secure-laravel", @@ -1831,16 +1840,16 @@ }, { "name": "league/mime-type-detection", - "version": "1.9.0", + "version": "1.11.0", "source": { "type": "git", "url": "https://github.com/thephpleague/mime-type-detection.git", - "reference": "aa70e813a6ad3d1558fc927863d47309b4c23e69" + "reference": "ff6248ea87a9f116e78edd6002e39e5128a0d4dd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/mime-type-detection/zipball/aa70e813a6ad3d1558fc927863d47309b4c23e69", - "reference": "aa70e813a6ad3d1558fc927863d47309b4c23e69", + "url": "https://api.github.com/repos/thephpleague/mime-type-detection/zipball/ff6248ea87a9f116e78edd6002e39e5128a0d4dd", + "reference": "ff6248ea87a9f116e78edd6002e39e5128a0d4dd", "shasum": "" }, "require": { @@ -1871,7 +1880,7 @@ "description": "Mime-type detection for Flysystem", "support": { "issues": "https://github.com/thephpleague/mime-type-detection/issues", - "source": "https://github.com/thephpleague/mime-type-detection/tree/1.9.0" + "source": "https://github.com/thephpleague/mime-type-detection/tree/1.11.0" }, "funding": [ { @@ -1883,20 +1892,20 @@ "type": "tidelift" } ], - "time": "2021-11-21T11:48:40+00:00" + "time": "2022-04-17T13:12:02+00:00" }, { "name": "mews/purifier", - "version": "3.3.7", + "version": "3.3.8", "source": { "type": "git", "url": "https://github.com/mewebstudio/Purifier.git", - "reference": "9844bc82886e4291b3116afbd9ab5f532856662a" + "reference": "164b420c4a80d2d0a89c1023f0aa9b3c0e3d6dc5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/mewebstudio/Purifier/zipball/9844bc82886e4291b3116afbd9ab5f532856662a", - "reference": "9844bc82886e4291b3116afbd9ab5f532856662a", + "url": "https://api.github.com/repos/mewebstudio/Purifier/zipball/164b420c4a80d2d0a89c1023f0aa9b3c0e3d6dc5", + "reference": "164b420c4a80d2d0a89c1023f0aa9b3c0e3d6dc5", "shasum": "" }, "require": { @@ -1962,22 +1971,22 @@ ], "support": { "issues": "https://github.com/mewebstudio/Purifier/issues", - "source": "https://github.com/mewebstudio/Purifier/tree/3.3.7" + "source": "https://github.com/mewebstudio/Purifier/tree/3.3.8" }, - "time": "2022-02-12T15:54:11+00:00" + "time": "2022-07-20T12:14:06+00:00" }, { "name": "monolog/monolog", - "version": "2.3.5", + "version": "2.8.0", "source": { "type": "git", "url": "https://github.com/Seldaek/monolog.git", - "reference": "fd4380d6fc37626e2f799f29d91195040137eba9" + "reference": "720488632c590286b88b80e62aa3d3d551ad4a50" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Seldaek/monolog/zipball/fd4380d6fc37626e2f799f29d91195040137eba9", - "reference": "fd4380d6fc37626e2f799f29d91195040137eba9", + "url": "https://api.github.com/repos/Seldaek/monolog/zipball/720488632c590286b88b80e62aa3d3d551ad4a50", + "reference": "720488632c590286b88b80e62aa3d3d551ad4a50", "shasum": "" }, "require": { @@ -1990,18 +1999,22 @@ "require-dev": { "aws/aws-sdk-php": "^2.4.9 || ^3.0", "doctrine/couchdb": "~1.0@dev", - "elasticsearch/elasticsearch": "^7", + "elasticsearch/elasticsearch": "^7 || ^8", + "ext-json": "*", "graylog2/gelf-php": "^1.4.2", + "guzzlehttp/guzzle": "^7.4", + "guzzlehttp/psr7": "^2.2", "mongodb/mongodb": "^1.8", "php-amqplib/php-amqplib": "~2.4 || ^3", - "php-console/php-console": "^3.1.3", - "phpspec/prophecy": "^1.6.1", + "phpspec/prophecy": "^1.15", "phpstan/phpstan": "^0.12.91", - "phpunit/phpunit": "^8.5", - "predis/predis": "^1.1", - "rollbar/rollbar": "^1.3", - "ruflin/elastica": ">=0.90@dev", - "swiftmailer/swiftmailer": "^5.3|^6.0" + "phpunit/phpunit": "^8.5.14", + "predis/predis": "^1.1 || ^2.0", + "rollbar/rollbar": "^1.3 || ^2 || ^3", + "ruflin/elastica": "^7", + "swiftmailer/swiftmailer": "^5.3|^6.0", + "symfony/mailer": "^5.4 || ^6", + "symfony/mime": "^5.4 || ^6" }, "suggest": { "aws/aws-sdk-php": "Allow sending log messages to AWS services like DynamoDB", @@ -2016,7 +2029,6 @@ "graylog2/gelf-php": "Allow sending log messages to a GrayLog2 server", "mongodb/mongodb": "Allow sending log messages to a MongoDB server (via library)", "php-amqplib/php-amqplib": "Allow sending log messages to an AMQP server using php-amqplib", - "php-console/php-console": "Allow sending log messages to Google Chrome", "rollbar/rollbar": "Allow sending log messages to Rollbar", "ruflin/elastica": "Allow sending log messages to an Elastic Search server" }, @@ -2051,7 +2063,7 @@ ], "support": { "issues": "https://github.com/Seldaek/monolog/issues", - "source": "https://github.com/Seldaek/monolog/tree/2.3.5" + "source": "https://github.com/Seldaek/monolog/tree/2.8.0" }, "funding": [ { @@ -2063,20 +2075,20 @@ "type": "tidelift" } ], - "time": "2021-10-01T21:08:31+00:00" + "time": "2022-07-24T11:55:47+00:00" }, { "name": "nesbot/carbon", - "version": "2.57.0", + "version": "2.62.1", "source": { "type": "git", "url": "https://github.com/briannesbitt/Carbon.git", - "reference": "4a54375c21eea4811dbd1149fe6b246517554e78" + "reference": "01bc4cdefe98ef58d1f9cb31bdbbddddf2a88f7a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/4a54375c21eea4811dbd1149fe6b246517554e78", - "reference": "4a54375c21eea4811dbd1149fe6b246517554e78", + "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/01bc4cdefe98ef58d1f9cb31bdbbddddf2a88f7a", + "reference": "01bc4cdefe98ef58d1f9cb31bdbbddddf2a88f7a", "shasum": "" }, "require": { @@ -2091,10 +2103,12 @@ "doctrine/orm": "^2.7", "friendsofphp/php-cs-fixer": "^3.0", "kylekatarnls/multi-tester": "^2.0", + "ondrejmirtes/better-reflection": "*", "phpmd/phpmd": "^2.9", "phpstan/extension-installer": "^1.0", - "phpstan/phpstan": "^0.12.54 || ^1.0", - "phpunit/phpunit": "^7.5.20 || ^8.5.14", + "phpstan/phpstan": "^0.12.99 || ^1.7.14", + "phpunit/php-file-iterator": "^2.0.5 || ^3.0.6", + "phpunit/phpunit": "^7.5.20 || ^8.5.26 || ^9.5.20", "squizlabs/php_codesniffer": "^3.4" }, "bin": [ @@ -2151,28 +2165,32 @@ }, "funding": [ { - "url": "https://opencollective.com/Carbon", - "type": "open_collective" + "url": "https://github.com/sponsors/kylekatarnls", + "type": "github" }, { - "url": "https://tidelift.com/funding/github/packagist/nesbot/carbon", + "url": "https://opencollective.com/Carbon#sponsor", + "type": "opencollective" + }, + { + "url": "https://tidelift.com/subscription/pkg/packagist-nesbot-carbon?utm_source=packagist-nesbot-carbon&utm_medium=referral&utm_campaign=readme", "type": "tidelift" } ], - "time": "2022-02-13T18:13:33+00:00" + "time": "2022-09-02T07:48:13+00:00" }, { "name": "nikic/php-parser", - "version": "v4.13.2", + "version": "v4.15.1", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "210577fe3cf7badcc5814d99455df46564f3c077" + "reference": "0ef6c55a3f47f89d7a374e6f835197a0b5fcf900" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/210577fe3cf7badcc5814d99455df46564f3c077", - "reference": "210577fe3cf7badcc5814d99455df46564f3c077", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/0ef6c55a3f47f89d7a374e6f835197a0b5fcf900", + "reference": "0ef6c55a3f47f89d7a374e6f835197a0b5fcf900", "shasum": "" }, "require": { @@ -2213,9 +2231,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.13.2" + "source": "https://github.com/nikic/PHP-Parser/tree/v4.15.1" }, - "time": "2021-11-30T19:35:32+00:00" + "time": "2022-09-04T07:30:47+00:00" }, { "name": "opis/closure", @@ -2284,29 +2302,33 @@ }, { "name": "phpoption/phpoption", - "version": "1.8.1", + "version": "1.9.0", "source": { "type": "git", "url": "https://github.com/schmittjoh/php-option.git", - "reference": "eab7a0df01fe2344d172bff4cd6dbd3f8b84ad15" + "reference": "dc5ff11e274a90cc1c743f66c9ad700ce50db9ab" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/eab7a0df01fe2344d172bff4cd6dbd3f8b84ad15", - "reference": "eab7a0df01fe2344d172bff4cd6dbd3f8b84ad15", + "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/dc5ff11e274a90cc1c743f66c9ad700ce50db9ab", + "reference": "dc5ff11e274a90cc1c743f66c9ad700ce50db9ab", "shasum": "" }, "require": { - "php": "^7.0 || ^8.0" + "php": "^7.2.5 || ^8.0" }, "require-dev": { - "bamarni/composer-bin-plugin": "^1.4.1", - "phpunit/phpunit": "^6.5.14 || ^7.5.20 || ^8.5.19 || ^9.5.8" + "bamarni/composer-bin-plugin": "^1.8", + "phpunit/phpunit": "^8.5.28 || ^9.5.21" }, "type": "library", "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": true + }, "branch-alias": { - "dev-master": "1.8-dev" + "dev-master": "1.9-dev" } }, "autoload": { @@ -2339,7 +2361,7 @@ ], "support": { "issues": "https://github.com/schmittjoh/php-option/issues", - "source": "https://github.com/schmittjoh/php-option/tree/1.8.1" + "source": "https://github.com/schmittjoh/php-option/tree/1.9.0" }, "funding": [ { @@ -2351,7 +2373,7 @@ "type": "tidelift" } ], - "time": "2021-12-04T23:24:31+00:00" + "time": "2022-07-30T15:51:26+00:00" }, { "name": "psr/container", @@ -2714,16 +2736,16 @@ }, { "name": "psy/psysh", - "version": "v0.11.2", + "version": "v0.11.8", "source": { "type": "git", "url": "https://github.com/bobthecow/psysh.git", - "reference": "7f7da640d68b9c9fec819caae7c744a213df6514" + "reference": "f455acf3645262ae389b10e9beba0c358aa6994e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/bobthecow/psysh/zipball/7f7da640d68b9c9fec819caae7c744a213df6514", - "reference": "7f7da640d68b9c9fec819caae7c744a213df6514", + "url": "https://api.github.com/repos/bobthecow/psysh/zipball/f455acf3645262ae389b10e9beba0c358aa6994e", + "reference": "f455acf3645262ae389b10e9beba0c358aa6994e", "shasum": "" }, "require": { @@ -2738,15 +2760,13 @@ "symfony/console": "4.4.37 || 5.3.14 || 5.3.15 || 5.4.3 || 5.4.4 || 6.0.3 || 6.0.4" }, "require-dev": { - "bamarni/composer-bin-plugin": "^1.2", - "hoa/console": "3.17.05.02" + "bamarni/composer-bin-plugin": "^1.2" }, "suggest": { "ext-pcntl": "Enabling the PCNTL extension makes PsySH a lot happier :)", "ext-pdo-sqlite": "The doc command requires SQLite to work.", "ext-posix": "If you have PCNTL, you'll want the POSIX extension as well.", - "ext-readline": "Enables support for arrow-key history navigation, and showing and manipulating command history.", - "hoa/console": "A pure PHP readline implementation. You'll want this if your PHP install doesn't already support readline or libedit." + "ext-readline": "Enables support for arrow-key history navigation, and showing and manipulating command history." }, "bin": [ "bin/psysh" @@ -2786,9 +2806,9 @@ ], "support": { "issues": "https://github.com/bobthecow/psysh/issues", - "source": "https://github.com/bobthecow/psysh/tree/v0.11.2" + "source": "https://github.com/bobthecow/psysh/tree/v0.11.8" }, - "time": "2022-02-28T15:28:54+00:00" + "time": "2022-07-28T14:25:11+00:00" }, { "name": "ralouphie/getallheaders", @@ -3171,16 +3191,16 @@ }, { "name": "symfony/console", - "version": "v5.4.5", + "version": "v5.4.12", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "d8111acc99876953f52fe16d4c50eb60940d49ad" + "reference": "c072aa8f724c3af64e2c7a96b796a4863d24dba1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/d8111acc99876953f52fe16d4c50eb60940d49ad", - "reference": "d8111acc99876953f52fe16d4c50eb60940d49ad", + "url": "https://api.github.com/repos/symfony/console/zipball/c072aa8f724c3af64e2c7a96b796a4863d24dba1", + "reference": "c072aa8f724c3af64e2c7a96b796a4863d24dba1", "shasum": "" }, "require": { @@ -3250,7 +3270,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v5.4.5" + "source": "https://github.com/symfony/console/tree/v5.4.12" }, "funding": [ { @@ -3266,20 +3286,20 @@ "type": "tidelift" } ], - "time": "2022-02-24T12:45:35+00:00" + "time": "2022-08-17T13:18:05+00:00" }, { "name": "symfony/css-selector", - "version": "v5.4.3", + "version": "v5.4.11", "source": { "type": "git", "url": "https://github.com/symfony/css-selector.git", - "reference": "b0a190285cd95cb019237851205b8140ef6e368e" + "reference": "c1681789f059ab756001052164726ae88512ae3d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/css-selector/zipball/b0a190285cd95cb019237851205b8140ef6e368e", - "reference": "b0a190285cd95cb019237851205b8140ef6e368e", + "url": "https://api.github.com/repos/symfony/css-selector/zipball/c1681789f059ab756001052164726ae88512ae3d", + "reference": "c1681789f059ab756001052164726ae88512ae3d", "shasum": "" }, "require": { @@ -3316,7 +3336,7 @@ "description": "Converts CSS selectors to XPath expressions", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/css-selector/tree/v5.4.3" + "source": "https://github.com/symfony/css-selector/tree/v5.4.11" }, "funding": [ { @@ -3332,20 +3352,20 @@ "type": "tidelift" } ], - "time": "2022-01-02T09:53:40+00:00" + "time": "2022-06-27T16:58:25+00:00" }, { "name": "symfony/deprecation-contracts", - "version": "v2.5.0", + "version": "v2.5.2", "source": { "type": "git", "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "6f981ee24cf69ee7ce9736146d1c57c2780598a8" + "reference": "e8b495ea28c1d97b5e0c121748d6f9b53d075c66" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/6f981ee24cf69ee7ce9736146d1c57c2780598a8", - "reference": "6f981ee24cf69ee7ce9736146d1c57c2780598a8", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/e8b495ea28c1d97b5e0c121748d6f9b53d075c66", + "reference": "e8b495ea28c1d97b5e0c121748d6f9b53d075c66", "shasum": "" }, "require": { @@ -3383,7 +3403,7 @@ "description": "A generic function and convention to trigger deprecation notices", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v2.5.0" + "source": "https://github.com/symfony/deprecation-contracts/tree/v2.5.2" }, "funding": [ { @@ -3399,20 +3419,20 @@ "type": "tidelift" } ], - "time": "2021-07-12T14:48:14+00:00" + "time": "2022-01-02T09:53:40+00:00" }, { "name": "symfony/error-handler", - "version": "v5.4.3", + "version": "v5.4.11", "source": { "type": "git", "url": "https://github.com/symfony/error-handler.git", - "reference": "c4ffc2cd919950d13c8c9ce32a70c70214c3ffc5" + "reference": "f75d17cb4769eb38cd5fccbda95cd80a054d35c8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/error-handler/zipball/c4ffc2cd919950d13c8c9ce32a70c70214c3ffc5", - "reference": "c4ffc2cd919950d13c8c9ce32a70c70214c3ffc5", + "url": "https://api.github.com/repos/symfony/error-handler/zipball/f75d17cb4769eb38cd5fccbda95cd80a054d35c8", + "reference": "f75d17cb4769eb38cd5fccbda95cd80a054d35c8", "shasum": "" }, "require": { @@ -3454,7 +3474,7 @@ "description": "Provides tools to manage errors and ease debugging PHP code", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/error-handler/tree/v5.4.3" + "source": "https://github.com/symfony/error-handler/tree/v5.4.11" }, "funding": [ { @@ -3470,20 +3490,20 @@ "type": "tidelift" } ], - "time": "2022-01-02T09:53:40+00:00" + "time": "2022-07-29T07:37:50+00:00" }, { "name": "symfony/event-dispatcher", - "version": "v5.4.3", + "version": "v5.4.9", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "dec8a9f58d20df252b9cd89f1c6c1530f747685d" + "reference": "8e6ce1cc0279e3ff3c8ff0f43813bc88d21ca1bc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/dec8a9f58d20df252b9cd89f1c6c1530f747685d", - "reference": "dec8a9f58d20df252b9cd89f1c6c1530f747685d", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/8e6ce1cc0279e3ff3c8ff0f43813bc88d21ca1bc", + "reference": "8e6ce1cc0279e3ff3c8ff0f43813bc88d21ca1bc", "shasum": "" }, "require": { @@ -3539,7 +3559,7 @@ "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/event-dispatcher/tree/v5.4.3" + "source": "https://github.com/symfony/event-dispatcher/tree/v5.4.9" }, "funding": [ { @@ -3555,20 +3575,20 @@ "type": "tidelift" } ], - "time": "2022-01-02T09:53:40+00:00" + "time": "2022-05-05T16:45:39+00:00" }, { "name": "symfony/event-dispatcher-contracts", - "version": "v2.5.0", + "version": "v2.5.2", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher-contracts.git", - "reference": "66bea3b09be61613cd3b4043a65a8ec48cfa6d2a" + "reference": "f98b54df6ad059855739db6fcbc2d36995283fe1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/66bea3b09be61613cd3b4043a65a8ec48cfa6d2a", - "reference": "66bea3b09be61613cd3b4043a65a8ec48cfa6d2a", + "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/f98b54df6ad059855739db6fcbc2d36995283fe1", + "reference": "f98b54df6ad059855739db6fcbc2d36995283fe1", "shasum": "" }, "require": { @@ -3618,7 +3638,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v2.5.0" + "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v2.5.2" }, "funding": [ { @@ -3634,20 +3654,20 @@ "type": "tidelift" } ], - "time": "2021-07-12T14:48:14+00:00" + "time": "2022-01-02T09:53:40+00:00" }, { "name": "symfony/finder", - "version": "v5.4.3", + "version": "v5.4.11", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "231313534dded84c7ecaa79d14bc5da4ccb69b7d" + "reference": "7872a66f57caffa2916a584db1aa7f12adc76f8c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/231313534dded84c7ecaa79d14bc5da4ccb69b7d", - "reference": "231313534dded84c7ecaa79d14bc5da4ccb69b7d", + "url": "https://api.github.com/repos/symfony/finder/zipball/7872a66f57caffa2916a584db1aa7f12adc76f8c", + "reference": "7872a66f57caffa2916a584db1aa7f12adc76f8c", "shasum": "" }, "require": { @@ -3681,7 +3701,7 @@ "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/finder/tree/v5.4.3" + "source": "https://github.com/symfony/finder/tree/v5.4.11" }, "funding": [ { @@ -3697,20 +3717,20 @@ "type": "tidelift" } ], - "time": "2022-01-26T16:34:36+00:00" + "time": "2022-07-29T07:37:50+00:00" }, { "name": "symfony/http-foundation", - "version": "v5.4.6", + "version": "v5.4.12", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "34e89bc147633c0f9dd6caaaf56da3b806a21465" + "reference": "f4bfe9611b113b15d98a43da68ec9b5a00d56791" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/34e89bc147633c0f9dd6caaaf56da3b806a21465", - "reference": "34e89bc147633c0f9dd6caaaf56da3b806a21465", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/f4bfe9611b113b15d98a43da68ec9b5a00d56791", + "reference": "f4bfe9611b113b15d98a43da68ec9b5a00d56791", "shasum": "" }, "require": { @@ -3722,8 +3742,11 @@ "require-dev": { "predis/predis": "~1.0", "symfony/cache": "^4.4|^5.0|^6.0", + "symfony/dependency-injection": "^5.4|^6.0", "symfony/expression-language": "^4.4|^5.0|^6.0", - "symfony/mime": "^4.4|^5.0|^6.0" + "symfony/http-kernel": "^5.4.12|^6.0.12|^6.1.4", + "symfony/mime": "^4.4|^5.0|^6.0", + "symfony/rate-limiter": "^5.2|^6.0" }, "suggest": { "symfony/mime": "To use the file extension guesser" @@ -3754,7 +3777,7 @@ "description": "Defines an object-oriented layer for the HTTP specification", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-foundation/tree/v5.4.6" + "source": "https://github.com/symfony/http-foundation/tree/v5.4.12" }, "funding": [ { @@ -3770,20 +3793,20 @@ "type": "tidelift" } ], - "time": "2022-03-05T21:03:43+00:00" + "time": "2022-08-19T07:33:17+00:00" }, { "name": "symfony/http-kernel", - "version": "v5.4.6", + "version": "v5.4.12", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "d41f29ae9af1b5f40c7ebcddf09082953229411d" + "reference": "37f660fa3bcd78fe4893ce23ebe934618ec099be" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/d41f29ae9af1b5f40c7ebcddf09082953229411d", - "reference": "d41f29ae9af1b5f40c7ebcddf09082953229411d", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/37f660fa3bcd78fe4893ce23ebe934618ec099be", + "reference": "37f660fa3bcd78fe4893ce23ebe934618ec099be", "shasum": "" }, "require": { @@ -3866,7 +3889,7 @@ "description": "Provides a structured process for converting a Request into a Response", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-kernel/tree/v5.4.6" + "source": "https://github.com/symfony/http-kernel/tree/v5.4.12" }, "funding": [ { @@ -3882,20 +3905,20 @@ "type": "tidelift" } ], - "time": "2022-03-05T21:14:51+00:00" + "time": "2022-08-26T14:40:40+00:00" }, { "name": "symfony/mime", - "version": "v5.4.3", + "version": "v5.4.12", "source": { "type": "git", "url": "https://github.com/symfony/mime.git", - "reference": "e1503cfb5c9a225350f549d3bb99296f4abfb80f" + "reference": "03876e9c5a36f5b45e7d9a381edda5421eff8a90" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/mime/zipball/e1503cfb5c9a225350f549d3bb99296f4abfb80f", - "reference": "e1503cfb5c9a225350f549d3bb99296f4abfb80f", + "url": "https://api.github.com/repos/symfony/mime/zipball/03876e9c5a36f5b45e7d9a381edda5421eff8a90", + "reference": "03876e9c5a36f5b45e7d9a381edda5421eff8a90", "shasum": "" }, "require": { @@ -3949,7 +3972,7 @@ "mime-type" ], "support": { - "source": "https://github.com/symfony/mime/tree/v5.4.3" + "source": "https://github.com/symfony/mime/tree/v5.4.12" }, "funding": [ { @@ -3965,20 +3988,20 @@ "type": "tidelift" } ], - "time": "2022-01-02T09:53:40+00:00" + "time": "2022-08-19T14:24:03+00:00" }, { "name": "symfony/polyfill-ctype", - "version": "v1.25.0", + "version": "v1.26.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "30885182c981ab175d4d034db0f6f469898070ab" + "reference": "6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/30885182c981ab175d4d034db0f6f469898070ab", - "reference": "30885182c981ab175d4d034db0f6f469898070ab", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4", + "reference": "6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4", "shasum": "" }, "require": { @@ -3993,7 +4016,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.23-dev" + "dev-main": "1.26-dev" }, "thanks": { "name": "symfony/polyfill", @@ -4031,7 +4054,7 @@ "portable" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.25.0" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.26.0" }, "funding": [ { @@ -4047,20 +4070,20 @@ "type": "tidelift" } ], - "time": "2021-10-20T20:35:02+00:00" + "time": "2022-05-24T11:49:31+00:00" }, { "name": "symfony/polyfill-iconv", - "version": "v1.25.0", + "version": "v1.26.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-iconv.git", - "reference": "f1aed619e28cb077fc83fac8c4c0383578356e40" + "reference": "143f1881e655bebca1312722af8068de235ae5dc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-iconv/zipball/f1aed619e28cb077fc83fac8c4c0383578356e40", - "reference": "f1aed619e28cb077fc83fac8c4c0383578356e40", + "url": "https://api.github.com/repos/symfony/polyfill-iconv/zipball/143f1881e655bebca1312722af8068de235ae5dc", + "reference": "143f1881e655bebca1312722af8068de235ae5dc", "shasum": "" }, "require": { @@ -4075,7 +4098,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.23-dev" + "dev-main": "1.26-dev" }, "thanks": { "name": "symfony/polyfill", @@ -4114,7 +4137,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-iconv/tree/v1.25.0" + "source": "https://github.com/symfony/polyfill-iconv/tree/v1.26.0" }, "funding": [ { @@ -4130,20 +4153,20 @@ "type": "tidelift" } ], - "time": "2022-01-04T09:04:05+00:00" + "time": "2022-05-24T11:49:31+00:00" }, { "name": "symfony/polyfill-intl-grapheme", - "version": "v1.25.0", + "version": "v1.26.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-grapheme.git", - "reference": "81b86b50cf841a64252b439e738e97f4a34e2783" + "reference": "433d05519ce6990bf3530fba6957499d327395c2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/81b86b50cf841a64252b439e738e97f4a34e2783", - "reference": "81b86b50cf841a64252b439e738e97f4a34e2783", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/433d05519ce6990bf3530fba6957499d327395c2", + "reference": "433d05519ce6990bf3530fba6957499d327395c2", "shasum": "" }, "require": { @@ -4155,7 +4178,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.23-dev" + "dev-main": "1.26-dev" }, "thanks": { "name": "symfony/polyfill", @@ -4195,7 +4218,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.25.0" + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.26.0" }, "funding": [ { @@ -4211,20 +4234,20 @@ "type": "tidelift" } ], - "time": "2021-11-23T21:10:46+00:00" + "time": "2022-05-24T11:49:31+00:00" }, { "name": "symfony/polyfill-intl-idn", - "version": "v1.25.0", + "version": "v1.26.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-idn.git", - "reference": "749045c69efb97c70d25d7463abba812e91f3a44" + "reference": "59a8d271f00dd0e4c2e518104cc7963f655a1aa8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/749045c69efb97c70d25d7463abba812e91f3a44", - "reference": "749045c69efb97c70d25d7463abba812e91f3a44", + "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/59a8d271f00dd0e4c2e518104cc7963f655a1aa8", + "reference": "59a8d271f00dd0e4c2e518104cc7963f655a1aa8", "shasum": "" }, "require": { @@ -4238,7 +4261,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.23-dev" + "dev-main": "1.26-dev" }, "thanks": { "name": "symfony/polyfill", @@ -4282,7 +4305,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.25.0" + "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.26.0" }, "funding": [ { @@ -4298,20 +4321,20 @@ "type": "tidelift" } ], - "time": "2021-09-14T14:02:44+00:00" + "time": "2022-05-24T11:49:31+00:00" }, { "name": "symfony/polyfill-intl-normalizer", - "version": "v1.25.0", + "version": "v1.26.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-normalizer.git", - "reference": "8590a5f561694770bdcd3f9b5c69dde6945028e8" + "reference": "219aa369ceff116e673852dce47c3a41794c14bd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/8590a5f561694770bdcd3f9b5c69dde6945028e8", - "reference": "8590a5f561694770bdcd3f9b5c69dde6945028e8", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/219aa369ceff116e673852dce47c3a41794c14bd", + "reference": "219aa369ceff116e673852dce47c3a41794c14bd", "shasum": "" }, "require": { @@ -4323,7 +4346,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.23-dev" + "dev-main": "1.26-dev" }, "thanks": { "name": "symfony/polyfill", @@ -4366,7 +4389,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.25.0" + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.26.0" }, "funding": [ { @@ -4382,20 +4405,20 @@ "type": "tidelift" } ], - "time": "2021-02-19T12:13:01+00:00" + "time": "2022-05-24T11:49:31+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.25.0", + "version": "v1.26.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "0abb51d2f102e00a4eefcf46ba7fec406d245825" + "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/0abb51d2f102e00a4eefcf46ba7fec406d245825", - "reference": "0abb51d2f102e00a4eefcf46ba7fec406d245825", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e", + "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e", "shasum": "" }, "require": { @@ -4410,7 +4433,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.23-dev" + "dev-main": "1.26-dev" }, "thanks": { "name": "symfony/polyfill", @@ -4449,7 +4472,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.25.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.26.0" }, "funding": [ { @@ -4465,20 +4488,20 @@ "type": "tidelift" } ], - "time": "2021-11-30T18:21:41+00:00" + "time": "2022-05-24T11:49:31+00:00" }, { "name": "symfony/polyfill-php72", - "version": "v1.25.0", + "version": "v1.26.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php72.git", - "reference": "9a142215a36a3888e30d0a9eeea9766764e96976" + "reference": "bf44a9fd41feaac72b074de600314a93e2ae78e2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/9a142215a36a3888e30d0a9eeea9766764e96976", - "reference": "9a142215a36a3888e30d0a9eeea9766764e96976", + "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/bf44a9fd41feaac72b074de600314a93e2ae78e2", + "reference": "bf44a9fd41feaac72b074de600314a93e2ae78e2", "shasum": "" }, "require": { @@ -4487,7 +4510,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.23-dev" + "dev-main": "1.26-dev" }, "thanks": { "name": "symfony/polyfill", @@ -4525,7 +4548,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php72/tree/v1.25.0" + "source": "https://github.com/symfony/polyfill-php72/tree/v1.26.0" }, "funding": [ { @@ -4541,20 +4564,20 @@ "type": "tidelift" } ], - "time": "2021-05-27T09:17:38+00:00" + "time": "2022-05-24T11:49:31+00:00" }, { "name": "symfony/polyfill-php73", - "version": "v1.25.0", + "version": "v1.26.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "cc5db0e22b3cb4111010e48785a97f670b350ca5" + "reference": "e440d35fa0286f77fb45b79a03fedbeda9307e85" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/cc5db0e22b3cb4111010e48785a97f670b350ca5", - "reference": "cc5db0e22b3cb4111010e48785a97f670b350ca5", + "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/e440d35fa0286f77fb45b79a03fedbeda9307e85", + "reference": "e440d35fa0286f77fb45b79a03fedbeda9307e85", "shasum": "" }, "require": { @@ -4563,7 +4586,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.23-dev" + "dev-main": "1.26-dev" }, "thanks": { "name": "symfony/polyfill", @@ -4604,7 +4627,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php73/tree/v1.25.0" + "source": "https://github.com/symfony/polyfill-php73/tree/v1.26.0" }, "funding": [ { @@ -4620,20 +4643,20 @@ "type": "tidelift" } ], - "time": "2021-06-05T21:20:04+00:00" + "time": "2022-05-24T11:49:31+00:00" }, { "name": "symfony/polyfill-php80", - "version": "v1.25.0", + "version": "v1.26.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "4407588e0d3f1f52efb65fbe92babe41f37fe50c" + "reference": "cfa0ae98841b9e461207c13ab093d76b0fa7bace" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/4407588e0d3f1f52efb65fbe92babe41f37fe50c", - "reference": "4407588e0d3f1f52efb65fbe92babe41f37fe50c", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/cfa0ae98841b9e461207c13ab093d76b0fa7bace", + "reference": "cfa0ae98841b9e461207c13ab093d76b0fa7bace", "shasum": "" }, "require": { @@ -4642,7 +4665,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.23-dev" + "dev-main": "1.26-dev" }, "thanks": { "name": "symfony/polyfill", @@ -4687,7 +4710,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.25.0" + "source": "https://github.com/symfony/polyfill-php80/tree/v1.26.0" }, "funding": [ { @@ -4703,20 +4726,20 @@ "type": "tidelift" } ], - "time": "2022-03-04T08:16:47+00:00" + "time": "2022-05-10T07:21:04+00:00" }, { "name": "symfony/polyfill-php81", - "version": "v1.25.0", + "version": "v1.26.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php81.git", - "reference": "5de4ba2d41b15f9bd0e19b2ab9674135813ec98f" + "reference": "13f6d1271c663dc5ae9fb843a8f16521db7687a1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/5de4ba2d41b15f9bd0e19b2ab9674135813ec98f", - "reference": "5de4ba2d41b15f9bd0e19b2ab9674135813ec98f", + "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/13f6d1271c663dc5ae9fb843a8f16521db7687a1", + "reference": "13f6d1271c663dc5ae9fb843a8f16521db7687a1", "shasum": "" }, "require": { @@ -4725,7 +4748,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.23-dev" + "dev-main": "1.26-dev" }, "thanks": { "name": "symfony/polyfill", @@ -4766,7 +4789,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php81/tree/v1.25.0" + "source": "https://github.com/symfony/polyfill-php81/tree/v1.26.0" }, "funding": [ { @@ -4782,20 +4805,20 @@ "type": "tidelift" } ], - "time": "2021-09-13T13:58:11+00:00" + "time": "2022-05-24T11:49:31+00:00" }, { "name": "symfony/process", - "version": "v5.4.5", + "version": "v5.4.11", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "95440409896f90a5f85db07a32b517ecec17fa4c" + "reference": "6e75fe6874cbc7e4773d049616ab450eff537bf1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/95440409896f90a5f85db07a32b517ecec17fa4c", - "reference": "95440409896f90a5f85db07a32b517ecec17fa4c", + "url": "https://api.github.com/repos/symfony/process/zipball/6e75fe6874cbc7e4773d049616ab450eff537bf1", + "reference": "6e75fe6874cbc7e4773d049616ab450eff537bf1", "shasum": "" }, "require": { @@ -4828,7 +4851,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v5.4.5" + "source": "https://github.com/symfony/process/tree/v5.4.11" }, "funding": [ { @@ -4844,20 +4867,20 @@ "type": "tidelift" } ], - "time": "2022-01-30T18:16:22+00:00" + "time": "2022-06-27T16:58:25+00:00" }, { "name": "symfony/routing", - "version": "v5.4.3", + "version": "v5.4.11", "source": { "type": "git", "url": "https://github.com/symfony/routing.git", - "reference": "44b29c7a94e867ccde1da604792f11a469958981" + "reference": "3e01ccd9b2a3a4167ba2b3c53612762300300226" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/routing/zipball/44b29c7a94e867ccde1da604792f11a469958981", - "reference": "44b29c7a94e867ccde1da604792f11a469958981", + "url": "https://api.github.com/repos/symfony/routing/zipball/3e01ccd9b2a3a4167ba2b3c53612762300300226", + "reference": "3e01ccd9b2a3a4167ba2b3c53612762300300226", "shasum": "" }, "require": { @@ -4918,7 +4941,7 @@ "url" ], "support": { - "source": "https://github.com/symfony/routing/tree/v5.4.3" + "source": "https://github.com/symfony/routing/tree/v5.4.11" }, "funding": [ { @@ -4934,26 +4957,26 @@ "type": "tidelift" } ], - "time": "2022-01-02T09:53:40+00:00" + "time": "2022-07-20T13:00:38+00:00" }, { "name": "symfony/service-contracts", - "version": "v2.5.0", + "version": "v2.5.2", "source": { "type": "git", "url": "https://github.com/symfony/service-contracts.git", - "reference": "1ab11b933cd6bc5464b08e81e2c5b07dec58b0fc" + "reference": "4b426aac47d6427cc1a1d0f7e2ac724627f5966c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/1ab11b933cd6bc5464b08e81e2c5b07dec58b0fc", - "reference": "1ab11b933cd6bc5464b08e81e2c5b07dec58b0fc", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/4b426aac47d6427cc1a1d0f7e2ac724627f5966c", + "reference": "4b426aac47d6427cc1a1d0f7e2ac724627f5966c", "shasum": "" }, "require": { "php": ">=7.2.5", "psr/container": "^1.1", - "symfony/deprecation-contracts": "^2.1" + "symfony/deprecation-contracts": "^2.1|^3" }, "conflict": { "ext-psr": "<1.1|>=2" @@ -5001,7 +5024,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/service-contracts/tree/v2.5.0" + "source": "https://github.com/symfony/service-contracts/tree/v2.5.2" }, "funding": [ { @@ -5017,20 +5040,20 @@ "type": "tidelift" } ], - "time": "2021-11-04T16:48:04+00:00" + "time": "2022-05-30T19:17:29+00:00" }, { "name": "symfony/string", - "version": "v5.4.3", + "version": "v5.4.12", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "92043b7d8383e48104e411bc9434b260dbeb5a10" + "reference": "2fc515e512d721bf31ea76bd02fe23ada4640058" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/92043b7d8383e48104e411bc9434b260dbeb5a10", - "reference": "92043b7d8383e48104e411bc9434b260dbeb5a10", + "url": "https://api.github.com/repos/symfony/string/zipball/2fc515e512d721bf31ea76bd02fe23ada4640058", + "reference": "2fc515e512d721bf31ea76bd02fe23ada4640058", "shasum": "" }, "require": { @@ -5087,7 +5110,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v5.4.3" + "source": "https://github.com/symfony/string/tree/v5.4.12" }, "funding": [ { @@ -5103,20 +5126,20 @@ "type": "tidelift" } ], - "time": "2022-01-02T09:53:40+00:00" + "time": "2022-08-12T17:03:11+00:00" }, { "name": "symfony/translation", - "version": "v5.4.6", + "version": "v5.4.12", "source": { "type": "git", "url": "https://github.com/symfony/translation.git", - "reference": "a7ca9fdfffb0174209440c2ffa1dee228e15d95b" + "reference": "42ecc77eb4f229ce2df702a648ec93b8478d76ae" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation/zipball/a7ca9fdfffb0174209440c2ffa1dee228e15d95b", - "reference": "a7ca9fdfffb0174209440c2ffa1dee228e15d95b", + "url": "https://api.github.com/repos/symfony/translation/zipball/42ecc77eb4f229ce2df702a648ec93b8478d76ae", + "reference": "42ecc77eb4f229ce2df702a648ec93b8478d76ae", "shasum": "" }, "require": { @@ -5184,7 +5207,7 @@ "description": "Provides tools to internationalize your application", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/translation/tree/v5.4.6" + "source": "https://github.com/symfony/translation/tree/v5.4.12" }, "funding": [ { @@ -5200,20 +5223,20 @@ "type": "tidelift" } ], - "time": "2022-03-02T12:56:28+00:00" + "time": "2022-08-02T15:52:22+00:00" }, { "name": "symfony/translation-contracts", - "version": "v2.5.0", + "version": "v2.5.2", "source": { "type": "git", "url": "https://github.com/symfony/translation-contracts.git", - "reference": "d28150f0f44ce854e942b671fc2620a98aae1b1e" + "reference": "136b19dd05cdf0709db6537d058bcab6dd6e2dbe" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/d28150f0f44ce854e942b671fc2620a98aae1b1e", - "reference": "d28150f0f44ce854e942b671fc2620a98aae1b1e", + "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/136b19dd05cdf0709db6537d058bcab6dd6e2dbe", + "reference": "136b19dd05cdf0709db6537d058bcab6dd6e2dbe", "shasum": "" }, "require": { @@ -5262,7 +5285,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/translation-contracts/tree/v2.5.0" + "source": "https://github.com/symfony/translation-contracts/tree/v2.5.2" }, "funding": [ { @@ -5278,20 +5301,20 @@ "type": "tidelift" } ], - "time": "2021-08-17T14:20:01+00:00" + "time": "2022-06-27T16:58:25+00:00" }, { "name": "symfony/var-dumper", - "version": "v5.4.6", + "version": "v5.4.11", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "294e9da6e2e0dd404e983daa5aa74253d92c05d0" + "reference": "b8f306d7b8ef34fb3db3305be97ba8e088fb4861" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/294e9da6e2e0dd404e983daa5aa74253d92c05d0", - "reference": "294e9da6e2e0dd404e983daa5aa74253d92c05d0", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/b8f306d7b8ef34fb3db3305be97ba8e088fb4861", + "reference": "b8f306d7b8ef34fb3db3305be97ba8e088fb4861", "shasum": "" }, "require": { @@ -5351,7 +5374,7 @@ "dump" ], "support": { - "source": "https://github.com/symfony/var-dumper/tree/v5.4.6" + "source": "https://github.com/symfony/var-dumper/tree/v5.4.11" }, "funding": [ { @@ -5367,20 +5390,20 @@ "type": "tidelift" } ], - "time": "2022-03-02T12:42:23+00:00" + "time": "2022-07-20T13:00:38+00:00" }, { "name": "tijsverkoyen/css-to-inline-styles", - "version": "2.2.4", + "version": "2.2.5", "source": { "type": "git", "url": "https://github.com/tijsverkoyen/CssToInlineStyles.git", - "reference": "da444caae6aca7a19c0c140f68c6182e337d5b1c" + "reference": "4348a3a06651827a27d989ad1d13efec6bb49b19" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/tijsverkoyen/CssToInlineStyles/zipball/da444caae6aca7a19c0c140f68c6182e337d5b1c", - "reference": "da444caae6aca7a19c0c140f68c6182e337d5b1c", + "url": "https://api.github.com/repos/tijsverkoyen/CssToInlineStyles/zipball/4348a3a06651827a27d989ad1d13efec6bb49b19", + "reference": "4348a3a06651827a27d989ad1d13efec6bb49b19", "shasum": "" }, "require": { @@ -5418,9 +5441,9 @@ "homepage": "https://github.com/tijsverkoyen/CssToInlineStyles", "support": { "issues": "https://github.com/tijsverkoyen/CssToInlineStyles/issues", - "source": "https://github.com/tijsverkoyen/CssToInlineStyles/tree/2.2.4" + "source": "https://github.com/tijsverkoyen/CssToInlineStyles/tree/2.2.5" }, - "time": "2021-12-08T09:12:39+00:00" + "time": "2022-09-12T13:28:28+00:00" }, { "name": "vlucas/phpdotenv", @@ -5578,21 +5601,21 @@ }, { "name": "webmozart/assert", - "version": "1.10.0", + "version": "1.11.0", "source": { "type": "git", "url": "https://github.com/webmozarts/assert.git", - "reference": "6964c76c7804814a842473e0c8fd15bab0f18e25" + "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webmozarts/assert/zipball/6964c76c7804814a842473e0c8fd15bab0f18e25", - "reference": "6964c76c7804814a842473e0c8fd15bab0f18e25", + "url": "https://api.github.com/repos/webmozarts/assert/zipball/11cb2199493b2f8a3b53e7f19068fc6aac760991", + "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991", "shasum": "" }, "require": { - "php": "^7.2 || ^8.0", - "symfony/polyfill-ctype": "^1.8" + "ext-ctype": "*", + "php": "^7.2 || ^8.0" }, "conflict": { "phpstan/phpstan": "<0.12.20", @@ -5630,9 +5653,9 @@ ], "support": { "issues": "https://github.com/webmozarts/assert/issues", - "source": "https://github.com/webmozarts/assert/tree/1.10.0" + "source": "https://github.com/webmozarts/assert/tree/1.11.0" }, - "time": "2021-03-09T10:59:23+00:00" + "time": "2022-06-03T18:03:27+00:00" } ], "packages-dev": [ @@ -5783,16 +5806,16 @@ }, { "name": "facade/flare-client-php", - "version": "1.9.1", + "version": "1.10.0", "source": { "type": "git", "url": "https://github.com/facade/flare-client-php.git", - "reference": "b2adf1512755637d0cef4f7d1b54301325ac78ed" + "reference": "213fa2c69e120bca4c51ba3e82ed1834ef3f41b8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/facade/flare-client-php/zipball/b2adf1512755637d0cef4f7d1b54301325ac78ed", - "reference": "b2adf1512755637d0cef4f7d1b54301325ac78ed", + "url": "https://api.github.com/repos/facade/flare-client-php/zipball/213fa2c69e120bca4c51ba3e82ed1834ef3f41b8", + "reference": "213fa2c69e120bca4c51ba3e82ed1834ef3f41b8", "shasum": "" }, "require": { @@ -5805,7 +5828,7 @@ }, "require-dev": { "friendsofphp/php-cs-fixer": "^2.14", - "phpunit/phpunit": "^7.5.16", + "phpunit/phpunit": "^7.5", "spatie/phpunit-snapshot-assertions": "^2.0" }, "type": "library", @@ -5836,7 +5859,7 @@ ], "support": { "issues": "https://github.com/facade/flare-client-php/issues", - "source": "https://github.com/facade/flare-client-php/tree/1.9.1" + "source": "https://github.com/facade/flare-client-php/tree/1.10.0" }, "funding": [ { @@ -5844,20 +5867,20 @@ "type": "github" } ], - "time": "2021-09-13T12:16:46+00:00" + "time": "2022-08-09T11:23:57+00:00" }, { "name": "facade/ignition", - "version": "2.17.5", + "version": "2.17.6", "source": { "type": "git", "url": "https://github.com/facade/ignition.git", - "reference": "1d71996f83c9a5a7807331b8986ac890352b7a0c" + "reference": "6acd82e986a2ecee89e2e68adfc30a1936d1ab7c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/facade/ignition/zipball/1d71996f83c9a5a7807331b8986ac890352b7a0c", - "reference": "1d71996f83c9a5a7807331b8986ac890352b7a0c", + "url": "https://api.github.com/repos/facade/ignition/zipball/6acd82e986a2ecee89e2e68adfc30a1936d1ab7c", + "reference": "6acd82e986a2ecee89e2e68adfc30a1936d1ab7c", "shasum": "" }, "require": { @@ -5922,7 +5945,7 @@ "issues": "https://github.com/facade/ignition/issues", "source": "https://github.com/facade/ignition" }, - "time": "2022-02-23T18:31:24+00:00" + "time": "2022-06-30T18:26:59+00:00" }, { "name": "facade/ignition-contracts", @@ -5979,16 +6002,16 @@ }, { "name": "fakerphp/faker", - "version": "v1.19.0", + "version": "v1.20.0", "source": { "type": "git", "url": "https://github.com/FakerPHP/Faker.git", - "reference": "d7f08a622b3346766325488aa32ddc93ccdecc75" + "reference": "37f751c67a5372d4e26353bd9384bc03744ec77b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/FakerPHP/Faker/zipball/d7f08a622b3346766325488aa32ddc93ccdecc75", - "reference": "d7f08a622b3346766325488aa32ddc93ccdecc75", + "url": "https://api.github.com/repos/FakerPHP/Faker/zipball/37f751c67a5372d4e26353bd9384bc03744ec77b", + "reference": "37f751c67a5372d4e26353bd9384bc03744ec77b", "shasum": "" }, "require": { @@ -6015,7 +6038,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "v1.19-dev" + "dev-main": "v1.20-dev" } }, "autoload": { @@ -6040,9 +6063,9 @@ ], "support": { "issues": "https://github.com/FakerPHP/Faker/issues", - "source": "https://github.com/FakerPHP/Faker/tree/v1.19.0" + "source": "https://github.com/FakerPHP/Faker/tree/v1.20.0" }, - "time": "2022-02-02T17:38:57+00:00" + "time": "2022-07-20T13:12:54+00:00" }, { "name": "filp/whoops", @@ -6168,16 +6191,16 @@ }, { "name": "laravel/sail", - "version": "v1.13.6", + "version": "v1.16.0", "source": { "type": "git", "url": "https://github.com/laravel/sail.git", - "reference": "6205041336b09b965af1d6af29261584e787bf52" + "reference": "73030c18b769f27e6f6aacf7848d024fa9a55560" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/sail/zipball/6205041336b09b965af1d6af29261584e787bf52", - "reference": "6205041336b09b965af1d6af29261584e787bf52", + "url": "https://api.github.com/repos/laravel/sail/zipball/73030c18b769f27e6f6aacf7848d024fa9a55560", + "reference": "73030c18b769f27e6f6aacf7848d024fa9a55560", "shasum": "" }, "require": { @@ -6224,20 +6247,20 @@ "issues": "https://github.com/laravel/sail/issues", "source": "https://github.com/laravel/sail" }, - "time": "2022-03-07T15:35:47+00:00" + "time": "2022-08-31T16:38:14+00:00" }, { "name": "mockery/mockery", - "version": "1.5.0", + "version": "1.5.1", "source": { "type": "git", "url": "https://github.com/mockery/mockery.git", - "reference": "c10a5f6e06fc2470ab1822fa13fa2a7380f8fbac" + "reference": "e92dcc83d5a51851baf5f5591d32cb2b16e3684e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/mockery/mockery/zipball/c10a5f6e06fc2470ab1822fa13fa2a7380f8fbac", - "reference": "c10a5f6e06fc2470ab1822fa13fa2a7380f8fbac", + "url": "https://api.github.com/repos/mockery/mockery/zipball/e92dcc83d5a51851baf5f5591d32cb2b16e3684e", + "reference": "e92dcc83d5a51851baf5f5591d32cb2b16e3684e", "shasum": "" }, "require": { @@ -6294,9 +6317,9 @@ ], "support": { "issues": "https://github.com/mockery/mockery/issues", - "source": "https://github.com/mockery/mockery/tree/1.5.0" + "source": "https://github.com/mockery/mockery/tree/1.5.1" }, - "time": "2022-01-20T13:18:17+00:00" + "time": "2022-09-07T15:32:08+00:00" }, { "name": "myclabs/deep-copy", @@ -6556,263 +6579,32 @@ "time": "2022-02-21T01:04:05+00:00" }, { - "name": "phpdocumentor/reflection-common", - "version": "2.2.0", + "name": "phpstan/phpdoc-parser", + "version": "1.8.0", "source": { "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionCommon.git", - "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b" + "url": "https://github.com/phpstan/phpdoc-parser.git", + "reference": "8dd908dd6156e974b9a0f8bb4cd5ad0707830f04" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/1d01c49d4ed62f25aa84a747ad35d5a16924662b", - "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b", + "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/8dd908dd6156e974b9a0f8bb4cd5ad0707830f04", + "reference": "8dd908dd6156e974b9a0f8bb4cd5ad0707830f04", "shasum": "" }, "require": { "php": "^7.2 || ^8.0" }, - "type": "library", - "extra": { - "branch-alias": { - "dev-2.x": "2.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jaap van Otterdijk", - "email": "opensource@ijaap.nl" - } - ], - "description": "Common reflection classes used by phpdocumentor to reflect the code structure", - "homepage": "http://www.phpdoc.org", - "keywords": [ - "FQSEN", - "phpDocumentor", - "phpdoc", - "reflection", - "static analysis" - ], - "support": { - "issues": "https://github.com/phpDocumentor/ReflectionCommon/issues", - "source": "https://github.com/phpDocumentor/ReflectionCommon/tree/2.x" - }, - "time": "2020-06-27T09:03:43+00:00" - }, - { - "name": "phpdocumentor/reflection-docblock", - "version": "5.3.0", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "622548b623e81ca6d78b721c5e029f4ce664f170" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/622548b623e81ca6d78b721c5e029f4ce664f170", - "reference": "622548b623e81ca6d78b721c5e029f4ce664f170", - "shasum": "" - }, - "require": { - "ext-filter": "*", - "php": "^7.2 || ^8.0", - "phpdocumentor/reflection-common": "^2.2", - "phpdocumentor/type-resolver": "^1.3", - "webmozart/assert": "^1.9.1" - }, - "require-dev": { - "mockery/mockery": "~1.3.2", - "psalm/phar": "^4.8" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Mike van Riel", - "email": "me@mikevanriel.com" - }, - { - "name": "Jaap van Otterdijk", - "email": "account@ijaap.nl" - } - ], - "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", - "support": { - "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues", - "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/5.3.0" - }, - "time": "2021-10-19T17:43:47+00:00" - }, - { - "name": "phpdocumentor/type-resolver", - "version": "1.6.0", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "93ebd0014cab80c4ea9f5e297ea48672f1b87706" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/93ebd0014cab80c4ea9f5e297ea48672f1b87706", - "reference": "93ebd0014cab80c4ea9f5e297ea48672f1b87706", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0", - "phpdocumentor/reflection-common": "^2.0" - }, - "require-dev": { - "ext-tokenizer": "*", - "psalm/phar": "^4.8" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-1.x": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Mike van Riel", - "email": "me@mikevanriel.com" - } - ], - "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", - "support": { - "issues": "https://github.com/phpDocumentor/TypeResolver/issues", - "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.6.0" - }, - "time": "2022-01-04T19:58:01+00:00" - }, - { - "name": "phpspec/prophecy", - "version": "v1.15.0", - "source": { - "type": "git", - "url": "https://github.com/phpspec/prophecy.git", - "reference": "bbcd7380b0ebf3961ee21409db7b38bc31d69a13" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/bbcd7380b0ebf3961ee21409db7b38bc31d69a13", - "reference": "bbcd7380b0ebf3961ee21409db7b38bc31d69a13", - "shasum": "" - }, - "require": { - "doctrine/instantiator": "^1.2", - "php": "^7.2 || ~8.0, <8.2", - "phpdocumentor/reflection-docblock": "^5.2", - "sebastian/comparator": "^3.0 || ^4.0", - "sebastian/recursion-context": "^3.0 || ^4.0" - }, - "require-dev": { - "phpspec/phpspec": "^6.0 || ^7.0", - "phpunit/phpunit": "^8.0 || ^9.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "Prophecy\\": "src/Prophecy" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Konstantin Kudryashov", - "email": "ever.zet@gmail.com", - "homepage": "http://everzet.com" - }, - { - "name": "Marcello Duarte", - "email": "marcello.duarte@gmail.com" - } - ], - "description": "Highly opinionated mocking framework for PHP 5.3+", - "homepage": "https://github.com/phpspec/prophecy", - "keywords": [ - "Double", - "Dummy", - "fake", - "mock", - "spy", - "stub" - ], - "support": { - "issues": "https://github.com/phpspec/prophecy/issues", - "source": "https://github.com/phpspec/prophecy/tree/v1.15.0" - }, - "time": "2021-12-08T12:19:24+00:00" - }, - { - "name": "phpstan/phpdoc-parser", - "version": "1.2.0", - "source": { - "type": "git", - "url": "https://github.com/phpstan/phpdoc-parser.git", - "reference": "dbc093d7af60eff5cd575d2ed761b15ed40bd08e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/dbc093d7af60eff5cd575d2ed761b15ed40bd08e", - "reference": "dbc093d7af60eff5cd575d2ed761b15ed40bd08e", - "shasum": "" - }, - "require": { - "php": "^7.1 || ^8.0" - }, "require-dev": { "php-parallel-lint/php-parallel-lint": "^1.2", "phpstan/extension-installer": "^1.0", - "phpstan/phpstan": "^1.0", + "phpstan/phpstan": "^1.5", + "phpstan/phpstan-phpunit": "^1.1", "phpstan/phpstan-strict-rules": "^1.0", "phpunit/phpunit": "^9.5", "symfony/process": "^5.2" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, "autoload": { "psr-4": { "PHPStan\\PhpDocParser\\": [ @@ -6827,29 +6619,29 @@ "description": "PHPDoc parser with support for nullable, intersection and generic types", "support": { "issues": "https://github.com/phpstan/phpdoc-parser/issues", - "source": "https://github.com/phpstan/phpdoc-parser/tree/1.2.0" + "source": "https://github.com/phpstan/phpdoc-parser/tree/1.8.0" }, - "time": "2021-09-16T20:46:02+00:00" + "time": "2022-09-04T18:59:06+00:00" }, { "name": "phpunit/php-code-coverage", - "version": "9.2.15", + "version": "9.2.17", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "2e9da11878c4202f97915c1cb4bb1ca318a63f5f" + "reference": "aa94dc41e8661fe90c7316849907cba3007b10d8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/2e9da11878c4202f97915c1cb4bb1ca318a63f5f", - "reference": "2e9da11878c4202f97915c1cb4bb1ca318a63f5f", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/aa94dc41e8661fe90c7316849907cba3007b10d8", + "reference": "aa94dc41e8661fe90c7316849907cba3007b10d8", "shasum": "" }, "require": { "ext-dom": "*", "ext-libxml": "*", "ext-xmlwriter": "*", - "nikic/php-parser": "^4.13.0", + "nikic/php-parser": "^4.14", "php": ">=7.3", "phpunit/php-file-iterator": "^3.0.3", "phpunit/php-text-template": "^2.0.2", @@ -6898,7 +6690,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.15" + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.17" }, "funding": [ { @@ -6906,7 +6698,7 @@ "type": "github" } ], - "time": "2022-03-07T09:28:20+00:00" + "time": "2022-08-30T12:24:04+00:00" }, { "name": "phpunit/php-file-iterator", @@ -7151,16 +6943,16 @@ }, { "name": "phpunit/phpunit", - "version": "9.5.18", + "version": "9.5.24", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "1b5856028273bfd855e60a887278857d872ec67a" + "reference": "d0aa6097bef9fd42458a9b3c49da32c6ce6129c5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/1b5856028273bfd855e60a887278857d872ec67a", - "reference": "1b5856028273bfd855e60a887278857d872ec67a", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/d0aa6097bef9fd42458a9b3c49da32c6ce6129c5", + "reference": "d0aa6097bef9fd42458a9b3c49da32c6ce6129c5", "shasum": "" }, "require": { @@ -7175,7 +6967,6 @@ "phar-io/manifest": "^2.0.3", "phar-io/version": "^3.0.2", "php": ">=7.3", - "phpspec/prophecy": "^1.12.1", "phpunit/php-code-coverage": "^9.2.13", "phpunit/php-file-iterator": "^3.0.5", "phpunit/php-invoker": "^3.1.1", @@ -7190,13 +6981,9 @@ "sebastian/global-state": "^5.0.1", "sebastian/object-enumerator": "^4.0.3", "sebastian/resource-operations": "^3.0.3", - "sebastian/type": "^2.3.4", + "sebastian/type": "^3.1", "sebastian/version": "^3.0.2" }, - "require-dev": { - "ext-pdo": "*", - "phpspec/prophecy-phpunit": "^2.0.1" - }, "suggest": { "ext-soap": "*", "ext-xdebug": "*" @@ -7238,7 +7025,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.18" + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.24" }, "funding": [ { @@ -7250,7 +7037,7 @@ "type": "github" } ], - "time": "2022-03-08T06:52:28+00:00" + "time": "2022-08-30T07:42:16+00:00" }, { "name": "sebastian/cli-parser", @@ -7421,16 +7208,16 @@ }, { "name": "sebastian/comparator", - "version": "4.0.6", + "version": "4.0.8", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "55f4261989e546dc112258c7a75935a81a7ce382" + "reference": "fa0f136dd2334583309d32b62544682ee972b51a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/55f4261989e546dc112258c7a75935a81a7ce382", - "reference": "55f4261989e546dc112258c7a75935a81a7ce382", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/fa0f136dd2334583309d32b62544682ee972b51a", + "reference": "fa0f136dd2334583309d32b62544682ee972b51a", "shasum": "" }, "require": { @@ -7483,7 +7270,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/comparator/issues", - "source": "https://github.com/sebastianbergmann/comparator/tree/4.0.6" + "source": "https://github.com/sebastianbergmann/comparator/tree/4.0.8" }, "funding": [ { @@ -7491,7 +7278,7 @@ "type": "github" } ], - "time": "2020-10-26T15:49:45+00:00" + "time": "2022-09-14T12:41:17+00:00" }, { "name": "sebastian/complexity", @@ -7618,16 +7405,16 @@ }, { "name": "sebastian/environment", - "version": "5.1.3", + "version": "5.1.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "388b6ced16caa751030f6a69e588299fa09200ac" + "reference": "1b5dff7bb151a4db11d49d90e5408e4e938270f7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/388b6ced16caa751030f6a69e588299fa09200ac", - "reference": "388b6ced16caa751030f6a69e588299fa09200ac", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/1b5dff7bb151a4db11d49d90e5408e4e938270f7", + "reference": "1b5dff7bb151a4db11d49d90e5408e4e938270f7", "shasum": "" }, "require": { @@ -7669,7 +7456,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/environment/issues", - "source": "https://github.com/sebastianbergmann/environment/tree/5.1.3" + "source": "https://github.com/sebastianbergmann/environment/tree/5.1.4" }, "funding": [ { @@ -7677,20 +7464,20 @@ "type": "github" } ], - "time": "2020-09-28T05:52:38+00:00" + "time": "2022-04-03T09:37:03+00:00" }, { "name": "sebastian/exporter", - "version": "4.0.4", + "version": "4.0.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "65e8b7db476c5dd267e65eea9cab77584d3cfff9" + "reference": "ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/65e8b7db476c5dd267e65eea9cab77584d3cfff9", - "reference": "65e8b7db476c5dd267e65eea9cab77584d3cfff9", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d", + "reference": "ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d", "shasum": "" }, "require": { @@ -7746,7 +7533,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/exporter/issues", - "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.4" + "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.5" }, "funding": [ { @@ -7754,7 +7541,7 @@ "type": "github" } ], - "time": "2021-11-11T14:18:36+00:00" + "time": "2022-09-14T06:03:37+00:00" }, { "name": "sebastian/global-state", @@ -8109,28 +7896,28 @@ }, { "name": "sebastian/type", - "version": "2.3.4", + "version": "3.2.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/type.git", - "reference": "b8cd8a1c753c90bc1a0f5372170e3e489136f914" + "reference": "fb3fe09c5f0bae6bc27ef3ce933a1e0ed9464b6e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/b8cd8a1c753c90bc1a0f5372170e3e489136f914", - "reference": "b8cd8a1c753c90bc1a0f5372170e3e489136f914", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/fb3fe09c5f0bae6bc27ef3ce933a1e0ed9464b6e", + "reference": "fb3fe09c5f0bae6bc27ef3ce933a1e0ed9464b6e", "shasum": "" }, "require": { "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^9.5" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.3-dev" + "dev-master": "3.2-dev" } }, "autoload": { @@ -8153,7 +7940,7 @@ "homepage": "https://github.com/sebastianbergmann/type", "support": { "issues": "https://github.com/sebastianbergmann/type/issues", - "source": "https://github.com/sebastianbergmann/type/tree/2.3.4" + "source": "https://github.com/sebastianbergmann/type/tree/3.2.0" }, "funding": [ { @@ -8161,7 +7948,7 @@ "type": "github" } ], - "time": "2021-06-15T12:49:02+00:00" + "time": "2022-09-12T14:47:03+00:00" }, { "name": "sebastian/version", @@ -8218,32 +8005,32 @@ }, { "name": "slevomat/coding-standard", - "version": "7.0.19", + "version": "7.2.1", "source": { "type": "git", "url": "https://github.com/slevomat/coding-standard.git", - "reference": "bef66a43815bbf9b5f49775e9ded3f7c6ba0cc37" + "reference": "aff06ae7a84e4534bf6f821dc982a93a5d477c90" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/slevomat/coding-standard/zipball/bef66a43815bbf9b5f49775e9ded3f7c6ba0cc37", - "reference": "bef66a43815bbf9b5f49775e9ded3f7c6ba0cc37", + "url": "https://api.github.com/repos/slevomat/coding-standard/zipball/aff06ae7a84e4534bf6f821dc982a93a5d477c90", + "reference": "aff06ae7a84e4534bf6f821dc982a93a5d477c90", "shasum": "" }, "require": { "dealerdirect/phpcodesniffer-composer-installer": "^0.6.2 || ^0.7", - "php": "^7.1 || ^8.0", - "phpstan/phpdoc-parser": "^1.0.0", + "php": "^7.2 || ^8.0", + "phpstan/phpdoc-parser": "^1.5.1", "squizlabs/php_codesniffer": "^3.6.2" }, "require-dev": { - "phing/phing": "2.17.2", + "phing/phing": "2.17.3", "php-parallel-lint/php-parallel-lint": "1.3.2", - "phpstan/phpstan": "1.4.6", + "phpstan/phpstan": "1.4.10|1.7.1", "phpstan/phpstan-deprecation-rules": "1.0.0", - "phpstan/phpstan-phpunit": "1.0.0", - "phpstan/phpstan-strict-rules": "1.1.0", - "phpunit/phpunit": "7.5.20|8.5.21|9.5.16" + "phpstan/phpstan-phpunit": "1.0.0|1.1.1", + "phpstan/phpstan-strict-rules": "1.2.3", + "phpunit/phpunit": "7.5.20|8.5.21|9.5.20" }, "type": "phpcodesniffer-standard", "extra": { @@ -8263,7 +8050,7 @@ "description": "Slevomat Coding Standard for PHP_CodeSniffer complements Consistence Coding Standard by providing sniffs with additional checks.", "support": { "issues": "https://github.com/slevomat/coding-standard/issues", - "source": "https://github.com/slevomat/coding-standard/tree/7.0.19" + "source": "https://github.com/slevomat/coding-standard/tree/7.2.1" }, "funding": [ { @@ -8275,20 +8062,20 @@ "type": "tidelift" } ], - "time": "2022-03-01T18:01:41+00:00" + "time": "2022-05-25T10:58:12+00:00" }, { "name": "squizlabs/php_codesniffer", - "version": "3.6.2", + "version": "3.7.1", "source": { "type": "git", "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", - "reference": "5e4e71592f69da17871dba6e80dd51bce74a351a" + "reference": "1359e176e9307e906dc3d890bcc9603ff6d90619" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/5e4e71592f69da17871dba6e80dd51bce74a351a", - "reference": "5e4e71592f69da17871dba6e80dd51bce74a351a", + "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/1359e176e9307e906dc3d890bcc9603ff6d90619", + "reference": "1359e176e9307e906dc3d890bcc9603ff6d90619", "shasum": "" }, "require": { @@ -8331,7 +8118,7 @@ "source": "https://github.com/squizlabs/PHP_CodeSniffer", "wiki": "https://github.com/squizlabs/PHP_CodeSniffer/wiki" }, - "time": "2021-12-12T21:44:58+00:00" + "time": "2022-06-18T07:21:10+00:00" }, { "name": "theseer/tokenizer", From bf86a009f8eb3d1a5f17b44bf8967cb04fd84f56 Mon Sep 17 00:00:00 2001 From: Olivier Legat Date: Thu, 15 Sep 2022 11:35:58 +0200 Subject: [PATCH 11/11] composer require refresh sitemap, config for sitemap --- composer.json | 1 + composer.lock | 909 +++++++++++++++++++++++++++++++++---- config/refresh-sitemap.php | 116 +++++ 3 files changed, 946 insertions(+), 80 deletions(-) create mode 100644 config/refresh-sitemap.php diff --git a/composer.json b/composer.json index 4070bbd..b2686aa 100644 --- a/composer.json +++ b/composer.json @@ -14,6 +14,7 @@ "joedixon/laravel-translation": "^1.1", "kwaadpepper/enum": "^2.1", "kwaadpepper/exception-handler": "^0.0.9", + "kwaadpepper/refresh-sitemap": "^1.0", "laravel/framework": "^8.65", "laravel/tinker": "^2.5", "laravel/ui": "^3.3", diff --git a/composer.lock b/composer.lock index 6dcb8ef..f392849 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": "b27ccff2f463281dca6230c1d20be58e", + "content-hash": "2885748d938938a8bc1f1fa16bb39312", "packages": [ { "name": "asm89/stack-cors", @@ -827,47 +827,43 @@ }, { "name": "guzzlehttp/psr7", - "version": "2.4.1", + "version": "1.9.0", "source": { "type": "git", "url": "https://github.com/guzzle/psr7.git", - "reference": "69568e4293f4fa993f3b0e51c9723e1e17c41379" + "reference": "e98e3e6d4f86621a9b75f623996e6bbdeb4b9318" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/69568e4293f4fa993f3b0e51c9723e1e17c41379", - "reference": "69568e4293f4fa993f3b0e51c9723e1e17c41379", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/e98e3e6d4f86621a9b75f623996e6bbdeb4b9318", + "reference": "e98e3e6d4f86621a9b75f623996e6bbdeb4b9318", "shasum": "" }, "require": { - "php": "^7.2.5 || ^8.0", - "psr/http-factory": "^1.0", - "psr/http-message": "^1.0", - "ralouphie/getallheaders": "^3.0" + "php": ">=5.4.0", + "psr/http-message": "~1.0", + "ralouphie/getallheaders": "^2.0.5 || ^3.0.0" }, "provide": { - "psr/http-factory-implementation": "1.0", "psr/http-message-implementation": "1.0" }, "require-dev": { - "bamarni/composer-bin-plugin": "^1.8.1", - "http-interop/http-factory-tests": "^0.9", - "phpunit/phpunit": "^8.5.29 || ^9.5.23" + "ext-zlib": "*", + "phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.8 || ^9.3.10" }, "suggest": { "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses" }, "type": "library", "extra": { - "bamarni-bin": { - "bin-links": true, - "forward-command": false - }, "branch-alias": { - "dev-master": "2.4-dev" + "dev-master": "1.9-dev" } }, "autoload": { + "files": [ + "src/functions_include.php" + ], "psr-4": { "GuzzleHttp\\Psr7\\": "src/" } @@ -906,11 +902,6 @@ "name": "Tobias Schultze", "email": "webmaster@tubo-world.de", "homepage": "https://github.com/Tobion" - }, - { - "name": "Márk Sági-Kazár", - "email": "mark.sagikazar@gmail.com", - "homepage": "https://sagikazarmark.hu" } ], "description": "PSR-7 message implementation that also provides common utility methods", @@ -926,7 +917,7 @@ ], "support": { "issues": "https://github.com/guzzle/psr7/issues", - "source": "https://github.com/guzzle/psr7/tree/2.4.1" + "source": "https://github.com/guzzle/psr7/tree/1.9.0" }, "funding": [ { @@ -942,7 +933,91 @@ "type": "tidelift" } ], - "time": "2022-08-28T14:45:39+00:00" + "time": "2022-06-20T21:43:03+00:00" + }, + { + "name": "intervention/image", + "version": "2.7.2", + "source": { + "type": "git", + "url": "https://github.com/Intervention/image.git", + "reference": "04be355f8d6734c826045d02a1079ad658322dad" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Intervention/image/zipball/04be355f8d6734c826045d02a1079ad658322dad", + "reference": "04be355f8d6734c826045d02a1079ad658322dad", + "shasum": "" + }, + "require": { + "ext-fileinfo": "*", + "guzzlehttp/psr7": "~1.1 || ^2.0", + "php": ">=5.4.0" + }, + "require-dev": { + "mockery/mockery": "~0.9.2", + "phpunit/phpunit": "^4.8 || ^5.7 || ^7.5.15" + }, + "suggest": { + "ext-gd": "to use GD library based image processing.", + "ext-imagick": "to use Imagick based image processing.", + "intervention/imagecache": "Caching extension for the Intervention Image library" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.4-dev" + }, + "laravel": { + "providers": [ + "Intervention\\Image\\ImageServiceProvider" + ], + "aliases": { + "Image": "Intervention\\Image\\Facades\\Image" + } + } + }, + "autoload": { + "psr-4": { + "Intervention\\Image\\": "src/Intervention/Image" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Oliver Vogel", + "email": "oliver@intervention.io", + "homepage": "https://intervention.io/" + } + ], + "description": "Image handling and manipulation library with support for Laravel integration", + "homepage": "http://image.intervention.io/", + "keywords": [ + "gd", + "image", + "imagick", + "laravel", + "thumbnail", + "watermark" + ], + "support": { + "issues": "https://github.com/Intervention/image/issues", + "source": "https://github.com/Intervention/image/tree/2.7.2" + }, + "funding": [ + { + "url": "https://paypal.me/interventionio", + "type": "custom" + }, + { + "url": "https://github.com/Intervention", + "type": "github" + } + ], + "time": "2022-05-21T17:30:32+00:00" }, { "name": "joedixon/laravel-translation", @@ -1115,6 +1190,65 @@ }, "time": "2022-06-14T14:08:19+00:00" }, + { + "name": "kwaadpepper/refresh-sitemap", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/Kwaadpepper/refresh-sitemap.git", + "reference": "003b116bff9f9531d8ca69cd1fc529878b8b54a6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Kwaadpepper/refresh-sitemap/zipball/003b116bff9f9531d8ca69cd1fc529878b8b54a6", + "reference": "003b116bff9f9531d8ca69cd1fc529878b8b54a6", + "shasum": "" + }, + "require": { + "illuminate/support": "~8", + "kwaadpepper/enum": "~2", + "laravel/framework": "~8", + "spatie/laravel-sitemap": "^5.8" + }, + "require-dev": { + "slevomat/coding-standard": "^7.2" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "Kwaadpepper\\RefreshSitemap\\RefreshSitemapServiceProvider" + ] + } + }, + "autoload": { + "psr-4": { + "Kwaadpepper\\RefreshSitemap\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jérémy Munsch", + "email": "github@jeremydev.ovh", + "homepage": "https://jeremydev.ovh" + } + ], + "description": "Create sitemap.xml for all routes", + "homepage": "https://github.com/kwaadpepper/refresh-sitemap", + "keywords": [ + "Sitemap", + "laravel" + ], + "support": { + "issues": "https://github.com/Kwaadpepper/refresh-sitemap/issues", + "source": "https://github.com/Kwaadpepper/refresh-sitemap/tree/1.0.0" + }, + "time": "2022-06-10T17:46:53+00:00" + }, { "name": "laravel/framework", "version": "v8.83.23", @@ -1838,6 +1972,76 @@ ], "time": "2021-12-09T09:40:50+00:00" }, + { + "name": "league/glide", + "version": "1.7.1", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/glide.git", + "reference": "257e0c3612ef3dc57eb7f90cb741198151a45a5f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/glide/zipball/257e0c3612ef3dc57eb7f90cb741198151a45a5f", + "reference": "257e0c3612ef3dc57eb7f90cb741198151a45a5f", + "shasum": "" + }, + "require": { + "intervention/image": "^2.4", + "league/flysystem": "^1.0", + "php": "^7.2|^8.0", + "psr/http-message": "^1.0" + }, + "require-dev": { + "mockery/mockery": "^1.3.3", + "phpunit/php-token-stream": "^3.1|^4.0", + "phpunit/phpunit": "^8.5|^9.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1-dev" + } + }, + "autoload": { + "psr-4": { + "League\\Glide\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jonathan Reinink", + "email": "jonathan@reinink.ca", + "homepage": "http://reinink.ca" + }, + { + "name": "Titouan Galopin", + "email": "galopintitouan@gmail.com", + "homepage": "https://titouangalopin.com" + } + ], + "description": "Wonderfully easy on-demand image manipulation library with an HTTP based API.", + "homepage": "http://glide.thephpleague.com", + "keywords": [ + "ImageMagick", + "editing", + "gd", + "image", + "imagick", + "league", + "manipulation", + "processing" + ], + "support": { + "issues": "https://github.com/thephpleague/glide/issues", + "source": "https://github.com/thephpleague/glide/tree/1.7.1" + }, + "time": "2022-04-27T04:03:46+00:00" + }, { "name": "league/mime-type-detection", "version": "1.11.0", @@ -2179,6 +2383,52 @@ ], "time": "2022-09-02T07:48:13+00:00" }, + { + "name": "nicmart/tree", + "version": "0.3.1", + "source": { + "type": "git", + "url": "https://github.com/nicmart/Tree.git", + "reference": "c55ba47c64a3cb7454c22e6d630729fc2aab23ff" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nicmart/Tree/zipball/c55ba47c64a3cb7454c22e6d630729fc2aab23ff", + "reference": "c55ba47c64a3cb7454c22e6d630729fc2aab23ff", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "require-dev": { + "ergebnis/composer-normalize": "^2.8.0", + "ergebnis/license": "^1.0.0", + "ergebnis/php-cs-fixer-config": "^2.2.1", + "phpunit/phpunit": "^7.5.20" + }, + "type": "library", + "autoload": { + "psr-4": { + "Tree\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolò Martini", + "email": "nicmartnic@gmail.com" + } + ], + "description": "A basic but flexible php tree data structure and a fluent tree builder implementation.", + "support": { + "issues": "https://github.com/nicmart/Tree/issues", + "source": "https://github.com/nicmart/Tree/tree/0.3.1" + }, + "time": "2020-11-27T09:02:17+00:00" + }, { "name": "nikic/php-parser", "version": "v4.15.1", @@ -2525,61 +2775,6 @@ }, "time": "2020-06-29T06:28:15+00:00" }, - { - "name": "psr/http-factory", - "version": "1.0.1", - "source": { - "type": "git", - "url": "https://github.com/php-fig/http-factory.git", - "reference": "12ac7fcd07e5b077433f5f2bee95b3a771bf61be" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-factory/zipball/12ac7fcd07e5b077433f5f2bee95b3a771bf61be", - "reference": "12ac7fcd07e5b077433f5f2bee95b3a771bf61be", - "shasum": "" - }, - "require": { - "php": ">=7.0.0", - "psr/http-message": "^1.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Http\\Message\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Common interfaces for PSR-7 HTTP message factories", - "keywords": [ - "factory", - "http", - "message", - "psr", - "psr-17", - "psr-7", - "request", - "response" - ], - "support": { - "source": "https://github.com/php-fig/http-factory/tree/master" - }, - "time": "2019-04-30T12:38:16+00:00" - }, { "name": "psr/http-message", "version": "1.0.1", @@ -3031,6 +3226,329 @@ ], "time": "2021-09-25T23:10:38+00:00" }, + { + "name": "spatie/browsershot", + "version": "3.40.2", + "source": { + "type": "git", + "url": "https://github.com/spatie/browsershot.git", + "reference": "3e55eaf5ab8cee65d1661a567e89b3374afb9116" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/spatie/browsershot/zipball/3e55eaf5ab8cee65d1661a567e89b3374afb9116", + "reference": "3e55eaf5ab8cee65d1661a567e89b3374afb9116", + "shasum": "" + }, + "require": { + "php": "^7.1", + "spatie/image": "^1.5.3", + "spatie/temporary-directory": "^1.1", + "symfony/process": "^4.2|^5.0" + }, + "require-dev": { + "phpunit/phpunit": "^6.1|^7.5", + "spatie/phpunit-snapshot-assertions": "^1.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Spatie\\Browsershot\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Freek Van der Herten", + "email": "freek@spatie.be", + "homepage": "https://github.com/freekmurze", + "role": "Developer" + } + ], + "description": "Convert a webpage to an image or pdf using headless Chrome", + "homepage": "https://github.com/spatie/browsershot", + "keywords": [ + "chrome", + "convert", + "headless", + "image", + "pdf", + "puppeteer", + "screenshot", + "webpage" + ], + "support": { + "issues": "https://github.com/spatie/browsershot/issues", + "source": "https://github.com/spatie/browsershot/tree/3.40.2" + }, + "funding": [ + { + "url": "https://github.com/spatie", + "type": "github" + } + ], + "time": "2020-11-11T22:18:15+00:00" + }, + { + "name": "spatie/crawler", + "version": "4.7.6", + "source": { + "type": "git", + "url": "https://github.com/spatie/crawler.git", + "reference": "fe6e428b8ceaec561b9819bb948242ad0cfd40bb" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/spatie/crawler/zipball/fe6e428b8ceaec561b9819bb948242ad0cfd40bb", + "reference": "fe6e428b8ceaec561b9819bb948242ad0cfd40bb", + "shasum": "" + }, + "require": { + "guzzlehttp/guzzle": "^6.3 || ^7.0", + "guzzlehttp/psr7": "^1.4", + "nicmart/tree": "^0.3.0", + "php": "^7.3|^8.0", + "spatie/browsershot": "^3.14", + "spatie/robots-txt": "^1.0.1", + "symfony/dom-crawler": "^4.0 || ^5.0", + "tightenco/collect": "^5.6 || ^6.0 || ^7.0" + }, + "require-dev": { + "larapack/dd": "^1.1", + "phpunit/phpunit": "^9.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Spatie\\Crawler\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Freek Van der Herten", + "email": "freek@spatie.be" + } + ], + "description": "Crawl all internal links found on a website", + "homepage": "https://github.com/spatie/crawler", + "keywords": [ + "crawler", + "link", + "spatie", + "website" + ], + "support": { + "issues": "https://github.com/spatie/crawler/issues", + "source": "https://github.com/spatie/crawler/tree/4.7.6" + }, + "funding": [ + { + "url": "https://github.com/spatie", + "type": "github" + } + ], + "time": "2020-12-01T20:55:10+00:00" + }, + { + "name": "spatie/image", + "version": "1.10.6", + "source": { + "type": "git", + "url": "https://github.com/spatie/image.git", + "reference": "897e819848096ea8eee8ed4a3531c6166f9a99e0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/spatie/image/zipball/897e819848096ea8eee8ed4a3531c6166f9a99e0", + "reference": "897e819848096ea8eee8ed4a3531c6166f9a99e0", + "shasum": "" + }, + "require": { + "ext-exif": "*", + "ext-json": "*", + "ext-mbstring": "*", + "league/glide": "^1.6", + "php": "^7.2|^8.0", + "spatie/image-optimizer": "^1.1", + "spatie/temporary-directory": "^1.0|^2.0", + "symfony/process": "^3.0|^4.0|^5.0|^6.0" + }, + "require-dev": { + "phpunit/phpunit": "^8.5.21|^9.5.4", + "symfony/var-dumper": "^4.0|^5.0|^6.0", + "vimeo/psalm": "^4.6" + }, + "type": "library", + "autoload": { + "psr-4": { + "Spatie\\Image\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Freek Van der Herten", + "email": "freek@spatie.be", + "homepage": "https://spatie.be", + "role": "Developer" + } + ], + "description": "Manipulate images with an expressive API", + "homepage": "https://github.com/spatie/image", + "keywords": [ + "image", + "spatie" + ], + "support": { + "issues": "https://github.com/spatie/image/issues", + "source": "https://github.com/spatie/image/tree/1.10.6" + }, + "funding": [ + { + "url": "https://spatie.be/open-source/support-us", + "type": "custom" + }, + { + "url": "https://github.com/spatie", + "type": "github" + } + ], + "time": "2021-12-21T10:01:09+00:00" + }, + { + "name": "spatie/image-optimizer", + "version": "1.6.2", + "source": { + "type": "git", + "url": "https://github.com/spatie/image-optimizer.git", + "reference": "6db75529cbf8fa84117046a9d513f277aead90a0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/spatie/image-optimizer/zipball/6db75529cbf8fa84117046a9d513f277aead90a0", + "reference": "6db75529cbf8fa84117046a9d513f277aead90a0", + "shasum": "" + }, + "require": { + "ext-fileinfo": "*", + "php": "^7.3|^8.0", + "psr/log": "^1.0 | ^2.0 | ^3.0", + "symfony/process": "^4.2|^5.0|^6.0" + }, + "require-dev": { + "phpunit/phpunit": "^8.5.21|^9.4.4", + "symfony/var-dumper": "^4.2|^5.0|^6.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Spatie\\ImageOptimizer\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Freek Van der Herten", + "email": "freek@spatie.be", + "homepage": "https://spatie.be", + "role": "Developer" + } + ], + "description": "Easily optimize images using PHP", + "homepage": "https://github.com/spatie/image-optimizer", + "keywords": [ + "image-optimizer", + "spatie" + ], + "support": { + "issues": "https://github.com/spatie/image-optimizer/issues", + "source": "https://github.com/spatie/image-optimizer/tree/1.6.2" + }, + "time": "2021-12-21T10:08:05+00:00" + }, + { + "name": "spatie/laravel-sitemap", + "version": "5.8.0", + "source": { + "type": "git", + "url": "https://github.com/spatie/laravel-sitemap.git", + "reference": "90c4dd061ba251c2bff9edf83d5e1d38d17f1529" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/spatie/laravel-sitemap/zipball/90c4dd061ba251c2bff9edf83d5e1d38d17f1529", + "reference": "90c4dd061ba251c2bff9edf83d5e1d38d17f1529", + "shasum": "" + }, + "require": { + "illuminate/support": "~5.8.0|^6.0|^7.0|^8.0", + "nesbot/carbon": "^1.21|^2.0", + "php": "^7.2", + "spatie/crawler": "^4.1.0" + }, + "require-dev": { + "mockery/mockery": "^1.3.1", + "orchestra/testbench": "~3.8.8|^4.0|^5.0|^6.0", + "phpunit/phpunit": "^8.3|^9.0|^9.3", + "spatie/phpunit-snapshot-assertions": "^3.0.0", + "spatie/temporary-directory": "^1.1" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "Spatie\\Sitemap\\SitemapServiceProvider" + ] + } + }, + "autoload": { + "psr-4": { + "Spatie\\Sitemap\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Freek Van der Herten", + "email": "freek@spatie.be", + "homepage": "https://spatie.be", + "role": "Developer" + } + ], + "description": "Create and generate sitemaps with ease", + "homepage": "https://github.com/spatie/laravel-sitemap", + "keywords": [ + "laravel-sitemap", + "spatie" + ], + "support": { + "issues": "https://github.com/spatie/laravel-sitemap/issues", + "source": "https://github.com/spatie/laravel-sitemap/tree/5.8.0" + }, + "funding": [ + { + "url": "https://spatie.be/open-source/support-us", + "type": "custom" + } + ], + "time": "2020-09-09T09:29:31+00:00" + }, { "name": "spatie/laravel-translatable", "version": "4.6.0", @@ -3113,6 +3631,108 @@ ], "time": "2020-11-19T14:19:29+00:00" }, + { + "name": "spatie/robots-txt", + "version": "1.0.10", + "source": { + "type": "git", + "url": "https://github.com/spatie/robots-txt.git", + "reference": "8802a2bee670b3c13cfd21ede0322f72b3efb711" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/spatie/robots-txt/zipball/8802a2bee670b3c13cfd21ede0322f72b3efb711", + "reference": "8802a2bee670b3c13cfd21ede0322f72b3efb711", + "shasum": "" + }, + "require": { + "php": "^7.3 || ^8.0" + }, + "require-dev": { + "larapack/dd": "^1.0", + "phpunit/phpunit": "^8.0 || ^9.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Spatie\\Robots\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Brent Roose", + "email": "brent@spatie.be", + "homepage": "https://spatie.be", + "role": "Developer" + } + ], + "description": "Determine if a page may be crawled from robots.txt and robots meta tags", + "homepage": "https://github.com/spatie/robots-txt", + "keywords": [ + "robots-txt", + "spatie" + ], + "support": { + "issues": "https://github.com/spatie/robots-txt/issues", + "source": "https://github.com/spatie/robots-txt/tree/1.0.10" + }, + "time": "2020-12-07T11:10:49+00:00" + }, + { + "name": "spatie/temporary-directory", + "version": "1.3.0", + "source": { + "type": "git", + "url": "https://github.com/spatie/temporary-directory.git", + "reference": "f517729b3793bca58f847c5fd383ec16f03ffec6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/spatie/temporary-directory/zipball/f517729b3793bca58f847c5fd383ec16f03ffec6", + "reference": "f517729b3793bca58f847c5fd383ec16f03ffec6", + "shasum": "" + }, + "require": { + "php": "^7.2|^8.0" + }, + "require-dev": { + "phpunit/phpunit": "^8.0|^9.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Spatie\\TemporaryDirectory\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Alex Vanderbist", + "email": "alex@spatie.be", + "homepage": "https://spatie.be", + "role": "Developer" + } + ], + "description": "Easily create, use and destroy temporary directories", + "homepage": "https://github.com/spatie/temporary-directory", + "keywords": [ + "php", + "spatie", + "temporary-directory" + ], + "support": { + "issues": "https://github.com/spatie/temporary-directory/issues", + "source": "https://github.com/spatie/temporary-directory/tree/1.3.0" + }, + "time": "2020-11-09T15:54:21+00:00" + }, { "name": "swiftmailer/swiftmailer", "version": "v6.3.0", @@ -3421,6 +4041,81 @@ ], "time": "2022-01-02T09:53:40+00:00" }, + { + "name": "symfony/dom-crawler", + "version": "v5.4.12", + "source": { + "type": "git", + "url": "https://github.com/symfony/dom-crawler.git", + "reference": "291c1e92281a09152dda089f782e23dedd34bd4f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/291c1e92281a09152dda089f782e23dedd34bd4f", + "reference": "291c1e92281a09152dda089f782e23dedd34bd4f", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/deprecation-contracts": "^2.1|^3", + "symfony/polyfill-ctype": "~1.8", + "symfony/polyfill-mbstring": "~1.0", + "symfony/polyfill-php80": "^1.16" + }, + "conflict": { + "masterminds/html5": "<2.6" + }, + "require-dev": { + "masterminds/html5": "^2.6", + "symfony/css-selector": "^4.4|^5.0|^6.0" + }, + "suggest": { + "symfony/css-selector": "" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\DomCrawler\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Eases DOM navigation for HTML and XML documents", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/dom-crawler/tree/v5.4.12" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-08-03T13:09:21+00:00" + }, { "name": "symfony/error-handler", "version": "v5.4.11", @@ -5392,6 +6087,60 @@ ], "time": "2022-07-20T13:00:38+00:00" }, + { + "name": "tightenco/collect", + "version": "v7.26.1", + "source": { + "type": "git", + "url": "https://github.com/tighten/collect.git", + "reference": "5e460929279ad806e59fc731e649e9b25fc8774a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/tighten/collect/zipball/5e460929279ad806e59fc731e649e9b25fc8774a", + "reference": "5e460929279ad806e59fc731e649e9b25fc8774a", + "shasum": "" + }, + "require": { + "php": "^7.1.3", + "symfony/var-dumper": "^3.4 || ^4.0 || ^5.0" + }, + "require-dev": { + "mockery/mockery": "^1.0", + "nesbot/carbon": "^2.23.0", + "phpunit/phpunit": "^7.0" + }, + "type": "library", + "autoload": { + "files": [ + "src/Collect/Support/helpers.php", + "src/Collect/Support/alias.php" + ], + "psr-4": { + "Tightenco\\Collect\\": "src/Collect" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylorotwell@gmail.com" + } + ], + "description": "Collect - Illuminate Collections as a separate package.", + "keywords": [ + "collection", + "laravel" + ], + "support": { + "issues": "https://github.com/tighten/collect/issues", + "source": "https://github.com/tighten/collect/tree/v7.26.1" + }, + "time": "2020-09-05T00:05:48+00:00" + }, { "name": "tijsverkoyen/css-to-inline-styles", "version": "2.2.5", diff --git a/config/refresh-sitemap.php b/config/refresh-sitemap.php new file mode 100644 index 0000000..caf04ef --- /dev/null +++ b/config/refresh-sitemap.php @@ -0,0 +1,116 @@ + [ + '/bo', + '/en', + '/es' + ], + + /** + * This table is needed to resolve models matching + * routes + * + * it has to be filled like following + * + * 'products.meat-type' => [ + * 'slugMeatType' => [MeatTypes::class, 'slug'] + * ], + * 'kitchen-side.health-nutrition.balanced-menu.menu' => [ + * 'type' => [BalancedMenuType::class, 'type'] + * ] + * + * The index is the complete route name, the array content is an array + * within index is the argument name with its model class. + * This will allow the generator to generate a route for each of the models + * in this table + */ + 'routesBinder' => [ + 'gammes.show' => [ + 'gammeSlug' => [Gamme::class, 'slug'], + ], + 'product.show' => [ + 'gammeSlug' => [Gamme::class, 'slug'], + 'productSlug' => [Product::class, 'slug'] + ] + ], + + /** + * You can put route conditions here + * These will be used to decide whether the route should appear + * in the sitemap or not + * + * These are called in Eloquent where + * + * example + * + * 'queryConditions' => [ + * 'status' => true, + * 'ocbStatus' => EleveurOcbStatus::yes()->value, + * 'star_moment' => true + * ] + * + */ + 'queryConditions' => [], + + /** + * The default route frequency to use with sitemap generator + */ + 'routeDefaultFrequency' => Url::CHANGE_FREQUENCY_DAILY, + + /** + * The default route priority to use with sitemap generator + * + * priority should be a number between 0 and 1 + * https://www.sitemaps.org/protocol.html + */ + 'routeDefaultPriority' => 0.5, + + /** + * Frequencies for routes + * use the full or partial route name as index + * and a frequency within \Spatie\Sitemap\Tags\Url constants + */ + 'routeFrequencies' => [], + + /** + * Priorities for routes + * use the full or partial route name as index + * and a priority number between 0 and 1 + */ + 'routePriorities' => [], + + /** + * Enable or disable schedule for the job + * If set to true the sitemap generator will be run + * using the 'cron' instruction + */ + 'schedule' => false, + + /** + * If you want to set specific + * instruction for when to schedule job + * you can set this with a cron instruction + * You can generate one using https://crontab.guru/ + * https://laravel.com/docs/8.x/scheduling#schedule-frequency-options + * + * schedule must be set to true + * + * Default is every day at 15:45 + */ + 'cron' => '45 15 * * *' +];