Merge branch 'develop' into trunk
This commit is contained in:
commit
b4578d1f75
15 changed files with 267 additions and 62 deletions
|
|
@ -6,22 +6,55 @@ use Carbon\Carbon;
|
|||
use Illuminate\Contracts\Database\Eloquent\Builder;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Arr;
|
||||
use Illuminate\Support\Facades\File;
|
||||
use Illuminate\Support\Facades\Http;
|
||||
use Illuminate\Support\Facades\Route;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
use Illuminate\Support\Str;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
use Illuminate\Validation\Rule;
|
||||
use Illuminate\Validation\ValidationException;
|
||||
use Symfony\Component\Finder\SplFileInfo;
|
||||
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||
|
||||
class ToolboxHelper
|
||||
{
|
||||
/**
|
||||
* @param array<int|string, mixed> $array1
|
||||
* @param array<int|string, mixed> $array2
|
||||
* Fetch class list from a specific namespace
|
||||
*
|
||||
* @return array<int|string, mixed>
|
||||
* @param string $namespace
|
||||
* @return array<string> An array of classe namespaces
|
||||
*/
|
||||
public static function getClassesUsingNamespace(string $namespace): array
|
||||
{
|
||||
return collect(File::files(\app_path(Str::of($namespace)->replaceFirst('\App', ''))))
|
||||
->filter(fn (SplFileInfo $splFileInfo) => $splFileInfo->getExtension() === 'php')
|
||||
->map(fn (SplFileInfo $splFileInfo) => Str::of($splFileInfo->getBasename())
|
||||
->replace('.' . $splFileInfo->getExtension(), '')->prepend("{$namespace}\\"))->all();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all classes from a specific namespace that implement a specific interface
|
||||
*
|
||||
* @param string $namespace
|
||||
* @param string $interface
|
||||
* @return array<string> An array of classe namespaces
|
||||
*/
|
||||
public static function getClassesUsingInterface(string $namespace, string $interface): array
|
||||
{
|
||||
return Arr::where(
|
||||
static::getClassesUsingNamespace($namespace),
|
||||
fn (string $class_namespace) => \collect(class_implements($class_namespace, true))->filter()
|
||||
->contains(fn (string $class_interface) => $class_interface === $interface)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array<integer|string, mixed> $array1
|
||||
* @param array<integer|string, mixed> $array2
|
||||
*
|
||||
* @return array<integer|string, mixed>
|
||||
*/
|
||||
public static function arrayMergeRecursiveDistinct(array &$array1, array &$array2): array
|
||||
{
|
||||
|
|
|
|||
|
|
@ -14,6 +14,8 @@ use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Support\Str;
|
||||
use Illuminate\Validation\Rules\Enum;
|
||||
use Uwil\Seo\Laravel\Interfaces\SeoInterface;
|
||||
use Uwil\Seo\Laravel\Traits\SeoTrait;
|
||||
|
||||
/**
|
||||
* @property string $seo_title
|
||||
|
|
@ -30,12 +32,13 @@ use Illuminate\Validation\Rules\Enum;
|
|||
* @property string $created_at
|
||||
* @property string $updated_at
|
||||
*/
|
||||
class Concept extends Model
|
||||
class Concept extends Model implements SeoInterface
|
||||
{
|
||||
use HasFactory;
|
||||
use HasTranslations;
|
||||
use IsCachedAsCollection;
|
||||
use MiniCrudModel;
|
||||
use SeoTrait;
|
||||
|
||||
/**
|
||||
* @var array
|
||||
|
|
|
|||
|
|
@ -7,6 +7,8 @@ use App\Lib\Helpers\ToolboxHelper;
|
|||
use App\Traits\Models\HasTranslations;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Uwil\Seo\Laravel\Interfaces\SeoInterface;
|
||||
use Uwil\Seo\Laravel\Traits\SeoTrait;
|
||||
|
||||
/**
|
||||
* @property integer $part2_product1_id
|
||||
|
|
@ -26,10 +28,11 @@ use Illuminate\Database\Eloquent\Model;
|
|||
* @property string $created_at
|
||||
* @property string $updated_at
|
||||
*/
|
||||
class Home extends Model
|
||||
class Home extends Model implements SeoInterface
|
||||
{
|
||||
use HasFactory;
|
||||
use HasTranslations;
|
||||
use SeoTrait;
|
||||
|
||||
/**
|
||||
* @var array
|
||||
|
|
|
|||
|
|
@ -11,6 +11,8 @@ use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Support\Collection;
|
||||
use Illuminate\Support\Str;
|
||||
use Uwil\Seo\Laravel\Interfaces\SeoInterface;
|
||||
use Uwil\Seo\Laravel\Traits\SeoTrait;
|
||||
|
||||
/**
|
||||
* @property string $seo_title
|
||||
|
|
@ -28,11 +30,12 @@ use Illuminate\Support\Str;
|
|||
* @property \Carbon\Carbon $created_at
|
||||
* @property \Carbon\Carbon $updated_at
|
||||
*/
|
||||
class News extends Model
|
||||
class News extends Model implements SeoInterface
|
||||
{
|
||||
use HasFactory;
|
||||
use HasTranslations;
|
||||
use MiniCrudModel;
|
||||
use SeoTrait;
|
||||
|
||||
/**
|
||||
* @var array
|
||||
|
|
|
|||
|
|
@ -8,6 +8,8 @@ use App\Traits\Models\HasTranslations;
|
|||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Support\Str;
|
||||
use Uwil\Seo\Laravel\Interfaces\SeoInterface;
|
||||
use Uwil\Seo\Laravel\Traits\SeoTrait;
|
||||
|
||||
/**
|
||||
* @property integer $range_id
|
||||
|
|
@ -26,10 +28,11 @@ use Illuminate\Support\Str;
|
|||
* @property string $created_at
|
||||
* @property string $updated_at
|
||||
*/
|
||||
class Product extends Model
|
||||
class Product extends Model implements SeoInterface
|
||||
{
|
||||
use HasFactory;
|
||||
use HasTranslations;
|
||||
use SeoTrait;
|
||||
|
||||
/**
|
||||
* @var array
|
||||
|
|
|
|||
|
|
@ -8,6 +8,9 @@ use App\Traits\Models\HasTranslations;
|
|||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Support\Str;
|
||||
use Uwil\Seo\Laravel\Interfaces\SeoInterface;
|
||||
use Uwil\Seo\Laravel\Objects\SeoItem;
|
||||
use Uwil\Seo\Laravel\Traits\SeoTrait;
|
||||
|
||||
/**
|
||||
* @property string $seo_title
|
||||
|
|
@ -20,10 +23,11 @@ use Illuminate\Support\Str;
|
|||
* @property string $created_at
|
||||
* @property string $updated_at
|
||||
*/
|
||||
class Range extends Model
|
||||
class Range extends Model implements SeoInterface
|
||||
{
|
||||
use HasFactory;
|
||||
use HasTranslations;
|
||||
use SeoTrait;
|
||||
|
||||
/**
|
||||
* @var array
|
||||
|
|
@ -147,4 +151,21 @@ class Range extends Model
|
|||
{
|
||||
return $this->hasMany('App\Models\Product');
|
||||
}
|
||||
|
||||
/**
|
||||
* Transfotrm to seoModel
|
||||
*
|
||||
* @return \App\Objects\SeoItem
|
||||
*/
|
||||
public function toSeoItem(): SeoItem
|
||||
{
|
||||
return new SeoItem(
|
||||
\trans($this->getTable()),
|
||||
$this->seo_title,
|
||||
$this->seo_description,
|
||||
$this->status ?? false,
|
||||
\route(\config('seo.bo_route_prefix') . $this->getTable() . '.edit', $this),
|
||||
'#'
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,6 +9,8 @@ use App\Traits\Models\HasTranslations;
|
|||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Support\Str;
|
||||
use Uwil\Seo\Laravel\Interfaces\SeoInterface;
|
||||
use Uwil\Seo\Laravel\Traits\SeoTrait;
|
||||
|
||||
/**
|
||||
* @property integer $range_id
|
||||
|
|
@ -29,10 +31,11 @@ use Illuminate\Support\Str;
|
|||
* @property string $created_at
|
||||
* @property string $updated_at
|
||||
*/
|
||||
class Recipe extends Model
|
||||
class Recipe extends Model implements SeoInterface
|
||||
{
|
||||
use HasFactory;
|
||||
use HasTranslations;
|
||||
use SeoTrait;
|
||||
|
||||
/**
|
||||
* @var array
|
||||
|
|
|
|||
|
|
@ -27,7 +27,8 @@
|
|||
"sentry/sentry-laravel": "^3.3",
|
||||
"simplesoftwareio/simple-qrcode": "~4",
|
||||
"spatie/laravel-translatable": "^6.4",
|
||||
"uwil/k8s-laravel": "1.0.0"
|
||||
"uwil/k8s-laravel": "^1.2",
|
||||
"uwil/seo-laravel": "^1.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"fakerphp/faker": "^1.9.1",
|
||||
|
|
@ -103,10 +104,6 @@
|
|||
{
|
||||
"type": "composer",
|
||||
"url": "https://lab.s-web.fr/api/v4/group/23/-/packages/composer/packages.json"
|
||||
},
|
||||
{
|
||||
"type": "vcs",
|
||||
"url": "https://github.com/laravel-shift/eloquent-model-generator.git"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
|||
63
composer.lock
generated
63
composer.lock
generated
|
|
@ -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": "fe0dfc9be66d39044403016f1648e00a",
|
||||
"content-hash": "e59ee5be6fa46e920698ff4284a36aa4",
|
||||
"packages": [
|
||||
{
|
||||
"name": "bacon/bacon-qr-code",
|
||||
|
|
@ -8491,22 +8491,22 @@
|
|||
},
|
||||
{
|
||||
"name": "uwil/k8s-laravel",
|
||||
"version": "1.0.0",
|
||||
"version": "1.2.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://lab.s-web.fr/ldc-web/projets/k8s-laravel.git",
|
||||
"reference": "e434ff64dd425b634d6b9cac1cde22b4273702d5"
|
||||
"reference": "a0103f8f4443fbc07f01dd4a91f74b2ae5350a8c"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://lab.s-web.fr/api/v4/projects/90/packages/composer/archives/uwil/k8s-laravel.zip?sha=e434ff64dd425b634d6b9cac1cde22b4273702d5",
|
||||
"reference": "e434ff64dd425b634d6b9cac1cde22b4273702d5",
|
||||
"url": "https://lab.s-web.fr/api/v4/projects/90/packages/composer/archives/uwil/k8s-laravel.zip?sha=a0103f8f4443fbc07f01dd4a91f74b2ae5350a8c",
|
||||
"reference": "a0103f8f4443fbc07f01dd4a91f74b2ae5350a8c",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"illuminate/support": "~10",
|
||||
"laravel/framework": "~10",
|
||||
"php": "~8"
|
||||
"illuminate/support": "~8|~9|~10",
|
||||
"laravel/framework": "~8|~9|~10",
|
||||
"php": "~7.3|~7.4|~8"
|
||||
},
|
||||
"require-dev": {
|
||||
"orchestra/testbench": "^8.5",
|
||||
|
|
@ -8553,6 +8553,53 @@
|
|||
],
|
||||
"description": "Laravel requirements for k8s"
|
||||
},
|
||||
{
|
||||
"name": "uwil/seo-laravel",
|
||||
"version": "1.0.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://lab.s-web.fr/ldc-web/projets/seo-laravel.git",
|
||||
"reference": "a98db255c69b6ef3fe9544ea008b82f0ab19738b"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://lab.s-web.fr/api/v4/projects/96/packages/composer/archives/uwil/seo-laravel.zip?sha=a98db255c69b6ef3fe9544ea008b82f0ab19738b",
|
||||
"reference": "a98db255c69b6ef3fe9544ea008b82f0ab19738b",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"illuminate/support": "~8|~9|~10",
|
||||
"laravel/framework": "~8|~9|~10",
|
||||
"php": "~7.3|~7.4|~8"
|
||||
},
|
||||
"require-dev": {
|
||||
"slevomat/coding-standard": "^8.3",
|
||||
"squizlabs/php_codesniffer": "^3.7"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"laravel": {
|
||||
"providers": [
|
||||
"Uwil\\Seo\\Laravel\\SeoServiceProvider"
|
||||
]
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Uwil\\Seo\\Laravel\\": "src/"
|
||||
}
|
||||
},
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Nicolas Demangeat",
|
||||
"email": "nicolas.demangeat@ldc.fr"
|
||||
}
|
||||
],
|
||||
"description": "Find Seo title and seo description of a model"
|
||||
},
|
||||
{
|
||||
"name": "vlucas/phpdotenv",
|
||||
"version": "v5.5.0",
|
||||
|
|
|
|||
12
config/seo.php
Normal file
12
config/seo.php
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
'bo_route_prefix' => 'bo.',
|
||||
'blade' => 'bo.pages.seo.index',
|
||||
'middlewares' => [
|
||||
'web',
|
||||
'lang',
|
||||
'auth:backend'
|
||||
],
|
||||
'guard' => 'backend'
|
||||
];
|
||||
66
package-lock.json
generated
66
package-lock.json
generated
|
|
@ -144,9 +144,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@babel/core/node_modules/semver": {
|
||||
"version": "6.3.0",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
|
||||
"integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==",
|
||||
"version": "6.3.1",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz",
|
||||
"integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==",
|
||||
"dev": true,
|
||||
"bin": {
|
||||
"semver": "bin/semver.js"
|
||||
|
|
@ -211,9 +211,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@babel/helper-compilation-targets/node_modules/semver": {
|
||||
"version": "6.3.0",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
|
||||
"integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==",
|
||||
"version": "6.3.1",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz",
|
||||
"integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==",
|
||||
"dev": true,
|
||||
"bin": {
|
||||
"semver": "bin/semver.js"
|
||||
|
|
@ -243,9 +243,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@babel/helper-create-class-features-plugin/node_modules/semver": {
|
||||
"version": "6.3.0",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
|
||||
"integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==",
|
||||
"version": "6.3.1",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz",
|
||||
"integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==",
|
||||
"dev": true,
|
||||
"bin": {
|
||||
"semver": "bin/semver.js"
|
||||
|
|
@ -269,9 +269,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@babel/helper-create-regexp-features-plugin/node_modules/semver": {
|
||||
"version": "6.3.0",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
|
||||
"integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==",
|
||||
"version": "6.3.1",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz",
|
||||
"integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==",
|
||||
"dev": true,
|
||||
"bin": {
|
||||
"semver": "bin/semver.js"
|
||||
|
|
@ -295,9 +295,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@babel/helper-define-polyfill-provider/node_modules/semver": {
|
||||
"version": "6.3.0",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
|
||||
"integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==",
|
||||
"version": "6.3.1",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz",
|
||||
"integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==",
|
||||
"dev": true,
|
||||
"bin": {
|
||||
"semver": "bin/semver.js"
|
||||
|
|
@ -1722,9 +1722,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@babel/preset-env/node_modules/semver": {
|
||||
"version": "6.3.0",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
|
||||
"integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==",
|
||||
"version": "6.3.1",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz",
|
||||
"integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==",
|
||||
"dev": true,
|
||||
"bin": {
|
||||
"semver": "bin/semver.js"
|
||||
|
|
@ -3639,9 +3639,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/babel-plugin-polyfill-corejs2/node_modules/semver": {
|
||||
"version": "6.3.0",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
|
||||
"integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==",
|
||||
"version": "6.3.1",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz",
|
||||
"integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==",
|
||||
"dev": true,
|
||||
"bin": {
|
||||
"semver": "bin/semver.js"
|
||||
|
|
@ -4625,9 +4625,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/eslint-plugin-import/node_modules/semver": {
|
||||
"version": "6.3.0",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
|
||||
"integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==",
|
||||
"version": "6.3.1",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz",
|
||||
"integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==",
|
||||
"dev": true,
|
||||
"peer": true,
|
||||
"bin": {
|
||||
|
|
@ -7193,9 +7193,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/read-pkg/node_modules/semver": {
|
||||
"version": "5.7.1",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
|
||||
"integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",
|
||||
"version": "5.7.2",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz",
|
||||
"integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==",
|
||||
"dev": true,
|
||||
"bin": {
|
||||
"semver": "bin/semver"
|
||||
|
|
@ -7552,9 +7552,9 @@
|
|||
"dev": true
|
||||
},
|
||||
"node_modules/semver": {
|
||||
"version": "7.5.1",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-7.5.1.tgz",
|
||||
"integrity": "sha512-Wvss5ivl8TMRZXXESstBA4uR5iXgEN/VC5/sOcuXdVLzcdkz4HWetIoRfG5gb5X+ij/G9rw9YoGn3QoQ8OCSpw==",
|
||||
"version": "7.5.4",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz",
|
||||
"integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"lru-cache": "^6.0.0"
|
||||
|
|
@ -9574,9 +9574,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/word-wrap": {
|
||||
"version": "1.2.3",
|
||||
"resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz",
|
||||
"integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==",
|
||||
"version": "1.2.5",
|
||||
"resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz",
|
||||
"integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
|
|
|
|||
|
|
@ -4,6 +4,13 @@
|
|||
{{ __('Dashboard') }}
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item">
|
||||
<a class="nav-link @if (Route::is('bo.seo.*'))active @endif" href="{{ route('bo.seo.index') }}" role="button" data-bs-toggle="tooltip" title="{{ __('Show the SEO informations') }}">
|
||||
{{ __('SEO') }}
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item">
|
||||
<a class="nav-link @if (Route::is('bo.sliders.*'))active @endif" href="{{ route('bo.sliders.index') }}" role="button" data-bs-toggle="tooltip" title="{{ __('crud.helpers.list_all', ['model' => __('models.classes.sliders')]) }}">
|
||||
{{ __('models.classes.sliders') }}
|
||||
|
|
@ -66,4 +73,4 @@
|
|||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
@endauth
|
||||
@endauth
|
||||
|
|
|
|||
73
resources/views/bo/pages/seo/index.blade.php
Normal file
73
resources/views/bo/pages/seo/index.blade.php
Normal file
|
|
@ -0,0 +1,73 @@
|
|||
@extends('bo.layout')
|
||||
|
||||
@section('title', __('crud.helpers.list_all', ['model' => __('models.classes.datas')]))
|
||||
@section('description', __('crud.helpers.list_all', ['model' => __('models.classes.datas')]))
|
||||
@section('breadcrumb', request()->route()->getName())
|
||||
|
||||
@section('content')
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<form class="float-start" action="{{ route('bo.seo.index') }}">
|
||||
<select class="form-select" name="type" id="type-filter">
|
||||
<option @if(!request()->type) selected @endif value="">{{ __('Filtrer par type') }}</option>
|
||||
@foreach (\Uwil\Seo\Laravel\Http\Controllers\SeoController::slugifiedSeoModels() as $slugifiedSeoModel => $className)
|
||||
<option @if(request()->type === $slugifiedSeoModel) selected @endif value="{{ $slugifiedSeoModel }}">{{ $className }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
@push('scripts')
|
||||
<script nonce="{{ $nonce }}">
|
||||
document.addEventListener('DOMContentLoaded', function (){
|
||||
let typeFilter = document.getElementById('type-filter')
|
||||
typeFilter.addEventListener('change', () => typeFilter.parentElement.submit())
|
||||
})
|
||||
</script>
|
||||
@endpush
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">{{ __('Type') }}</th>
|
||||
<th scope="col">{{ __('SEO Title') }}</th>
|
||||
<th scope="col">{{ __('SEO Description') }}</th>
|
||||
<th scope="col">{{ __('Status') }}</th>
|
||||
<th scope="col"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($seoItemList as $seoItem)
|
||||
<tr>
|
||||
<th scope="row">{{ $seoItem->type }}</th>
|
||||
<td>{{ $seoItem->seo_title }}</td>
|
||||
<td>{{ $seoItem->seo_description }}</td>
|
||||
<td class="align-middle text-center">
|
||||
@if($seoItem->status)
|
||||
<i class="fs-6 text-success fa-solid fa-circle-check"></i>
|
||||
@else
|
||||
<i class="fs-6 text-danger fa-regular fa-circle-xmark"></i>
|
||||
@endif
|
||||
</td>
|
||||
<td class="align-middle">
|
||||
<a class="btn btn-sm btn-primary" target="_blank" href="{{ $seoItem->bo_url }}" title="{{ __('crud.helpers.update_model', ['model' => Str::singular(__('models.classes.datas'))]) }}" data-bs-toggle="tooltip">
|
||||
<i class="fa-solid fa-pencil"></i>
|
||||
</a>
|
||||
@if($seoItem->status && $seoItem->fo_url !== '#')
|
||||
<a class="btn btn-sm btn-warning" target="_blank" href="{{ $seoItem->fo_url }}" title="{{ __('Show') }}" data-bs-toggle="tooltip">
|
||||
<i class="fa-solid fa-eye"></i>
|
||||
</a>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-12 col-md-6 p-0">
|
||||
{{ $seoItemList->withQueryString()->onEachSide(1)->links() }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
|
|
@ -31,7 +31,7 @@ $cookies = [];
|
|||
// YOUTUBE
|
||||
$cookies['youtube'] = [
|
||||
'name' => __('cookie-notice.custom.youtube.name'),
|
||||
'description' => __('cookie-notice.custom.youtube.name'),
|
||||
'description' => __('cookie-notice.custom.youtube.description'),
|
||||
'labelLink' => __('cookie-notice.custom.youtube.labelLink'),
|
||||
'link' => 'https://policies.google.com/technologies/cookies?hl=fr&utm_source=ucb',
|
||||
'cookies' => ['NID', 'VISITOR_INFO1_LIVE', 'YSC']
|
||||
|
|
@ -52,9 +52,9 @@ FALLBACK;
|
|||
|
||||
// VIMEO
|
||||
$cookies['vimeo'] = [
|
||||
'name' => __('cookie-notice.custom.youtube.name'),
|
||||
'description' => __('cookie-notice.custom.youtube.description'),
|
||||
'labelLink' => __('cookie-notice.custom.youtube.labelLink'),
|
||||
'name' => __('cookie-notice.custom.vimeo.name'),
|
||||
'description' => __('cookie-notice.custom.vimeo.description'),
|
||||
'labelLink' => __('cookie-notice.custom.vimeo.labelLink'),
|
||||
'link' => 'https://vimeo.com/cookie_policy',
|
||||
'cookies' => []
|
||||
];
|
||||
|
|
@ -92,7 +92,7 @@ SCRIPT;
|
|||
// MATOMO
|
||||
$cookies['matomo'] = [
|
||||
'name' => __('cookie-notice.custom.matomo.name'),
|
||||
'description' => __('cookie-notice.custom.matomo.name'),
|
||||
'description' => __('cookie-notice.custom.matomo.description'),
|
||||
'link' => 'https://fr.matomo.org/gdpr-analytics/',
|
||||
'labelLink' => __('En savoir +'),
|
||||
'cookies' => ['_pk']
|
||||
|
|
|
|||
|
|
@ -119,7 +119,7 @@ Route::prefix('bo')
|
|||
->withoutMiddleware('htmlsanitize')
|
||||
->middleware(['htmlsanitize:description']);
|
||||
Route::post('/sliders/{slider}/change-order', [SliderController::class, 'changeOrder'])
|
||||
->name('sliders.change-order');
|
||||
->name('sliders.change-order');
|
||||
});
|
||||
}
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue