ifox
05/24/2022, 1:59 PMifox
05/24/2022, 1:59 PMifox
05/24/2022, 2:01 PMifox
05/24/2022, 2:02 PMKormi
05/24/2022, 2:03 PMifox
05/24/2022, 2:05 PMifox
05/24/2022, 2:07 PMifox
05/24/2022, 2:07 PMKormi
05/24/2022, 2:13 PM$url = route('story.show', ['slug' => $slug]);
is there a way to change locale ?Kormi
05/24/2022, 2:13 PMif($locale != $current_local){
app('laravellocalization')->setLocale($locale);
}
$url = route('story.show', ['slug' => $slug]);
if($locale != $current_local){
app('laravellocalization')->setLocale($current_local);
}
Something like that?ifox
05/24/2022, 2:16 PMKormi
05/24/2022, 4:41 PMKormi
05/24/2022, 4:49 PMKormi
05/24/2022, 5:04 PMifox
05/24/2022, 5:05 PMKormi
05/24/2022, 5:21 PMBA7YA
05/26/2022, 9:57 AMKormi
05/26/2022, 10:20 AMKormi
05/26/2022, 12:19 PMclass LoginController extends AdminLoginController
{
use setsMetadata;
public function __construct(
Config $config,
AuthManager $authManager,
Encrypter $encrypter,
Redirector $redirector,
ViewFactory $viewFactory
) {
parent::__construct(
$config,
$authManager,
$encrypter,
$redirector,
$viewFactory
);
$this->middleware('twill_guest', ['except' => ['logout']]);
$this->redirectTo = $config->get('twill.auth_login_redirect_path', '/');
}
I need to remove the middleware twill_guest. How can I do this?dedli
05/26/2022, 8:44 PMifox
05/26/2022, 9:23 PMChristfister
05/26/2022, 9:32 PMdedli
05/27/2022, 4:03 AMpublic static function linkTypeSelect(): array
{
return [
['value'=>'url', 'label'=>'Посилання на сторонній ресурс', 'data'=>[]],
['value'=>'page', 'label' => 'Сторінки поза розділами', 'data' => app(PageRepository::class)->listAll()],
['value'=>'personal_category', 'label' => 'Категорія розділу приватним клієнтам', 'data' => app(PersonalCategoryRepository::class)->listAll()],
['value' => 'personal_page', 'label' => 'Сторінка розділу приватним клієнтам', 'data' => app(PersonalPageRepository::class)->listAll()],
['value' => 'small_business_category', 'label' => 'Категорія розділу малому та середньому бізнесу', 'data' => app(SmallBusinessCategoryRepository::class)->listAll()],
['value' => 'small_business_page', 'label' => 'Сторінка розділу малому та середньому бізнесу', 'data' => app(SmallBusinessPageRepository::class)->listAll()],
['value' => 'business_category', 'label' => 'Категорія розділу великому бізнесу', 'data' => app(BusinessCategoryRepository::class)->listAll()],
['value' => 'business_page', 'label' => 'Сторінка розділу великому бізнесу', 'data'=> app(BusinessPageRepository::class)->listAll()]
];
}dedli
05/27/2022, 4:03 AM@php
$namePrefix = $namePrefix??'';
$linksData = \App\Services\LinksHelper::linkTypeSelect();
@endphp
@formField('select', [
'name' => 'link_type'.$namePrefix,
'label' => 'Тип посилання',
'default'=>$linksData[0]['value'],
'placeholder' => 'Оберіть тип посилання',
'options' => $linksData
])
@foreach($linksData as $link)
@formConnectedFields([
'fieldName' => 'link_type'.$namePrefix,
'fieldValues' => $link['value']
])
@if($loop->first)
@formField('input', [
'name' => $link['value'].$namePrefix,
'label' => $link['label'],
])
@else
@formField('select', [
'name' => 'link_id'.$namePrefix,
'label' => $link['label'],
'options' => $link['data']
])
@endif
@endformConnectedFields
@endforeach
In the other part of the site (not inside blocks and repeater), it works correctly. Am I doing something wrong?ifox
05/27/2022, 10:27 AMnuffsaid
05/27/2022, 12:01 PM2.8.3
- After upgrading to 2.8.4 (and after executing php artisan twill:build the cms still works as intended but the custom input elements are not displayed anymore - you can see the <a17- tag in the DOM but the component is not rendered.
- the browser console does not display any errors.
- Downgrading to 2.8.3 and executing another php artisan twill:build everything is displayed again.
Is this issue already known? 🙂Harings Rob
05/27/2022, 12:38 PMHarings Rob
05/27/2022, 12:42 PMnuffsaid
05/27/2022, 12:43 PMnuffsaid
05/27/2022, 2:56 PM