generated from IBEC-BOX/admin-kit-package-skeleton
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
68 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,9 @@ | ||
<?php | ||
|
||
return [ | ||
'resource' => [ | ||
'label' => 'SEO', | ||
'plural_label' => 'SEO', | ||
'group_name' => 'SEO Settings', | ||
|
||
'id' => 'ID', | ||
'title' => 'Title', | ||
|
||
'created_at' => 'Создан', | ||
'updated_at' => 'Обновлен', | ||
], | ||
'title' => 'Title', | ||
'description' => 'Description', | ||
'keywords' => 'Keywords', | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,9 @@ | ||
<?php | ||
|
||
return [ | ||
'resource' => [ | ||
'label' => 'SEO', | ||
'plural_label' => 'SEO', | ||
'group_name' => 'Настройки SEO', | ||
|
||
'id' => 'ID', | ||
'title' => 'Title', | ||
|
||
'created_at' => 'Создан', | ||
'updated_at' => 'Обновлен', | ||
], | ||
'title' => 'Заголовок', | ||
'description' => 'Описание', | ||
'keywords' => 'Ключевые слова', | ||
]; |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<?php | ||
|
||
namespace AdminKit\SEO\Forms\Components; | ||
|
||
use Filament\Forms\Components\Section; | ||
use Filament\Forms\Components\Textarea; | ||
use Filament\Forms\Components\TextInput; | ||
|
||
class SEOSection | ||
{ | ||
public static function make() | ||
{ | ||
return Section::make(__('admin-kit-seo::seo.group_name')) | ||
->relationship('seo') | ||
->schema([ | ||
TextInput::make('title') | ||
->label(__('admin-kit-seo::seo.title')) | ||
->maxLength(70) | ||
->columnSpan(2), | ||
|
||
Textarea::make('description') | ||
->label(__('admin-kit-seo::seo.description')) | ||
->maxLength(300) | ||
->rows(3) | ||
->columnSpan(2), | ||
|
||
Textarea::make('keywords') | ||
->label(__('admin-kit-seo::seo.keywords')) | ||
->maxLength(255) | ||
->rows(3) | ||
->columnSpan(2), | ||
]); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?php | ||
|
||
namespace AdminKit\SEO\Traits; | ||
|
||
use AdminKit\SEO\Models\SEO; | ||
use Illuminate\Database\Eloquent\Relations\MorphOne; | ||
|
||
trait HasSEO | ||
{ | ||
public function seo(): MorphOne | ||
{ | ||
return $this->morphOne(SEO::class, 'seoable'); | ||
} | ||
} |