intial commit

This commit is contained in:
2026-06-07 19:10:00 +07:00
commit 37bf240d23
230 changed files with 37141 additions and 0 deletions
+25
View File
@@ -0,0 +1,25 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class Post extends Model
{
use HasFactory;
protected $fillable = [
'user_id', 'title', 'content','read'
];
public function comments()
{
return $this->hasMany(Comment::class, 'post_id', 'id');
}
public function user()
{
return $this->belongsTo(User::class);
}
}