mirror of
https://github.com/AnimeThemes/animethemes-server.git
synced 2026-09-04 11:45:00 +02:00
20 lines
355 B
PHP
20 lines
355 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Concerns\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Support\Str;
|
|
|
|
trait HasLabel
|
|
{
|
|
/**
|
|
* Get the human-friendly label for the underlying model.
|
|
*/
|
|
protected function privateLabel(Model $model): string
|
|
{
|
|
return Str::headline(class_basename($model));
|
|
}
|
|
}
|