Skip to content

Commit 7f94395

Browse files
committed
adding $rec_name to make it auto show relationship
1 parent 9a7ee99 commit 7f94395

12 files changed

+106
-20
lines changed

Entities/BillingCycle.php

+9-2
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,13 @@ class BillingCycle extends BaseModel
1616
*/
1717
protected $fillable = ['title', 'slug', 'description', 'duration', 'duration_type', 'published'];
1818

19+
/**
20+
* The fields that are to be render when performing relationship queries.
21+
*
22+
* @var array<string>
23+
*/
24+
public $rec_names = ['title'];
25+
1926
/**
2027
* List of tables names that are need in this model during migration.
2128
*
@@ -52,7 +59,7 @@ public function listTable(): ListTable
5259

5360
/**
5461
* Function for defining list of fields in form view.
55-
*
62+
*
5663
* @return FormBuilder
5764
*/
5865
public function formBuilder(): FormBuilder
@@ -73,7 +80,7 @@ public function formBuilder(): FormBuilder
7380

7481
/**
7582
* Function for defining list of fields in filter view.
76-
*
83+
*
7784
* @return FormBuilder
7885
*/
7986
public function filter(): FormBuilder

Entities/Gateway.php

+9-2
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,13 @@ class Gateway extends BaseModel
1616
*/
1717
protected $fillable = ['title', 'username', 'password', 'database', 'ip_address', 'port', 'type', 'published'];
1818

19+
/**
20+
* The fields that are to be render when performing relationship queries.
21+
*
22+
* @var array<string>
23+
*/
24+
public $rec_names = ['title'];
25+
1926
/**
2027
* List of tables names that are need in this model during migration.
2128
*
@@ -54,7 +61,7 @@ public function listTable(): ListTable
5461

5562
/**
5663
* Function for defining list of fields in form view.
57-
*
64+
*
5865
* @return FormBuilder
5966
*/
6067
public function formBuilder(): FormBuilder
@@ -77,7 +84,7 @@ public function formBuilder(): FormBuilder
7784

7885
/**
7986
* Function for defining list of fields in filter view.
80-
*
87+
*
8188
* @return FormBuilder
8289
*/
8390
public function filter(): FormBuilder

Entities/MacAddress.php

+9-2
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,13 @@ class MacAddress extends BaseModel
1717
*/
1818
protected $fillable = ['subscriber_id', 'mac'];
1919

20+
/**
21+
* The fields that are to be render when performing relationship queries.
22+
*
23+
* @var array<string>
24+
*/
25+
public $rec_names = ['subscriber_id', 'mac'];
26+
2027
/**
2128
* List of tables names that are need in this model during migration.
2229
*
@@ -50,7 +57,7 @@ public function listTable(): ListTable
5057

5158
/**
5259
* Function for defining list of fields in form view.
53-
*
60+
*
5461
* @return FormBuilder
5562
*/
5663
public function formBuilder(): FormBuilder
@@ -67,7 +74,7 @@ public function formBuilder(): FormBuilder
6774

6875
/**
6976
* Function for defining list of fields in filter view.
70-
*
77+
*
7178
* @return FormBuilder
7279
*/
7380
public function filter(): FormBuilder

Entities/Package.php

+9-2
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,13 @@ class Package extends BaseModel
2121
'featured', 'default', 'is_unlimited', 'is_hidden', 'amount',
2222
];
2323

24+
/**
25+
* The fields that are to be render when performing relationship queries.
26+
*
27+
* @var array<string>
28+
*/
29+
public $rec_names = ['title'];
30+
2431
/**
2532
* List of tables names that are need in this model during migration.
2633
*
@@ -62,7 +69,7 @@ public function listTable(): ListTable
6269

6370
/**
6471
* Function for defining list of fields in form view.
65-
*
72+
*
6673
* @return FormBuilder
6774
*/
6875
public function formBuilder(): FormBuilder
@@ -88,7 +95,7 @@ public function formBuilder(): FormBuilder
8895

8996
/**
9097
* Function for defining list of fields in filter view.
91-
*
98+
*
9299
* @return FormBuilder
93100
*/
94101
public function filter(): FormBuilder

Entities/PackageCharge.php

+9-2
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,13 @@ class PackageCharge extends BaseModel
1717
*/
1818
protected $fillable = ['title', 'slug', 'description', 'package_id', 'ledger_id', 'price', 'quantity', 'published'];
1919

20+
/**
21+
* The fields that are to be render when performing relationship queries.
22+
*
23+
* @var array<string>
24+
*/
25+
public $rec_names = ['title'];
26+
2027
/**
2128
* List of tables names that are need in this model during migration.
2229
*
@@ -56,7 +63,7 @@ public function listTable(): ListTable
5663

5764
/**
5865
* Function for defining list of fields in form view.
59-
*
66+
*
6067
* @return FormBuilder
6168
*/
6269
public function formBuilder(): FormBuilder
@@ -79,7 +86,7 @@ public function formBuilder(): FormBuilder
7986

8087
/**
8188
* Function for defining list of fields in filter view.
82-
*
89+
*
8390
* @return FormBuilder
8491
*/
8592
public function filter(): FormBuilder

Entities/PackageChargeRate.php

+7
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,13 @@ class PackageChargeRate extends BaseModel
1515
*/
1616
protected $fillable = ['package_charge_id', 'rate_id', 'published'];
1717

18+
/**
19+
* The fields that are to be render when performing relationship queries.
20+
*
21+
* @var array<string>
22+
*/
23+
public $rec_names = ['package_charge_id', 'rate_id'];
24+
1825
/**
1926
* List of tables names that are need in this model during migration.
2027
*

Entities/Payment.php

+9-2
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,13 @@ class Payment extends BaseModel
1717
*/
1818
protected $fillable = ['title', 'subscription_id', 'invoice_id', 'description', 'is_paid', 'completed', 'successful'];
1919

20+
/**
21+
* The fields that are to be render when performing relationship queries.
22+
*
23+
* @var array<string>
24+
*/
25+
public $rec_names = ['title', 'subscription_id'];
26+
2027
/**
2128
* List of tables names that are need in this model during migration.
2229
*
@@ -54,7 +61,7 @@ public function listTable(): ListTable
5461

5562
/**
5663
* Function for defining list of fields in form view.
57-
*
64+
*
5865
* @return FormBuilder
5966
*/
6067
public function formBuilder(): FormBuilder
@@ -76,7 +83,7 @@ public function formBuilder(): FormBuilder
7683

7784
/**
7885
* Function for defining list of fields in filter view.
79-
*
86+
*
8087
* @return FormBuilder
8188
*/
8289
public function filter(): FormBuilder

Entities/PaymentCharge.php

+9-2
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,13 @@ class PaymentCharge extends BaseModel
1717
*/
1818
protected $fillable = ['title', 'slug', 'payment_id', 'ledger_id', 'price', 'quantity', 'published'];
1919

20+
/**
21+
* The fields that are to be render when performing relationship queries.
22+
*
23+
* @var array<string>
24+
*/
25+
public $rec_names = ['title'];
26+
2027
/**
2128
* List of tables names that are need in this model during migration.
2229
*
@@ -55,7 +62,7 @@ public function listTable(): ListTable
5562

5663
/**
5764
* Function for defining list of fields in form view.
58-
*
65+
*
5966
* @return FormBuilder
6067
*/
6168
public function formBuilder(): FormBuilder
@@ -78,7 +85,7 @@ public function formBuilder(): FormBuilder
7885

7986
/**
8087
* Function for defining list of fields in filter view.
81-
*
88+
*
8289
* @return FormBuilder
8390
*/
8491
public function filter(): FormBuilder

Entities/PaymentChargeRate.php

+9-2
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,13 @@ class PaymentChargeRate extends BaseModel
1717
*/
1818
protected $fillable = ['payment_charge_id', 'rate_id'];
1919

20+
/**
21+
* The fields that are to be render when performing relationship queries.
22+
*
23+
* @var array<string>
24+
*/
25+
public $rec_names = ['payment_charge_id', 'rate_id'];
26+
2027
/**
2128
* List of tables names that are need in this model during migration.
2229
*
@@ -50,7 +57,7 @@ public function listTable(): ListTable
5057

5158
/**
5259
* Function for defining list of fields in form view.
53-
*
60+
*
5461
* @return FormBuilder
5562
*/
5663
public function formBuilder(): FormBuilder
@@ -67,7 +74,7 @@ public function formBuilder(): FormBuilder
6774

6875
/**
6976
* Function for defining list of fields in filter view.
70-
*
77+
*
7178
* @return FormBuilder
7279
*/
7380
public function filter(): FormBuilder

Entities/Subscriber.php

+9
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,15 @@ class Subscriber extends BaseModel
1717
*/
1818
protected $fillable = ['username', 'password', 'had_trail', 'partner_id'];
1919

20+
21+
/**
22+
* The fields that are to be render when performing relationship queries.
23+
*
24+
* @var array<string>
25+
*/
26+
public $rec_names = ['username'];
27+
28+
2029
/**
2130
* List of tables names that are need in this model during migration.
2231
*

Entities/SubscriberLogin.php

+9-2
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,13 @@ class SubscriberLogin extends BaseModel
1717
*/
1818
protected $fillable = ['mac', 'ip', 'username', 'link_login', 'link_orig', 'error', 'chap_id', 'chap_challenge', 'link_login_id', 'link_orig_esc', 'mac_esc'];
1919

20+
/**
21+
* The fields that are to be render when performing relationship queries.
22+
*
23+
* @var array<string>
24+
*/
25+
public $rec_names = ['mac', 'username'];
26+
2027
/**
2128
* List of tables names that are need in this model during migration.
2229
*
@@ -56,7 +63,7 @@ public function listTable(): ListTable
5663

5764
/**
5865
* Function for defining list of fields in form view.
59-
*
66+
*
6067
* @return FormBuilder
6168
*/
6269
public function formBuilder(): FormBuilder
@@ -82,7 +89,7 @@ public function formBuilder(): FormBuilder
8289

8390
/**
8491
* Function for defining list of fields in filter view.
85-
*
92+
*
8693
* @return FormBuilder
8794
*/
8895
public function filter(): FormBuilder

Entities/Subscription.php

+9-2
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,13 @@ class Subscription extends BaseModel
1717
*/
1818
protected $fillable = ['subscriber_id', 'package_id', 'start_date', 'end_date'];
1919

20+
/**
21+
* The fields that are to be render when performing relationship queries.
22+
*
23+
* @var array<string>
24+
*/
25+
public $rec_names = ['subscriber_id', 'package_id'];
26+
2027
/**
2128
* List of tables names that are need in this model during migration.
2229
*
@@ -52,7 +59,7 @@ public function listTable(): ListTable
5259

5360
/**
5461
* Function for defining list of fields in form view.
55-
*
62+
*
5663
* @return FormBuilder
5764
*/
5865
public function formBuilder(): FormBuilder
@@ -71,7 +78,7 @@ public function formBuilder(): FormBuilder
7178

7279
/**
7380
* Function for defining list of fields in filter view.
74-
*
81+
*
7582
* @return FormBuilder
7683
*/
7784
public function filter(): FormBuilder

0 commit comments

Comments
 (0)