diff --git a/README.md b/README.md index 12be57a..710e8af 100644 --- a/README.md +++ b/README.md @@ -60,7 +60,6 @@ SeoRobots::make() php artisan filament-seo-meta-tags:publish-middleware ``` - In your `app/Http/Kernel.php` file, add the middleware to the `web` group: ```php @@ -72,6 +71,12 @@ protected $middlewareGroups = [ ]; ``` +## Publishing the configuration + +```bash +php artisan vendor:publish --tag=filament-seo-meta-tags-config +``` + ## License The MIT License (MIT). Please see [License File](LICENSE.md) for more information. diff --git a/config/filament-seo-meta-tags.php b/config/filament-seo-meta-tags.php new file mode 100644 index 0000000..8ed7dad --- /dev/null +++ b/config/filament-seo-meta-tags.php @@ -0,0 +1,5 @@ + \MartinRo\FilamentSeoMetaTags\Models\SeoMetaTag::class, +]; diff --git a/src/Concerns/HasSeoMetaTags.php b/src/Concerns/HasSeoMetaTags.php index 99938ad..1fb3c62 100644 --- a/src/Concerns/HasSeoMetaTags.php +++ b/src/Concerns/HasSeoMetaTags.php @@ -16,6 +16,6 @@ public function setSeoMetaTags(): void public function seoMetaTags(): MorphOne { - return $this->morphOne(SeoMetaTag::class, 'model'); + return $this->morphOne(config('filament-seo-meta-tags.model', SeoMetaTag::class), 'model'); } } diff --git a/src/FilamentSeoMetaTagsServiceProvider.php b/src/FilamentSeoMetaTagsServiceProvider.php index 5879873..ffdddff 100644 --- a/src/FilamentSeoMetaTagsServiceProvider.php +++ b/src/FilamentSeoMetaTagsServiceProvider.php @@ -14,6 +14,7 @@ public function configurePackage(Package $package): void $package->name(static::$name) ->hasMigration('create_seo_meta_tags_table') ->runsMigrations() + ->hasConfigFile() ->hasCommands([ Commands\PublishMiddleware::class, ]);