2019-06-17 09:22:10 +02:00
|
|
|
<?php
|
|
|
|
|
|
2019-09-12 11:08:25 +02:00
|
|
|
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';
|
2022-06-20 14:57:58 +02:00
|
|
|
|
|
|
|
|
// * 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
|
|
|
}
|