Skip to content
2 changes: 1 addition & 1 deletion app/Nova/Attribute.php
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down
2 changes: 1 addition & 1 deletion app/Nova/Color.php
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down
2 changes: 1 addition & 1 deletion app/Nova/Feature.php
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down
2 changes: 1 addition & 1 deletion app/Nova/Tag.php
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down
4 changes: 4 additions & 0 deletions app/Providers/NovaServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -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"));
}

Expand Down
2 changes: 1 addition & 1 deletion config/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
|
*/

'locale' => 'en_US',
'locale' => 'en',

/*
|--------------------------------------------------------------------------
Expand Down
10 changes: 5 additions & 5 deletions resources/views/items/show.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ class="text-regular">{{ $item->published_at->format('jS M Y, H:i') }} UTC
</p>
</div>

@foreach ($item->attributes as $attribute)
@foreach ($item->attributes()->orderByTranslation('name')->get() as $attribute)
<h4 class="mt-4">{{ $attribute->name }}</h4>
<p class="text-muted text-regular">{{ $attribute->pivot->value }}</p>
@endforeach
Expand Down Expand Up @@ -123,7 +123,7 @@ class="text-regular">{{ $item->published_at->format('jS M Y, H:i') }} UTC

<h4 class="mt-4">{{ __('ui.item.category') }}</h4>
<div class="row">
@forelse ($item->categories as $category)
@forelse ($item->categories()->orderByTranslation('name')->get() as $category)
<div class="p-1 list-group text-center col small">
<a class="list-group-item" href="{{ $category->url }}">
{{ $category->name }}
Expand All @@ -138,7 +138,7 @@ class="text-regular">{{ $item->published_at->format('jS M Y, H:i') }} UTC
title="{{ __('ui.item.features_help') }}"
data-toggle="tooltip" class="fal fa-question-circle"></i></h4>
<div class="row">
@forelse ($item->features as $feature)
@forelse ($item->features()->orderByTranslation('name')->get() as $feature)
<div class="p-1 list-group text-center col-lg-4 col-6 small">
<a class="list-group-item" href="{{ $feature->url }}">
{{ $feature->name }}
Expand All @@ -151,7 +151,7 @@ class="text-regular">{{ $item->published_at->format('jS M Y, H:i') }} UTC

<h4 class="mt-4">{{ __('ui.item.colors') }}</h4>
<div class="row">
@forelse ($item->colors as $color)
@forelse ($item->colors()->orderByTranslation('name')->get() as $color)
<div class="p-1 list-group text-center col-lg-4 col-6 small">
<a class="list-group-item" href="{{ $color->url }}">
{{ $color->name }}
Expand All @@ -164,7 +164,7 @@ class="text-regular">{{ $item->published_at->format('jS M Y, H:i') }} UTC

<h4 class="mt-4">{{ __('ui.item.tags') }}</h4>
<div class="row">
@forelse ($item->tags as $tag)
@forelse ($item->tags()->orderByTranslation('name')->get() as $tag)
<div class="p-1 list-group text-center col-lg-4 col-6 small">
<a class="list-group-item" href="{{ $tag->url }}">
{{ $tag->name }}
Expand Down
2 changes: 1 addition & 1 deletion resources/views/layouts/app.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@

<div class="dropdown-menu" aria-labelledby="navbarDropdown">
@foreach(config('app.locales') as $key => $value)
@if ($key != 'en')
@if ($key != 'en_US')
<a class="dropdown-item" href="{{ route('set_lang', ['lang' => $key]) }}">{{ $value }}</a>
@endif
@endforeach
Expand Down
Loading