<?php
namespace App\Traits;
trait NovaLabelTraits
{
/**
* Get the displayable singular label of the resource.
*
* @return string
*/
public static function singularLabel()
{
if (property_exists(get_called_class(), 'singularLabel')) {
return static::$label;
}
return Str::singular(static::label());
}
/**
* Get the displayable label of the resource.
*
* @return string
*/
public static function label()
{
if (property_exists(get_called_class(), 'label')) {
return static::$label;
}
return Str::plural(class_basename(get_called_class()));
}
}