Education.php
574 Bytes
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class Education extends Model
{
use HasFactory;
protected $fillable = [
'name',
'is_remove',
'address',
'telephone',
'email',
'text',
'image'
];
public function scopeActive($query) {
return $query->where('is_remove', '=', '0');
}
public function program_education() {
return $this->hasMany(ProgramEducation::class);
}
}