40 lines
680 B
PHP
40 lines
680 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class UrlStats extends Model
|
|
{
|
|
use HasFactory;
|
|
|
|
/**
|
|
* The attributes that are mass assignable.
|
|
*
|
|
* @var array<int, string>
|
|
*/
|
|
protected $fillable = [
|
|
'calls',
|
|
'date'
|
|
];
|
|
|
|
/**
|
|
* The attributes that should be cast.
|
|
*
|
|
* @var array<string, string>
|
|
*/
|
|
protected $casts = [
|
|
'date' => 'date',
|
|
];
|
|
|
|
/**
|
|
* Get the url that owns the stats.
|
|
*
|
|
* @return BelongsTo
|
|
*/
|
|
public function url()
|
|
{
|
|
return $this->belongsTo(Url::class);
|
|
}
|
|
}
|