ldc-qrcollector-back/app/Models/Url.php
2023-03-20 13:02:26 +00:00

52 lines
889 B
PHP

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class Url extends Model
{
use HasFactory;
/**
* The attributes that are mass assignable.
*
* @var array<int, string>
*/
protected $fillable = [
'key',
'value',
'image_settings'
];
/**
* Get the brand that owns the url.
*
* @return BelongsTo
*/
public function brand()
{
return $this->belongsTo(Brand::class);
}
/**
* Get the history for the url.
*
* @return HasMany
*/
public function history()
{
return $this->hasMany(UrlHistory::class);
}
/**
* Get the stats for the url.
*
* @return HasMany
*/
public function stats()
{
return $this->hasMany(UrlStats::class);
}
}