32 lines
627 B
PHP
32 lines
627 B
PHP
<?php
|
|
|
|
|
|
|
|
namespace App\Models;
|
|
|
|
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
|
|
|
|
class CafeRating extends Model
|
|
|
|
{
|
|
|
|
use HasFactory;
|
|
|
|
|
|
|
|
protected $fillable = [
|
|
|
|
'cafe_id',
|
|
|
|
'category_id',
|
|
|
|
'subcategory_id',
|
|
|
|
];
|
|
|
|
|
|
|
|
public function cafe()
|
|
|
|
{
|
|
|
|
return $this->belongsTo(Cafe::class);
|
|
|
|
}
|
|
|
|
|
|
|
|
public function category()
|
|
|
|
{
|
|
|
|
return $this->belongsTo(Category::class);
|
|
|
|
}
|
|
|
|
|
|
|
|
public function subcategory()
|
|
|
|
{
|
|
|
|
return $this->belongsTo(Subcategory::class);
|
|
|
|
}
|
|
|
|
}
|