ldc-dam/app/Models/Copyright.php

30 lines
591 B
PHP
Raw Normal View History

2019-06-17 09:22:10 +02:00
<?php
namespace App\Models;
2019-06-17 09:22:10 +02:00
use Illuminate\Database\Eloquent\Model;
class Copyright extends Model
{
2022-04-19 16:07:27 +02:00
/**
* The primary key associated with the table.
*
* @var string
*/
protected $primaryKey = 'copyright_id';
// * METHODS
/**
* Get brandcopyright
*
* @return self
* @throws \RuntimeException If fetching brand copyright fails.
*/
public static function getBrandCopyright(): self
{
return self::whereCopyrightId(3)->first() ??
throw new \RuntimeException('Failed to fetch brand copyright');
}
2019-06-17 09:22:10 +02:00
}