david HUN
03/23/2023, 8:02 PMConstant Variable
03/24/2023, 8:22 AMuse A17\TwillRepositories
and then call the functions like this: app(ArtistRepository::class)->update(???);
.
I'm mostly stuck on how to give the right arguments to the functions, how to handle uploading images, adding relationships, etc.
Thanks for you help, beautiful morningdavid HUN
03/24/2023, 10:35 AM$form->add(
BlockEditor::make()->blocks(['header.topbar'])
);
Nizami
03/25/2023, 9:50 PMresources/views/admin/blocks
and all blocks there, but I want to structure it a bit more and add subfolders. If I add now, it seems application can't read them, so I guess I need to add mapper, but can't find where...Constant Variable
03/26/2023, 9:20 AMmillpreet
03/27/2023, 4:04 AMjefsev
03/27/2023, 7:13 PMjefsev
03/27/2023, 7:16 PMpublic function forNestedSlug(
string $nestedSlug,
array $with = [],
array $withCount = [],
array $scopes = []
): ?TwillModelContract {
$targetSlug = collect(explode('/', $nestedSlug))->last();
$targetItem = $this->forSlug($targetSlug, $with, $withCount, $scopes);
if (!$targetItem || $nestedSlug !== $targetItem->nestedSlug) {
return null;
}
return $targetItem;
}
When i explode it in my resolveRouteBinding and call forSlug it does work but the slugs in the cms are all wrong:millpreet
03/28/2023, 3:09 AMmillpreet
03/28/2023, 6:13 AMBA7YA
03/28/2023, 9:30 AMOlivier
03/28/2023, 2:42 PMjefsev
03/28/2023, 6:40 PMjefsev
03/29/2023, 12:24 PMjefsev
03/30/2023, 11:29 AMNechalon
03/31/2023, 3:45 PMhttps://cdn.discordapp.com/attachments/811986149064441927/1091387711539134594/image.png▾
millpreet
04/01/2023, 3:31 AMNechalon
04/03/2023, 11:35 AMLucius Vorenus
04/03/2023, 12:38 PMelkex
04/03/2023, 2:37 PMmillpreet
04/03/2023, 6:07 PMelkex
04/04/2023, 1:05 PMLucius Vorenus
04/04/2023, 5:10 PMmake
function requires the value first.
public static function make(string|int $value, string $label, bool $selectable = true): self
{
return new self($value, $label, $selectable);
}
https://cdn.discordapp.com/attachments/811986149064441927/1092858658334974012/Screenshot_from_2023-04-04_18-04-51.png▾
millpreet
04/05/2023, 3:16 AMmillpreet
04/05/2023, 3:31 AMmillpreet
04/05/2023, 3:42 AMdakaalim
04/05/2023, 5:10 AMSQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails
https://github.com/area17/twill/blob/557996e4ba2af2f06533b20531b31cc5aba6f9ee/src/Repositories/Behaviors/HandleRevisions.php#L59
Shouldn'millpreet
04/05/2023, 5:44 AMhttps://cdn.discordapp.com/attachments/811986149064441927/1093048574549438494/image.png▾
millpreet
04/05/2023, 6:31 AMhttps://cdn.discordapp.com/attachments/811986149064441927/1093060265127456768/image.png▾
elkex
04/06/2023, 8:56 AM