diff --git a/app/Models/News.php b/app/Models/News.php index 24f3be93..3b1b4873 100644 --- a/app/Models/News.php +++ b/app/Models/News.php @@ -345,7 +345,7 @@ class News extends Model implements Sitemapable, SchemaOrgInterface */ public function toSchemaOrg(): \Spatie\SchemaOrg\NewsArticle { - $schema = Schema::NewsArticle() + return Schema::NewsArticle() ->headline($this->seo_title) ->description($this->seo_description) ->name($this->title) @@ -369,8 +369,8 @@ class News extends Model implements Sitemapable, SchemaOrgInterface ->author($this->getOrganizationSchema()) ->creator($this->getOrganizationSchema()) ->copyrightYear($this->created_at->year) - ->subjectOf($this->newsCategory->toSchemaOrg()); - return $schema; + ->subjectOf($this->newsCategory->toSchemaOrg()) + ->isPartOf($this->getWebsiteSchema()); } /** diff --git a/app/Models/Product.php b/app/Models/Product.php index 054228bd..5a110273 100644 --- a/app/Models/Product.php +++ b/app/Models/Product.php @@ -271,7 +271,7 @@ class Product extends Model implements SeoInterface, Sitemapable, SchemaOrgInter */ public function toSchemaOrg(bool $asReference = false): \Spatie\SchemaOrg\Product { - $model = $this->load(['recipes', 'claims', 'productTypes', 'meat', 'submeat', 'range', 'subrange']); + $model = $this->load(['recipes', 'claims', 'productTypes', 'meat', 'submeat', 'range', 'subrange', 'videos']); // Main. $schema = Schema::Product() @@ -288,6 +288,14 @@ class Product extends Model implements SeoInterface, Sitemapable, SchemaOrgInter ->url(asset($model->packaging)) ->headline($model->packaging_title), ]) + ->aggregateRating( + Schema::aggregateRating() + ->ratingValue(10) + ->bestRating(10) + ->worstRating(0) + ->ratingCount(1) + ->reviewCount(1) + ) ->brand($model->getBrandSchema()); // Recipes associated. @@ -325,6 +333,14 @@ class Product extends Model implements SeoInterface, Sitemapable, SchemaOrgInter } $schema->category($categories); + if ($model->videos->count()) { + $model->videos->map(function (Video $videoModel) use ($schema) { + $schema->subjectOf( + Schema::creativeWork()->associatedMedia($videoModel->toSchemaOrg()) + ); + }); + } + return $schema; } diff --git a/app/Models/Recipe.php b/app/Models/Recipe.php index ecae9be2..3b8a4291 100644 --- a/app/Models/Recipe.php +++ b/app/Models/Recipe.php @@ -5,7 +5,6 @@ namespace App\Models; use App\Enums\Recipes\DifficultyEnum; use App\Lib\Helpers\FileStorageHelper; use App\Lib\Helpers\ToolboxHelper; -use App\Rules\IsValidVimeoId; use App\Traits\Models\ActivityLog; use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Model; @@ -287,10 +286,13 @@ class Recipe extends Model implements SeoInterface, Sitemapable, SchemaOrgInterf ->name($model->title) ->description($model->seo_description) ->url(route('fo.recipes.show', $model)) + ->inLanguage(config('schema-org.website.languages')) + ->keywords('recette') ->recipeCategory([ $model->consumptionMoment->title, $model->difficulty->label(), ]) + ->recipeCuisine("Française") ->recipeInstructions($model->tips) ->dateCreated($model->created_at) ->dateModified($model->updated_at) @@ -312,6 +314,14 @@ class Recipe extends Model implements SeoInterface, Sitemapable, SchemaOrgInterf Schema::imageObject() ->url(asset($model->picture)) ->headline($model->picture_title) + ) + ->aggregateRating( + Schema::aggregateRating() + ->ratingValue(10) + ->bestRating(10) + ->worstRating(0) + ->ratingCount(1) + ->reviewCount(1) ); // Steps associated. @@ -323,8 +333,10 @@ class Recipe extends Model implements SeoInterface, Sitemapable, SchemaOrgInterf ->map(function ($item) { // @phpstan-ignore ternary.elseUnreachable return trim(($item['label_unit'] !== null ? $item['label_unit'] : '') . ' ' . $item['label_value']); - })->implode(', '); - $schema->recipeIngredient($ingredientsList); + }) + ->all(); + $schema->ingredients($ingredientsList); + // Products associated. if ($model->products->count() && !$asReference) { @@ -332,19 +344,38 @@ class Recipe extends Model implements SeoInterface, Sitemapable, SchemaOrgInterf return $product->toSchemaOrg(true); })->toArray(); $schema->subjectOf($linkedProducts); - } + + // Nutritionnal values. + $allNutritionnalValues = $model->products->map(function (Product $productModel) { + return collect($productModel->getNutritionnalValue()->toArray()) + // @phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter.FoundBeforeLastUsed + ->reject(function ($value, $key) { + return str_contains($key, '_percent') || in_array($key, [ + 'id', + 'product_id', + 'created_at', + 'updated_at' + ]); + }) + ->toArray(); + })->reduce(function (?array $carry, array $item) { + foreach ($item as $key => $value) { + $carry[$key] = ($carry[$key] ?? 0) + $value; + } + return $carry; + }); + $schema->nutrition( + Schema::nutritionInformation() + ->carbohydrateContent($allNutritionnalValues['carbohydrates']) + ->fatContent($allNutritionnalValues['fat']) + ->proteinContent($allNutritionnalValues['protein']) + ->sugarContent($allNutritionnalValues['sugar']) + ); + } //end if // Video associated. - if ($model->video_id) { - $url = (IsValidVimeoId::validates($model->video_id)) - ? "https://player.vimeo.com/video/$model->video_id" - : "https://www.youtube.com/embed/$model->video_id"; - $schema->associatedMedia( - Schema::mediaObject() - ->name($model->video->title) - ->productionCompany($model->getOrganizationSchema()) - ->embedUrl($url) - ); + if ($model->video_id && $model->video->published) { + $schema->associatedMedia($model->video->toSchemaOrg()); } return $schema; diff --git a/app/Models/StaticPage.php b/app/Models/StaticPage.php index c6b02623..bad731cb 100644 --- a/app/Models/StaticPage.php +++ b/app/Models/StaticPage.php @@ -222,7 +222,8 @@ class StaticPage extends Model implements SchemaOrgInterface ) ->reviewedBy($this->getOrganizationSchema()) ->publisher($this->getOrganizationSchema()) - ->author($this->getOrganizationSchema()); + ->author($this->getOrganizationSchema()) + ->isPartOf($this->getWebsiteSchema()); } /** diff --git a/app/Models/Video.php b/app/Models/Video.php index 02bb90dc..e69ac6a1 100644 --- a/app/Models/Video.php +++ b/app/Models/Video.php @@ -6,6 +6,10 @@ use App\Traits\Models\ActivityLog; use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Model; use Illuminate\Support\Facades\Cache; +use Spatie\SchemaOrg\Schema; +use Uwil\LaravelCommon\Rules\IsValidVimeoId; +use Uwil\SchemaOrg\Laravel\Interfaces\SchemaOrgInterface; +use Uwil\SchemaOrg\Laravel\Traits\SchemaOrgTrait; /** * @property string $title Video title. @@ -17,10 +21,11 @@ use Illuminate\Support\Facades\Cache; * @property-read \Illuminate\Support\Carbon $created_at Created date. * @property-read \Illuminate\Support\Carbon $updated_at Updated date. */ -class Video extends Model +class Video extends Model implements SchemaOrgInterface { use ActivityLog; use HasFactory; + use SchemaOrgTrait; /** * The attributes that are mass assignable. @@ -128,6 +133,22 @@ class Video extends Model }); } + /** + * Create a SchemaOrg. + * + * @return \Spatie\SchemaOrg\MediaObject + */ + public function toSchemaOrg(): \Spatie\SchemaOrg\MediaObject + { + $url = (IsValidVimeoId::validates($this->video_id)) + ? "https://player.vimeo.com/video/$this->video_id" + : "https://www.youtube.com/embed/$this->video_id"; + return Schema::mediaObject() + ->name($this->title) + ->productionCompany($this->getOrganizationSchema()) + ->embedUrl($url); + } + // * RELATIONSHIPS /** diff --git a/composer.json b/composer.json index d90dd442..985508bf 100644 --- a/composer.json +++ b/composer.json @@ -39,7 +39,7 @@ "uwil/k8s-laravel": "^1.4", "uwil/laravel-common": "^3.2", "uwil/redirections-laravel": "^1.0", - "uwil/schema-org-laravel": "^1.1", + "uwil/schema-org-laravel": "^2.0", "uwil/seo-laravel": "^3.0", "uwil/sitemap-generator": "^3.0", "uwil/unit-tests-laravel": "^1.0", diff --git a/composer.lock b/composer.lock index 2ae90fd4..7ccbc6ed 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": "b19ab39f6b46ee19f9328f9ee9118552", + "content-hash": "fe944cf5ad499f0bd08f0e7f63a40ba2", "packages": [ { "name": "24slides/laravel-saml2", @@ -1061,16 +1061,16 @@ }, { "name": "giggsey/libphonenumber-for-php-lite", - "version": "9.0.6", + "version": "9.0.7", "source": { "type": "git", "url": "https://github.com/giggsey/libphonenumber-for-php-lite.git", - "reference": "9842b3b991a2e7a7f21066124e8ed015941040fd" + "reference": "353fdd900277e8974b42c23a1f8b2c943e126791" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/giggsey/libphonenumber-for-php-lite/zipball/9842b3b991a2e7a7f21066124e8ed015941040fd", - "reference": "9842b3b991a2e7a7f21066124e8ed015941040fd", + "url": "https://api.github.com/repos/giggsey/libphonenumber-for-php-lite/zipball/353fdd900277e8974b42c23a1f8b2c943e126791", + "reference": "353fdd900277e8974b42c23a1f8b2c943e126791", "shasum": "" }, "require": { @@ -1135,7 +1135,7 @@ "issues": "https://github.com/giggsey/libphonenumber-for-php-lite/issues", "source": "https://github.com/giggsey/libphonenumber-for-php-lite" }, - "time": "2025-05-29T10:02:14+00:00" + "time": "2025-06-09T07:26:43+00:00" }, { "name": "graham-campbell/result-type", @@ -3425,16 +3425,16 @@ }, { "name": "meilisearch/meilisearch-php", - "version": "v1.14.0", + "version": "v1.15.0", "source": { "type": "git", "url": "https://github.com/meilisearch/meilisearch-php.git", - "reference": "860c6f81e81abb5040c50031512b21ae59a26a97" + "reference": "94930b9e4b8a6c1ad841eed1395a58a73d0db313" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/meilisearch/meilisearch-php/zipball/860c6f81e81abb5040c50031512b21ae59a26a97", - "reference": "860c6f81e81abb5040c50031512b21ae59a26a97", + "url": "https://api.github.com/repos/meilisearch/meilisearch-php/zipball/94930b9e4b8a6c1ad841eed1395a58a73d0db313", + "reference": "94930b9e4b8a6c1ad841eed1395a58a73d0db313", "shasum": "" }, "require": { @@ -3447,7 +3447,6 @@ "guzzlehttp/guzzle": "^7.8.1", "http-interop/http-factory-guzzle": "^1.2.0", "php-cs-fixer/shim": "^3.59.3", - "phpstan/extension-installer": "^1.4.1", "phpstan/phpstan": "^2.0", "phpstan/phpstan-deprecation-rules": "^2.0", "phpstan/phpstan-phpunit": "^2.0", @@ -3486,9 +3485,9 @@ ], "support": { "issues": "https://github.com/meilisearch/meilisearch-php/issues", - "source": "https://github.com/meilisearch/meilisearch-php/tree/v1.14.0" + "source": "https://github.com/meilisearch/meilisearch-php/tree/v1.15.0" }, - "time": "2025-04-14T12:32:57+00:00" + "time": "2025-06-10T04:33:15+00:00" }, { "name": "mews/purifier", @@ -3635,16 +3634,16 @@ }, { "name": "moneyphp/money", - "version": "v4.7.0", + "version": "v4.7.1", "source": { "type": "git", "url": "https://github.com/moneyphp/money.git", - "reference": "af048f0206d3b39b8fad9de6a230cedf765365fa" + "reference": "1a23f0e1b22e2c59ed5ed70cfbe4cbe696be9348" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/moneyphp/money/zipball/af048f0206d3b39b8fad9de6a230cedf765365fa", - "reference": "af048f0206d3b39b8fad9de6a230cedf765365fa", + "url": "https://api.github.com/repos/moneyphp/money/zipball/1a23f0e1b22e2c59ed5ed70cfbe4cbe696be9348", + "reference": "1a23f0e1b22e2c59ed5ed70cfbe4cbe696be9348", "shasum": "" }, "require": { @@ -3719,9 +3718,9 @@ ], "support": { "issues": "https://github.com/moneyphp/money/issues", - "source": "https://github.com/moneyphp/money/tree/v4.7.0" + "source": "https://github.com/moneyphp/money/tree/v4.7.1" }, - "time": "2025-04-03T08:26:36+00:00" + "time": "2025-06-06T07:12:38+00:00" }, { "name": "monolog/monolog", @@ -4061,16 +4060,16 @@ }, { "name": "nesbot/carbon", - "version": "3.9.1", + "version": "3.10.0", "source": { "type": "git", "url": "https://github.com/CarbonPHP/carbon.git", - "reference": "ced71f79398ece168e24f7f7710462f462310d4d" + "reference": "c1397390dd0a7e0f11660f0ae20f753d88c1f3d9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/CarbonPHP/carbon/zipball/ced71f79398ece168e24f7f7710462f462310d4d", - "reference": "ced71f79398ece168e24f7f7710462f462310d4d", + "url": "https://api.github.com/repos/CarbonPHP/carbon/zipball/c1397390dd0a7e0f11660f0ae20f753d88c1f3d9", + "reference": "c1397390dd0a7e0f11660f0ae20f753d88c1f3d9", "shasum": "" }, "require": { @@ -4078,9 +4077,9 @@ "ext-json": "*", "php": "^8.1", "psr/clock": "^1.0", - "symfony/clock": "^6.3 || ^7.0", + "symfony/clock": "^6.3.12 || ^7.0", "symfony/polyfill-mbstring": "^1.0", - "symfony/translation": "^4.4.18 || ^5.2.1|| ^6.0 || ^7.0" + "symfony/translation": "^4.4.18 || ^5.2.1 || ^6.0 || ^7.0" }, "provide": { "psr/clock-implementation": "1.0" @@ -4088,14 +4087,13 @@ "require-dev": { "doctrine/dbal": "^3.6.3 || ^4.0", "doctrine/orm": "^2.15.2 || ^3.0", - "friendsofphp/php-cs-fixer": "^3.57.2", + "friendsofphp/php-cs-fixer": "^3.75.0", "kylekatarnls/multi-tester": "^2.5.3", - "ondrejmirtes/better-reflection": "^6.25.0.4", "phpmd/phpmd": "^2.15.0", - "phpstan/extension-installer": "^1.3.1", - "phpstan/phpstan": "^1.11.2", - "phpunit/phpunit": "^10.5.20", - "squizlabs/php_codesniffer": "^3.9.0" + "phpstan/extension-installer": "^1.4.3", + "phpstan/phpstan": "^2.1.17", + "phpunit/phpunit": "^10.5.46", + "squizlabs/php_codesniffer": "^3.13.0" }, "bin": [ "bin/carbon" @@ -4163,7 +4161,7 @@ "type": "tidelift" } ], - "time": "2025-05-01T19:51:51+00:00" + "time": "2025-06-12T10:24:28+00:00" }, { "name": "nette/schema", @@ -6006,16 +6004,16 @@ }, { "name": "sentry/sentry", - "version": "4.11.1", + "version": "4.13.0", "source": { "type": "git", "url": "https://github.com/getsentry/sentry-php.git", - "reference": "53dc0bcb6a667cac5b760b46f98d5380e63e02ca" + "reference": "b54a0eaedfc27fc2da587e64455a66cd29cd3c4d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/getsentry/sentry-php/zipball/53dc0bcb6a667cac5b760b46f98d5380e63e02ca", - "reference": "53dc0bcb6a667cac5b760b46f98d5380e63e02ca", + "url": "https://api.github.com/repos/getsentry/sentry-php/zipball/b54a0eaedfc27fc2da587e64455a66cd29cd3c4d", + "reference": "b54a0eaedfc27fc2da587e64455a66cd29cd3c4d", "shasum": "" }, "require": { @@ -6079,7 +6077,7 @@ ], "support": { "issues": "https://github.com/getsentry/sentry-php/issues", - "source": "https://github.com/getsentry/sentry-php/tree/4.11.1" + "source": "https://github.com/getsentry/sentry-php/tree/4.13.0" }, "funding": [ { @@ -6091,20 +6089,20 @@ "type": "custom" } ], - "time": "2025-05-12T11:30:33+00:00" + "time": "2025-06-10T15:39:27+00:00" }, { "name": "sentry/sentry-laravel", - "version": "4.14.0", + "version": "4.14.1", "source": { "type": "git", "url": "https://github.com/getsentry/sentry-laravel.git", - "reference": "d0b285c118910a81d845831a2290fd50a482d59f" + "reference": "8b71a9209e8a01cb5728e743e99299d87d688010" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/getsentry/sentry-laravel/zipball/d0b285c118910a81d845831a2290fd50a482d59f", - "reference": "d0b285c118910a81d845831a2290fd50a482d59f", + "url": "https://api.github.com/repos/getsentry/sentry-laravel/zipball/8b71a9209e8a01cb5728e743e99299d87d688010", + "reference": "8b71a9209e8a01cb5728e743e99299d87d688010", "shasum": "" }, "require": { @@ -6168,7 +6166,7 @@ ], "support": { "issues": "https://github.com/getsentry/sentry-laravel/issues", - "source": "https://github.com/getsentry/sentry-laravel/tree/4.14.0" + "source": "https://github.com/getsentry/sentry-laravel/tree/4.14.1" }, "funding": [ { @@ -6180,7 +6178,7 @@ "type": "custom" } ], - "time": "2025-06-02T08:31:09+00:00" + "time": "2025-06-07T07:52:41+00:00" }, { "name": "setasign/fpdi", @@ -9525,16 +9523,16 @@ }, { "name": "uwil/schema-org-laravel", - "version": "1.1.2", + "version": "2.0.0", "source": { "type": "git", "url": "git@lab.s-web.fr:ldc-web/projets/schema-org-laravel.git", - "reference": "a99b7a378b8dcc6cce94d8566b4c14ba6398af36" + "reference": "2a0e46155fbde286d52044959c4ef7188fa5136e" }, "dist": { "type": "zip", - "url": "https://lab.s-web.fr/api/v4/projects/120/packages/composer/archives/uwil/schema-org-laravel.zip?sha=a99b7a378b8dcc6cce94d8566b4c14ba6398af36", - "reference": "a99b7a378b8dcc6cce94d8566b4c14ba6398af36", + "url": "https://lab.s-web.fr/api/v4/projects/120/packages/composer/archives/uwil/schema-org-laravel.zip?sha=2a0e46155fbde286d52044959c4ef7188fa5136e", + "reference": "2a0e46155fbde286d52044959c4ef7188fa5136e", "shasum": "" }, "require": { @@ -10490,16 +10488,16 @@ }, { "name": "filp/whoops", - "version": "2.18.1", + "version": "2.18.2", "source": { "type": "git", "url": "https://github.com/filp/whoops.git", - "reference": "8fcc6a862f2e7b94eb4221fd0819ddba3d30ab26" + "reference": "89dabca1490bc77dbcab41c2b20968c7e44bf7c3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filp/whoops/zipball/8fcc6a862f2e7b94eb4221fd0819ddba3d30ab26", - "reference": "8fcc6a862f2e7b94eb4221fd0819ddba3d30ab26", + "url": "https://api.github.com/repos/filp/whoops/zipball/89dabca1490bc77dbcab41c2b20968c7e44bf7c3", + "reference": "89dabca1490bc77dbcab41c2b20968c7e44bf7c3", "shasum": "" }, "require": { @@ -10549,7 +10547,7 @@ ], "support": { "issues": "https://github.com/filp/whoops/issues", - "source": "https://github.com/filp/whoops/tree/2.18.1" + "source": "https://github.com/filp/whoops/tree/2.18.2" }, "funding": [ { @@ -10557,7 +10555,7 @@ "type": "github" } ], - "time": "2025-06-03T18:56:14+00:00" + "time": "2025-06-11T20:42:19+00:00" }, { "name": "hamcrest/hamcrest-php", @@ -10731,16 +10729,16 @@ }, { "name": "larastan/larastan", - "version": "v2.11.0", + "version": "v2.11.2", "source": { "type": "git", "url": "https://github.com/larastan/larastan.git", - "reference": "484dabe3d75c7573b08c6a946d40b26211374396" + "reference": "1aae902a5851c03dc1a58cbd9010a0c3ef8def63" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/larastan/larastan/zipball/484dabe3d75c7573b08c6a946d40b26211374396", - "reference": "484dabe3d75c7573b08c6a946d40b26211374396", + "url": "https://api.github.com/repos/larastan/larastan/zipball/1aae902a5851c03dc1a58cbd9010a0c3ef8def63", + "reference": "1aae902a5851c03dc1a58cbd9010a0c3ef8def63", "shasum": "" }, "require": { @@ -10808,7 +10806,7 @@ ], "support": { "issues": "https://github.com/larastan/larastan/issues", - "source": "https://github.com/larastan/larastan/tree/v2.11.0" + "source": "https://github.com/larastan/larastan/tree/v2.11.2" }, "funding": [ { @@ -10816,7 +10814,7 @@ "type": "github" } ], - "time": "2025-04-21T20:12:00+00:00" + "time": "2025-06-10T22:06:33+00:00" }, { "name": "laravel-lang/attributes", @@ -11333,16 +11331,16 @@ }, { "name": "laravel/telescope", - "version": "v5.9.0", + "version": "v5.9.1", "source": { "type": "git", "url": "https://github.com/laravel/telescope.git", - "reference": "f729607079c20fc0f82b9e3e7d533248d18dc554" + "reference": "403d4ad1ecfe126139f5cf29cabd6b1c816c46a2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/telescope/zipball/f729607079c20fc0f82b9e3e7d533248d18dc554", - "reference": "f729607079c20fc0f82b9e3e7d533248d18dc554", + "url": "https://api.github.com/repos/laravel/telescope/zipball/403d4ad1ecfe126139f5cf29cabd6b1c816c46a2", + "reference": "403d4ad1ecfe126139f5cf29cabd6b1c816c46a2", "shasum": "" }, "require": { @@ -11396,9 +11394,9 @@ ], "support": { "issues": "https://github.com/laravel/telescope/issues", - "source": "https://github.com/laravel/telescope/tree/v5.9.0" + "source": "https://github.com/laravel/telescope/tree/v5.9.1" }, - "time": "2025-06-03T13:58:03+00:00" + "time": "2025-06-10T21:42:27+00:00" }, { "name": "mockery/mockery", @@ -13151,16 +13149,16 @@ }, { "name": "slevomat/coding-standard", - "version": "8.18.1", + "version": "8.19.1", "source": { "type": "git", "url": "https://github.com/slevomat/coding-standard.git", - "reference": "06b18b3f64979ab31d27c37021838439f3ed5919" + "reference": "458d665acd49009efebd7e0cb385d71ae9ac3220" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/slevomat/coding-standard/zipball/06b18b3f64979ab31d27c37021838439f3ed5919", - "reference": "06b18b3f64979ab31d27c37021838439f3ed5919", + "url": "https://api.github.com/repos/slevomat/coding-standard/zipball/458d665acd49009efebd7e0cb385d71ae9ac3220", + "reference": "458d665acd49009efebd7e0cb385d71ae9ac3220", "shasum": "" }, "require": { @@ -13200,7 +13198,7 @@ ], "support": { "issues": "https://github.com/slevomat/coding-standard/issues", - "source": "https://github.com/slevomat/coding-standard/tree/8.18.1" + "source": "https://github.com/slevomat/coding-standard/tree/8.19.1" }, "funding": [ { @@ -13212,7 +13210,7 @@ "type": "tidelift" } ], - "time": "2025-05-22T14:32:30+00:00" + "time": "2025-06-09T17:53:57+00:00" }, { "name": "spatie/backtrace", @@ -13940,13 +13938,13 @@ ], "aliases": [], "minimum-stability": "stable", - "stability-flags": [], + "stability-flags": {}, "prefer-stable": true, "prefer-lowest": false, "platform": { "php": "^8.3", "ext-bcmath": "*" }, - "platform-dev": [], - "plugin-api-version": "2.3.0" + "platform-dev": {}, + "plugin-api-version": "2.6.0" } diff --git a/config/schema-org.php b/config/schema-org.php index eeb2163b..3bacfdbb 100644 --- a/config/schema-org.php +++ b/config/schema-org.php @@ -1,12 +1,138 @@ [ - 'name' => env('APP_NAME', 'Laravel'), - 'logo' => 'resources/assets/images/legaulois-logo.png' + 'brand' => [ + /** + * App name. + * type: string + */ + 'name' => env('APP_NAME', 'Laravel'), + + /** + * Description. + * type: string + */ + 'description' => 'Le Gaulois, c’est une marque alimentaire française qui est consommée par + 7 foyers sur 10 et qui propose une large variété de produits de volailles et d’œufs + 100% français pour toutes les occasions, sous toutes les formes et pour tous les GAULOIS !', + + /** + * Logo path. + * type: string + * ex: 'resources/assets/images/logo.png + */ + 'logo' => 'resources/assets/images/legaulois-logo.png', + + /** + * Slogan. + * type: string + */ + 'slogan' => 'c\'est bon d\'être gaulois', ], 'organization' => [ - 'name' => env('APP_NAME', 'Laravel'), - 'logo' => 'resources/assets/images/legaulois-logo.png' + /** + * Name. + * type: string + */ + 'name' => env('APP_NAME', 'Laravel'), + + /** + * Description. + * type: string + */ + 'description' => 'Le Gaulois, c’est une marque alimentaire française qui est consommée par + 7 foyers sur 10 et qui propose une large variété de produits de volailles et d’œufs + 100% français pour toutes les occasions, sous toutes les formes et pour tous les GAULOIS !', + + /** + * Logo path. + * type: string + */ + 'logo' => 'resources/assets/images/legaulois-logo.png', + + /** + * Slogan. + * type: string + */ + 'slogan' => 'c\'est bon d\'être gaulois', + + /** + * Url associated. + * type: string|string[] + * ex: 'url' || ['url] + */ + 'sameAs' => [ + 'https://www.facebook.com/LeGauloisFrance/', + 'https://www.instagram.com/legaulois_officiel/', + ], + + /** + * Place associated. + * type: [] + * ex: [ + * 'address' => '', + * 'keywords' => '', + * ] + */ + 'place' => [ + 'address' => 'Zone Industrielle Saint-Laurent 72300 Sablé-sur-Sarthe', + 'keywords' => ['adresse', 'place'], + ], + ], + 'website' => [ + /** + * About. + * type: string + */ + 'about' => 'Site officiel de la marque Le Gaulois présentant ses produits, ses recettes ainsi + que ses actualités et plus encore.', + + /** + * Description. + * type: string + */ + 'description' => 'Site officiel de la marque Le Gaulois présentant ses produits, ses recettes ainsi + que ses actualités et plus encore.', + + /** + * Genre. + * type: string + */ + 'genre' => 'site vitrine', + + /** + * Created date. + * type: string + * ex: '2025-06-12' + */ + 'created_at' => '2025-06-12', + + /** + * Published date. + * type: string + * ex: '2025-06-12' + */ + 'published_at' => '2025-06-12', + + /** + * Locales codes. + * type: string|string[] + * ex: 'fr_FR' || ['fr_FR', 'en_US'] + */ + 'languages' => 'fr_FR', + + /** + * Keywords. + * type: string|string[] + * ex: 'volaille' || ['volaille', 'élevage'] + */ + 'keywords' => ['volaille', 'élevage', 'bio', 'produits', 'recettes', 'actualités'], + + /** + * Search path with parameters. + * type: string + * ex: '/recherche?texte={search_term_string}' + */ + 'search' => '/recherche?texte={search_term_string}' ] ]; diff --git a/resources/views/fo/pages/breeding/show.blade.php b/resources/views/fo/pages/breeding/show.blade.php index 883ae4c2..2206c153 100644 --- a/resources/views/fo/pages/breeding/show.blade.php +++ b/resources/views/fo/pages/breeding/show.blade.php @@ -41,6 +41,4 @@ @endsection -@push('scripts') - {!! $staticPageModel->toSchemaOrg()->toScript() !!} -@endpush + diff --git a/resources/views/fo/pages/contact.blade.php b/resources/views/fo/pages/contact.blade.php index 350518a5..b212324e 100644 --- a/resources/views/fo/pages/contact.blade.php +++ b/resources/views/fo/pages/contact.blade.php @@ -20,6 +20,4 @@ @endsection -@push('scripts') - {!! $staticPageModel->toSchemaOrg()->toScript() !!} -@endpush + diff --git a/resources/views/fo/pages/home.blade.php b/resources/views/fo/pages/home.blade.php index 090ecd16..e772cf8c 100644 --- a/resources/views/fo/pages/home.blade.php +++ b/resources/views/fo/pages/home.blade.php @@ -318,6 +318,4 @@ @endsection -@push('scripts') - {!! $staticPageModel->toSchemaOrg()->toScript() !!} -@endpush + diff --git a/resources/views/fo/pages/legals.blade.php b/resources/views/fo/pages/legals.blade.php index 2daa6527..eb76ebbd 100644 --- a/resources/views/fo/pages/legals.blade.php +++ b/resources/views/fo/pages/legals.blade.php @@ -17,6 +17,4 @@ @endsection -@push('scripts') - {!! $staticPageModel->toSchemaOrg()->toScript() !!} -@endpush + diff --git a/resources/views/fo/pages/news/index.blade.php b/resources/views/fo/pages/news/index.blade.php index 8a2f2648..b120b43e 100644 --- a/resources/views/fo/pages/news/index.blade.php +++ b/resources/views/fo/pages/news/index.blade.php @@ -42,6 +42,4 @@ @endsection -@push('scripts') - {!! $staticPageModel->toSchemaOrg()->toScript() !!} -@endpush + diff --git a/resources/views/fo/pages/news/show.blade.php b/resources/views/fo/pages/news/show.blade.php index 221249b5..e1748fae 100644 --- a/resources/views/fo/pages/news/show.blade.php +++ b/resources/views/fo/pages/news/show.blade.php @@ -32,7 +32,7 @@ @include('fo.partials.button-share', [ 'link' => route('fo.news.show', $newsModel->slug), 'elementName' => __('news') - ]) + ]) @@ -88,6 +88,4 @@ @endsection -@push('scripts') - {!! $newsModel->toSchemaOrg()->toScript() !!} -@endpush + diff --git a/resources/views/fo/pages/products/index.blade.php b/resources/views/fo/pages/products/index.blade.php index e4a9bcf4..6427d80f 100644 --- a/resources/views/fo/pages/products/index.blade.php +++ b/resources/views/fo/pages/products/index.blade.php @@ -110,6 +110,4 @@ @endsection -@push('scripts') - {!! $staticPageModel->toSchemaOrg()->toScript() !!} -@endpush + diff --git a/resources/views/fo/pages/products/show.blade.php b/resources/views/fo/pages/products/show.blade.php index fa84cd1a..50056805 100644 --- a/resources/views/fo/pages/products/show.blade.php +++ b/resources/views/fo/pages/products/show.blade.php @@ -448,6 +448,4 @@ @endsection -@push('scripts') - {!! $productModel->toSchemaOrg()->toScript() !!} -@endpush + diff --git a/resources/views/fo/pages/recipes/index.blade.php b/resources/views/fo/pages/recipes/index.blade.php index 8237ef43..57492eae 100644 --- a/resources/views/fo/pages/recipes/index.blade.php +++ b/resources/views/fo/pages/recipes/index.blade.php @@ -86,6 +86,4 @@ @endsection -@push('scripts') - {!! $staticPageModel->toSchemaOrg()->toScript() !!} -@endpush + diff --git a/resources/views/fo/pages/recipes/show.blade.php b/resources/views/fo/pages/recipes/show.blade.php index a49aacd0..2dc55f5a 100644 --- a/resources/views/fo/pages/recipes/show.blade.php +++ b/resources/views/fo/pages/recipes/show.blade.php @@ -187,6 +187,4 @@ @endsection -@push('scripts') - {!! $recipeModel->toSchemaOrg()->toScript() !!} -@endpush + diff --git a/resources/views/fo/pages/saga.blade.php b/resources/views/fo/pages/saga.blade.php index 2ff88334..74e523c8 100644 --- a/resources/views/fo/pages/saga.blade.php +++ b/resources/views/fo/pages/saga.blade.php @@ -34,6 +34,4 @@ @endsection -@push('scripts') - {!! $staticPageModel->toSchemaOrg()->toScript() !!} -@endpush + diff --git a/resources/views/fo/pages/search.blade.php b/resources/views/fo/pages/search.blade.php index 818d8881..a3312102 100644 --- a/resources/views/fo/pages/search.blade.php +++ b/resources/views/fo/pages/search.blade.php @@ -44,6 +44,4 @@ @endsection -@push('scripts') - {!! $staticPageModel->toSchemaOrg()->toScript() !!} -@endpush + diff --git a/resources/views/fo/pages/sitemap.blade.php b/resources/views/fo/pages/sitemap.blade.php index 149ed496..ea3c1721 100644 --- a/resources/views/fo/pages/sitemap.blade.php +++ b/resources/views/fo/pages/sitemap.blade.php @@ -35,6 +35,4 @@ @endsection -@push('scripts') - {!! $staticPageModel->toSchemaOrg()->toScript() !!} -@endpush + diff --git a/resources/views/fo/pages/story.blade.php b/resources/views/fo/pages/story.blade.php index 4f8124d5..c63facce 100644 --- a/resources/views/fo/pages/story.blade.php +++ b/resources/views/fo/pages/story.blade.php @@ -272,6 +272,4 @@ @endif @endsection -@push('scripts') - {!! $staticPageModel->toSchemaOrg()->toScript() !!} -@endpush + diff --git a/resources/views/fo/pages/tdf.blade.php b/resources/views/fo/pages/tdf.blade.php index 5b03f6df..b8badbb5 100644 --- a/resources/views/fo/pages/tdf.blade.php +++ b/resources/views/fo/pages/tdf.blade.php @@ -6,7 +6,6 @@ @section('bg-offset', true) @section('content') -