giuseppemastrodonato
05/20/2022, 8:58 AMgiuseppemastrodonato
05/20/2022, 8:59 AMgiuseppemastrodonato
05/20/2022, 8:59 AMdedli
05/20/2022, 2:38 PMifox
05/20/2022, 2:39 PMdedli
05/20/2022, 2:47 PMdedli
05/21/2022, 3:22 PMapp/Http/Controllers/Admin/SettingController.php witch extends \A17\Twill\Http\Controllers\Admin\SettingController and override it, but setting form does not see it
<?php
namespace App\Http\Controllers\Admin;
use App\Services\Helper;
class SettingController extends \A17\Twill\Http\Controllers\Admin\SettingController
{
protected function formData($request)
{
return Helper::linkTypeSelect();
}
}ifox
05/21/2022, 3:44 PM@php @endphp directivestrungpolit
05/21/2022, 4:36 PMdedli
05/21/2022, 4:37 PMkalle
05/21/2022, 4:45 PM$indexColumns in module controller array in which you can modify table column content.kalle
05/21/2022, 4:55 PMphp
<?php
namespace App\Http\Controllers\Admin;
use App\Services\Helper;
class SettingController extends \A17\Twill\Http\Controllers\Admin\SettingController
{
protected function formData($request)
{
return ['linkhelper' => Helper::linkTypeSelect()];
}
}
But this will not work smoothly in your case so its better to stick with @php directivededli
05/21/2022, 5:04 PMpublic static function linkTypeSelect(){
return[
'personal_categories' => app()->make(PersonalCategoryRepository::class)->listAll(),
'personal_pages' => app()->make(PersonalPageRepository::class)->listAll(),
'small_business_categories' => app()->make(SmallBusinessCategoryRepository::class)->listAll(),
'small_business_pages' => app()->make(SmallBusinessPageRepository::class)->listAll(),
'business_categories' => app()->make(BusinessCategoryRepository::class)->listAll(),
'business_pages' => app()->make(BusinessPageRepository::class)->listAll(),
'pages' => app()->make(PageRepository::class)->listAll()
];
} but it is not work from SettingController. Php directive work great for mekalle
05/21/2022, 5:11 PMdedli
05/21/2022, 5:38 PMkalle
05/21/2022, 5:44 PM$personal_categories, $personal_pages etc.Harings Rob
05/21/2022, 5:53 PMHarings Rob
05/21/2022, 5:55 PMkalle
05/21/2022, 5:57 PMformData is not implemented on that controller.
Its implemented only on ModuleController for modules.dedli
05/22/2022, 8:32 AMtrungpolit
05/22/2022, 10:51 AMCustomTableRow.vue from Twill TableRow.vue, then add my custom code to the one.
2. Then clone a parent Vue component named CustomDatatable.vue from Twill Datatable.vue, then change it using the CustomTableRow.vue than TableRow.vue.
But I don't know a way to do these (1 and 2), How I can customize
Twill core Vue components like these?
I read and followed the Twill doc at https://twill.io/docs/guides/creating_custom_components_form_fields_and_blocks.html#part-1-setup-twill-for-development, but it seems to only work in Twill Form.ifox
05/22/2022, 11:49 AMdedli
05/23/2022, 1:05 AMifox
05/23/2022, 1:07 AMformColumns here on discord and you'll find a couple snippets.dedli
05/23/2022, 8:08 AMBassem
05/23/2022, 3:34 PMifox
05/23/2022, 4:22 PMdedli
05/24/2022, 6:04 AMHarings Rob
05/24/2022, 6:05 AMdedli
05/24/2022, 6:34 AM