Update source into github

This commit is contained in:
pbao9
2025-07-24 16:18:27 +07:00
parent 41419358dd
commit 69851ac7bc
2642 changed files with 284095 additions and 0 deletions
+29
View File
@@ -0,0 +1,29 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class Post extends Model
{
use HasFactory;
protected $table = 'post';
protected $fillable = [
'name',
'slug',
'thumbnail',
'content',
'status'
];
public function getStatus()
{
return match ((int)$this->status) {
1 => '<span class="badge bg-success text-success-fg">Published</span>',
2 => '<span class="badge bg-secondary text-secondary-fg">Draft</span>',
default => '<span class="badge bg-warning text-warning-fg">Pending</span>',
};
}
}