integration vom Blog-plugin, hübschere webseite,
This commit is contained in:
25
app/Models/BlogCategory.php
Normal file
25
app/Models/BlogCategory.php
Normal file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use Spatie\Translatable\HasTranslations;
|
||||
use Stephenjude\FilamentBlog\Models\Category as BaseCategory;
|
||||
|
||||
class BlogCategory extends BaseCategory
|
||||
{
|
||||
use HasFactory, SoftDeletes, HasTranslations;
|
||||
|
||||
protected $translatable = [
|
||||
'name',
|
||||
'description',
|
||||
];
|
||||
|
||||
protected $fillable = [
|
||||
'slug',
|
||||
'is_visible',
|
||||
'translations',
|
||||
];
|
||||
}
|
||||
32
app/Models/BlogPost.php
Normal file
32
app/Models/BlogPost.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use Spatie\Translatable\HasTranslations;
|
||||
use Stephenjude\FilamentBlog\Models\Post as BasePost;
|
||||
|
||||
class BlogPost extends BasePost
|
||||
{
|
||||
use HasFactory, SoftDeletes, HasTranslations;
|
||||
|
||||
protected $translatable = [
|
||||
'title',
|
||||
'excerpt',
|
||||
'content',
|
||||
'meta_title',
|
||||
'meta_description',
|
||||
];
|
||||
|
||||
protected $fillable = [
|
||||
'blog_author_id',
|
||||
'blog_category_id',
|
||||
'slug',
|
||||
'banner',
|
||||
'published_at',
|
||||
'is_published',
|
||||
'translations',
|
||||
];
|
||||
}
|
||||
23
app/Models/BlogTag.php
Normal file
23
app/Models/BlogTag.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use Spatie\Translatable\HasTranslations;
|
||||
use Stephenjude\FilamentBlog\Models\Tag as BaseTag;
|
||||
|
||||
class BlogTag extends BaseTag
|
||||
{
|
||||
use HasFactory, SoftDeletes, HasTranslations;
|
||||
|
||||
protected $translatable = [
|
||||
'name',
|
||||
];
|
||||
|
||||
protected $fillable = [
|
||||
'slug',
|
||||
'translations',
|
||||
];
|
||||
}
|
||||
Reference in New Issue
Block a user