Initial baseline: LaraBlog core with plugin commerce surface.
Captures the current working tree after theme slots, ArticleAccess, and the payment / paid-content plugins so subsequent work has a reviewable git history.
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Filament\Concerns;
|
||||
|
||||
trait HasTranslatedLabels
|
||||
{
|
||||
/** Navigation / plural key under admin.nav and admin.models, e.g. articles */
|
||||
abstract protected static function navKey(): string;
|
||||
|
||||
/** Singular model key under admin.models, e.g. article */
|
||||
abstract protected static function modelKey(): string;
|
||||
|
||||
/** Group key under admin.groups: content|system|plugins */
|
||||
protected static function groupKey(): string
|
||||
{
|
||||
return 'content';
|
||||
}
|
||||
|
||||
public static function getNavigationLabel(): string
|
||||
{
|
||||
return __('admin.nav.'.static::navKey());
|
||||
}
|
||||
|
||||
public static function getModelLabel(): string
|
||||
{
|
||||
return __('admin.models.'.static::modelKey());
|
||||
}
|
||||
|
||||
public static function getPluralModelLabel(): string
|
||||
{
|
||||
return __('admin.models.'.static::navKey());
|
||||
}
|
||||
|
||||
public static function getNavigationGroup(): ?string
|
||||
{
|
||||
return __('admin.groups.'.static::groupKey());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user