Bulletinboard/app/Models/Occupation.php

21 lines
310 B
PHP

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class Occupation extends Model
{
use HasFactory;
protected $fillable = [
"name"
];
public function post(){
return $this->hasMany(Post::class);
}
}