12345678910111213141516171819 |
- <?php
- namespace App\Models;
- use Illuminate\Database\Eloquent\Factories\HasFactory;
- use Illuminate\Database\Eloquent\Model;
- class Comment extends Model
- {
- use HasFactory;
- public function film() {
- return $this->belongsTo(Film::class, 'film');
- }
- public function author() {
- return $this->belongsTo(User::class, 'user');
- }
- }
|