Keystore/app/Models/Post.php
Helge-Mikael Nordgård a6a0a0a506 first commit
2025-02-05 03:05:01 +01:00

21 lines
360 B
PHP

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\HasMany;
use App\Models\Store;
class Post extends Model
{
protected $table = 'posts';
protected $fillable = [
'body'
];
public function stores(): HasMany {
return $this->hasMany(Store::class, 'post_id');
}
}