<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class ServiceStat extends Model
{
use HasFactory;
/**
* The attributes that are mass assignable.
*
* @var string[]
*/
protected $fillable = ['date'];
* The model's attributes.
* @var array
protected $attributes = [
'nb_calls' => 0
];
// * RELATIONS
* Brand BelongsTo relation
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
public function brand()
return $this->belongsTo(Brand::class);
}
* Service BelongsTo relation
public function service()
return $this->belongsTo(Service::class);