diff --git a/app/Nova/Attribute.php b/app/Nova/Attribute.php index 588b115..683c94a 100644 --- a/app/Nova/Attribute.php +++ b/app/Nova/Attribute.php @@ -54,7 +54,7 @@ public function fields(Request $request) Translatable::make('Name') ->indexLocale('en') ->sortable() - ->rules('required', 'min:2', 'max:255'), + ->rules('max:255'), Text::make('Value') ->readonly(), diff --git a/app/Nova/Color.php b/app/Nova/Color.php index c013279..2d27556 100644 --- a/app/Nova/Color.php +++ b/app/Nova/Color.php @@ -55,7 +55,7 @@ public function fields(Request $request) Translatable::make('Name') ->indexLocale('en') ->sortable() - ->rules('required', 'min:2', 'max:255'), + ->rules('max:255'), DateTime::make('Created', 'created_at')->onlyOnDetail(), DateTime::make('Updated', 'updated_at')->onlyOnDetail(), diff --git a/app/Nova/Feature.php b/app/Nova/Feature.php index 9ec4ed8..7fb90fe 100644 --- a/app/Nova/Feature.php +++ b/app/Nova/Feature.php @@ -55,7 +55,7 @@ public function fields(Request $request) Translatable::make('Name') ->indexLocale('en') ->sortable() - ->rules('required', 'min:2', 'max:255'), + ->rules('max:255'), DateTime::make('Created', 'created_at')->onlyOnDetail(), DateTime::make('Updated', 'updated_at')->onlyOnDetail(), diff --git a/app/Nova/Tag.php b/app/Nova/Tag.php index 3d7f22b..31488e1 100644 --- a/app/Nova/Tag.php +++ b/app/Nova/Tag.php @@ -55,7 +55,7 @@ public function fields(Request $request) Translatable::make('Name') ->indexLocale('en') ->sortable() - ->rules('required', 'min:2', 'max:255'), + ->rules('max:255'), DateTime::make('Created', 'created_at')->onlyOnDetail(), DateTime::make('Updated', 'updated_at')->onlyOnDetail(), diff --git a/app/Providers/NovaServiceProvider.php b/app/Providers/NovaServiceProvider.php index 26d820c..dabe330 100644 --- a/app/Providers/NovaServiceProvider.php +++ b/app/Providers/NovaServiceProvider.php @@ -27,6 +27,10 @@ public function boot() parent::boot(); + Nova::serving(function ($event) { + app()->setLocale('en_US'); + }); + Nova::style("css-overrides", public_path("assets/overrides.css")); } diff --git a/config/app.php b/config/app.php index b8f41e9..76212bb 100644 --- a/config/app.php +++ b/config/app.php @@ -80,7 +80,7 @@ | */ - 'locale' => 'en_US', + 'locale' => 'en', /* |-------------------------------------------------------------------------- diff --git a/resources/views/items/show.blade.php b/resources/views/items/show.blade.php index bd58e46..7baddfb 100644 --- a/resources/views/items/show.blade.php +++ b/resources/views/items/show.blade.php @@ -89,7 +89,7 @@ class="text-regular">{{ $item->published_at->format('jS M Y, H:i') }} UTC
- @foreach ($item->attributes as $attribute) + @foreach ($item->attributes()->orderByTranslation('name')->get() as $attribute){{ $attribute->pivot->value }}
@endforeach @@ -123,7 +123,7 @@ class="text-regular">{{ $item->published_at->format('jS M Y, H:i') }} UTC