college-courses/app/Models/Lesson.php

21 lines
347 B
PHP
Raw Normal View History

2024-10-15 10:15:40 +03:00
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class Lesson extends Model
{
use HasFactory;
protected $fillable = [
'name', 'course_id', 'slug', 'body'
];
public function course()
{
return $this->belongsTo(Course::class);
}
}