23 lines
400 B
PHP
23 lines
400 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
use App\Models\Post;
|
|
|
|
class Store extends Model
|
|
{
|
|
protected $table = 'stores';
|
|
protected $fillable = [
|
|
'post_id',
|
|
'key',
|
|
'values'
|
|
];
|
|
|
|
public function post(): BelongsTo {
|
|
return $this->belongsTo(Post::class, 'post_id');
|
|
}
|
|
}
|