kalle
07/01/2022, 1:46 PMzoi
07/01/2022, 2:01 PMkalle
07/01/2022, 2:04 PMzoi
07/01/2022, 2:07 PMpboivin
07/01/2022, 2:34 PMpboivin
07/01/2022, 2:35 PMfree.blade.php
layoutzoi
07/01/2022, 3:08 PMSami
07/01/2022, 3:40 PMphp artisan twill:make:singleton HomePage -TR
but I have a trouble seeding it to the database. I'm using one seeder (DatabaseSeeder) and creating the model like this:
php
HomePage::create([
'en' => [
'title' => 'Homepage',
'description' => 'Some random description',
'active' => true,
],
'de' => [
'title' => 'Hömëpägë',
'description' => 'Some random description too',
'active' => true,
]
]);
I didn't modify the model (so it's only a basic class generated by Twill), just removed published
from migration and from fillable
I'm getting **TypeError**:
Argument 1 passed to Illuminate\Database\Grammar::parameterize() must be of the type array, string given, called in ..\project\vendor\laravel\framework\src\Illuminate\Database\Query\Grammars\Grammar.php on line 886
pboivin
07/01/2022, 3:42 PMapp(HomePageRepository::class)->create([
'title' => [
'en' => '...',
'de' => '...',
],
...
]);
Sami
07/01/2022, 3:46 PMSami
07/01/2022, 3:48 PMSami
07/01/2022, 3:48 PMdedli
07/02/2022, 12:47 PMDocument::withDepth()->having('depth', '=', 2)->get()
. If I remove having in query I get documents with depth in attributes. My db is Postgres maybe it is a problem
https://monosnap.com/file/jKNpi0qmCHezqlHYYUOH3ywCt9OY9aifox
07/02/2022, 1:43 PMifox
07/02/2022, 1:44 PMifox
07/02/2022, 1:44 PMdedli
07/02/2022, 2:00 PMdedli
07/02/2022, 2:07 PMifox
07/02/2022, 8:20 PMdedli
07/03/2022, 4:42 AMdedli
07/03/2022, 6:53 AMHarings Rob
07/04/2022, 6:25 AMHarings Rob
07/04/2022, 6:27 AMdedli
07/04/2022, 6:53 AMprotected function getBrowserTableData($items){
$withImage = $this->moduleHas('medias');
return $items->map(function ($item) use ($withImage) {
$columnsData = Collection::make($this->browserColumns)->mapWithKeys(function ($column) use ($item) { return $this->getItemColumnData($item, $column);
})->toArray();
$name = $columnsData[$this->titleColumnKey] . ' ('.($columnsData['published']?'актуальний':'архівний').')'; unset($columnsData[$this->titleColumnKey]);
return ['id' => $this->getItemIdentifier($item), 'name' => $name, 'edit' => moduleRoute($this->moduleName, $this->routePrefix, 'edit', $this->getItemIdentifier($item)), 'endpointType' => $this->repository->getMorphClass(), ] + $columnsData + ($withImage && ! array_key_exists('thumbnail', $columnsData) ? [ 'thumbnail' => $columnsData['published']?'/theme/images/documents/documents-2.png':'/theme/images/documents/documents-1.png', ] : []); })->toArray();}
dedli
07/04/2022, 6:54 AMHarings Rob
07/04/2022, 7:03 AMHarings Rob
07/04/2022, 7:04 AMHarings Rob
07/04/2022, 7:05 AMgetFormFieldsForBrowser
in your module repositoryHarings Rob
07/04/2022, 7:05 AMHarings Rob
07/04/2022, 7:05 AMgetFormFieldsForRelatedBrowser