| 12345678910111213141516171819202122232425262728293031 |
- <?php
- namespace App\Models;
- use Illuminate\Database\Eloquent\Model;
- use Illuminate\Database\Eloquent\Relations\BelongsTo;
- /**
- * @property-read \App\Models\Media|null $media
- * @property-read \App\Models\Review|null $review
- * @method static \Illuminate\Database\Eloquent\Builder<static>|ReviewMedia newModelQuery()
- * @method static \Illuminate\Database\Eloquent\Builder<static>|ReviewMedia newQuery()
- * @method static \Illuminate\Database\Eloquent\Builder<static>|ReviewMedia query()
- * @mixin \Eloquent
- */
- class ReviewMedia extends Model
- {
- protected $table = 'review_media';
- protected $fillable = ['review_id', 'media_id', 'origin'];
- public function review(): BelongsTo
- {
- return $this->belongsTo(Review::class);
- }
- public function media(): BelongsTo
- {
- return $this->belongsTo(Media::class);
- }
- }
|