Skip to content

Commit

Permalink
change relationship to an array from string
Browse files Browse the repository at this point in the history
  • Loading branch information
dedanirungu committed Aug 12, 2023
1 parent cbf89d5 commit 5ccbbf5
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
6 changes: 3 additions & 3 deletions Entities/Partner.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public function listTable(): ListTable
// listing view fields
$fields = new ListTable();

$fields->name('user_id')->type('recordpicker')->table('users')->ordering(true);
$fields->name('user_id')->type('recordpicker')->table([ 'users'])->ordering(true);

return $fields;

Expand All @@ -71,7 +71,7 @@ public function formBuilder(): FormBuilder
// listing view fields
$fields = new FormBuilder();

$fields->name('user_id')->type('recordpicker')->table('users')->group('w-1/2');
$fields->name('user_id')->type('recordpicker')->table([ 'users'])->group('w-1/2');

return $fields;

Expand All @@ -88,7 +88,7 @@ public function filter(): FormBuilder
// listing view fields
$fields = new FormBuilder();

$fields->name('user_id')->type('recordpicker')->table('users')->group('w-1/6');
$fields->name('user_id')->type('recordpicker')->table([ 'users'])->group('w-1/6');

return $fields;

Expand Down
6 changes: 3 additions & 3 deletions Entities/Slug.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public function listTable(): ListTable
// listing view fields
$fields = new ListTable();

$fields->name('partner_id')->type('recordpicker')->table('partner')->ordering(true);
$fields->name('partner_id')->type('recordpicker')->table(['partner'])->ordering(true);
$fields->name('slug')->type('text')->ordering(true);

return $fields;
Expand All @@ -65,7 +65,7 @@ public function formBuilder(): FormBuilder
// listing view fields
$fields = new FormBuilder();

$fields->name('partner_id')->type('recordpicker')->table('partner')->group('w-1/2');
$fields->name('partner_id')->type('recordpicker')->table(['partner'])->group('w-1/2');
$fields->name('slug')->type('text')->group('w-1/2');

return $fields;
Expand All @@ -82,7 +82,7 @@ public function filter(): FormBuilder
// listing view fields
$fields = new FormBuilder();

$fields->name('partner_id')->type('recordpicker')->table('partner')->group('w-1/6');
$fields->name('partner_id')->type('recordpicker')->table(['partner'])->group('w-1/6');
$fields->name('slug')->type('text')->group('w-1/6');

return $fields;
Expand Down
12 changes: 6 additions & 6 deletions Entities/TypeRelation.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ public function listTable(): ListTable
// listing view fields
$fields = new ListTable();

$fields->name('partner_id')->type('recordpicker')->table('partner')->ordering(true);
$fields->name('partner_types_id')->type('recordpicker')->table('partner_types')->ordering(true);
$fields->name('partner_id')->type('recordpicker')->table(['partner'])->ordering(true);
$fields->name('partner_types_id')->type('recordpicker')->table(['partner', 'types'])->ordering(true);

return $fields;

Expand All @@ -64,8 +64,8 @@ public function formBuilder(): FormBuilder
// listing view fields
$fields = new FormBuilder();

$fields->name('partner_id')->type('recordpicker')->table('partner')->group('w-1/2');
$fields->name('partner_types_id')->type('recordpicker')->table('partner_types')->group('w-1/2');
$fields->name('partner_id')->type('recordpicker')->table(['partner'])->group('w-1/2');
$fields->name('partner_types_id')->type('recordpicker')->table(['partner', 'types'])->group('w-1/2');

return $fields;

Expand All @@ -81,8 +81,8 @@ public function filter(): FormBuilder
// listing view fields
$fields = new FormBuilder();

$fields->name('partner_id')->type('recordpicker')->table('partner')->group('w-1/6');
$fields->name('partner_types_id')->type('recordpicker')->table('partner_types')->group('w-1/6');
$fields->name('partner_id')->type('recordpicker')->table(['partner'])->group('w-1/6');
$fields->name('partner_types_id')->type('recordpicker')->table(['partner', 'types'])->group('w-1/6');

return $fields;

Expand Down

0 comments on commit 5ccbbf5

Please sign in to comment.