@fleetbase/storefront-engine 0.2.5 → 0.2.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (114) hide show
  1. package/addon/controllers/products/index/category/new.js +5 -9
  2. package/addon/models/product-addon-category.js +10 -1
  3. package/addon/models/product-variant.js +0 -2
  4. package/addon/models/product.js +35 -2
  5. package/addon/serializers/product.js +16 -0
  6. package/addon/templates/products/index/category/new.hbs +2 -2
  7. package/composer.json +3 -3
  8. package/extension.json +1 -1
  9. package/package.json +1 -1
  10. package/server/src/Auth/Schemas/Storefront.php +31 -39
  11. package/server/src/Console/Commands/NotifyStorefrontOrderNearby.php +9 -11
  12. package/server/src/Expansions/ContactFilterExpansion.php +1 -1
  13. package/server/src/Expansions/EntityExpansion.php +12 -12
  14. package/server/src/Expansions/OrderFilterExpansion.php +1 -1
  15. package/server/src/Expansions/VendorFilterExpansion.php +1 -1
  16. package/server/src/Http/Controllers/ActionController.php +9 -11
  17. package/server/src/Http/Controllers/AddonCategoryController.php +1 -1
  18. package/server/src/Http/Controllers/CustomerController.php +1 -1
  19. package/server/src/Http/Controllers/GatewayController.php +1 -1
  20. package/server/src/Http/Controllers/MetricsController.php +17 -17
  21. package/server/src/Http/Controllers/NetworkController.php +16 -26
  22. package/server/src/Http/Controllers/NotificationChannelController.php +1 -1
  23. package/server/src/Http/Controllers/OrderController.php +18 -22
  24. package/server/src/Http/Controllers/ProductAddonCategoryController.php +1 -2
  25. package/server/src/Http/Controllers/ProductAddonController.php +1 -2
  26. package/server/src/Http/Controllers/ProductController.php +89 -44
  27. package/server/src/Http/Controllers/ProductHourController.php +1 -1
  28. package/server/src/Http/Controllers/ProductVariantController.php +1 -1
  29. package/server/src/Http/Controllers/ProductVariantOptionController.php +1 -1
  30. package/server/src/Http/Controllers/ReviewController.php +1 -1
  31. package/server/src/Http/Controllers/StoreController.php +1 -2
  32. package/server/src/Http/Controllers/StoreHourController.php +1 -1
  33. package/server/src/Http/Controllers/StoreLocationController.php +1 -1
  34. package/server/src/Http/Controllers/StorefrontController.php +0 -2
  35. package/server/src/Http/Controllers/VoteController.php +1 -1
  36. package/server/src/Http/Controllers/v1/CartController.php +16 -26
  37. package/server/src/Http/Controllers/v1/CategoryController.php +3 -4
  38. package/server/src/Http/Controllers/v1/CheckoutController.php +283 -286
  39. package/server/src/Http/Controllers/v1/CustomerController.php +54 -67
  40. package/server/src/Http/Controllers/v1/GatewayControllerController.php +0 -2
  41. package/server/src/Http/Controllers/v1/NetworkController.php +26 -23
  42. package/server/src/Http/Controllers/v1/PaymentMethodController.php +0 -2
  43. package/server/src/Http/Controllers/v1/ProductController.php +1 -4
  44. package/server/src/Http/Controllers/v1/ReviewController.php +31 -35
  45. package/server/src/Http/Controllers/v1/ServiceQuoteController.php +57 -53
  46. package/server/src/Http/Controllers/v1/StoreController.php +8 -16
  47. package/server/src/Http/Filter/AddonCategoryFilter.php +1 -1
  48. package/server/src/Http/Filter/OrderFilter.php +2 -2
  49. package/server/src/Http/Middleware/SetStorefrontSession.php +9 -20
  50. package/server/src/Http/Requests/AddStoreToNetworkCategory.php +3 -3
  51. package/server/src/Http/Requests/CreateCustomerRequest.php +5 -7
  52. package/server/src/Http/Requests/CreateReviewRequest.php +4 -5
  53. package/server/src/Http/Requests/GetServiceQuoteFromCart.php +2 -2
  54. package/server/src/Http/Requests/InitializeCheckoutRequest.php +5 -5
  55. package/server/src/Http/Requests/NetworkActionRequest.php +2 -2
  56. package/server/src/Http/Requests/VerifyCreateCustomerRequest.php +2 -2
  57. package/server/src/Http/Resources/Cart.php +19 -18
  58. package/server/src/Http/Resources/Category.php +12 -11
  59. package/server/src/Http/Resources/Customer.php +15 -14
  60. package/server/src/Http/Resources/Gateway.php +12 -11
  61. package/server/src/Http/Resources/Media.php +9 -8
  62. package/server/src/Http/Resources/Network.php +32 -31
  63. package/server/src/Http/Resources/Product.php +88 -85
  64. package/server/src/Http/Resources/Review.php +14 -13
  65. package/server/src/Http/Resources/ReviewCustomer.php +12 -11
  66. package/server/src/Http/Resources/Store.php +38 -36
  67. package/server/src/Http/Resources/StoreHour.php +9 -8
  68. package/server/src/Http/Resources/StoreLocation.php +9 -8
  69. package/server/src/Imports/ProductsImport.php +0 -2
  70. package/server/src/Jobs/DownloadProductImageUrl.php +7 -4
  71. package/server/src/Listeners/HandleOrderCompleted.php +2 -1
  72. package/server/src/Listeners/HandleOrderDispatched.php +2 -1
  73. package/server/src/Listeners/HandleOrderDriverAssigned.php +2 -1
  74. package/server/src/Listeners/HandleOrderStarted.php +4 -3
  75. package/server/src/Mail/StorefrontNetworkInvite.php +7 -6
  76. package/server/src/Models/AddonCategory.php +2 -4
  77. package/server/src/Models/Cart.php +117 -124
  78. package/server/src/Models/Checkout.php +14 -12
  79. package/server/src/Models/Customer.php +9 -9
  80. package/server/src/Models/Gateway.php +22 -22
  81. package/server/src/Models/Network.php +41 -52
  82. package/server/src/Models/NetworkStore.php +6 -5
  83. package/server/src/Models/NotificationChannel.php +11 -9
  84. package/server/src/Models/PaymentMethod.php +9 -7
  85. package/server/src/Models/Product.php +152 -30
  86. package/server/src/Models/ProductAddon.php +14 -11
  87. package/server/src/Models/ProductAddonCategory.php +9 -8
  88. package/server/src/Models/ProductHour.php +6 -5
  89. package/server/src/Models/ProductStoreLocation.php +7 -5
  90. package/server/src/Models/ProductVariant.php +15 -11
  91. package/server/src/Models/ProductVariantOption.php +12 -9
  92. package/server/src/Models/Review.php +9 -7
  93. package/server/src/Models/Store.php +68 -84
  94. package/server/src/Models/StoreHour.php +6 -5
  95. package/server/src/Models/StoreLocation.php +12 -8
  96. package/server/src/Models/StorefrontModel.php +1 -1
  97. package/server/src/Models/Vote.php +8 -6
  98. package/server/src/Notifications/StorefrontOrderCanceled.php +15 -19
  99. package/server/src/Notifications/StorefrontOrderCompleted.php +15 -19
  100. package/server/src/Notifications/StorefrontOrderCreated.php +31 -36
  101. package/server/src/Notifications/StorefrontOrderDriverAssigned.php +15 -20
  102. package/server/src/Notifications/StorefrontOrderEnroute.php +14 -19
  103. package/server/src/Notifications/StorefrontOrderNearby.php +16 -21
  104. package/server/src/Notifications/StorefrontOrderPreparing.php +15 -18
  105. package/server/src/Notifications/StorefrontOrderReadyForPickup.php +15 -18
  106. package/server/src/Observers/NetworkObserver.php +2 -3
  107. package/server/src/Observers/ProductObserver.php +17 -33
  108. package/server/src/Providers/EventServiceProvider.php +15 -4
  109. package/server/src/Providers/StorefrontServiceProvider.php +8 -10
  110. package/server/src/Support/Metrics.php +12 -12
  111. package/server/src/Support/OrderConfig.php +3 -2
  112. package/server/src/Support/QPay.php +22 -20
  113. package/server/src/Support/Storefront.php +18 -17
  114. package/server/src/routes.php +1 -1
@@ -10,21 +10,22 @@ class Review extends FleetbaseResource
10
10
  /**
11
11
  * Transform the resource into an array.
12
12
  *
13
- * @param \Illuminate\Http\Request $request
13
+ * @param \Illuminate\Http\Request $request
14
+ *
14
15
  * @return array
15
16
  */
16
17
  public function toArray($request)
17
18
  {
18
19
  return [
19
- 'id' => $this->when(Http::isInternalRequest(), $this->id, $this->public_id),
20
- 'uuid' => $this->when(Http::isInternalRequest(), $this->uuid),
21
- 'public_id' => $this->when(Http::isInternalRequest(), $this->public_id),
20
+ 'id' => $this->when(Http::isInternalRequest(), $this->id, $this->public_id),
21
+ 'uuid' => $this->when(Http::isInternalRequest(), $this->uuid),
22
+ 'public_id' => $this->when(Http::isInternalRequest(), $this->public_id),
22
23
  'subject_id' => $this->subject->id,
23
- 'rating' => $this->rating,
24
- 'content' => $this->content,
25
- 'customer' => new ReviewCustomer($this->customer),
26
- 'slug' => $this->slug,
27
- 'photos' => $this->mapPhotos($this->photos),
24
+ 'rating' => $this->rating,
25
+ 'content' => $this->content,
26
+ 'customer' => new ReviewCustomer($this->customer),
27
+ 'slug' => $this->slug,
28
+ 'photos' => $this->mapPhotos($this->photos),
28
29
  'created_at' => $this->created_at,
29
30
  'updated_at' => $this->updated_at,
30
31
  ];
@@ -34,11 +35,11 @@ class Review extends FleetbaseResource
34
35
  {
35
36
  return collect($photos)->map(function ($photo) {
36
37
  return [
37
- 'id' => $photo->public_id,
38
+ 'id' => $photo->public_id,
38
39
  'filename' => $photo->original_filename,
39
- 'type' => $photo->content_type,
40
- 'caption' => $photo->caption,
41
- 'url' => $photo->url
40
+ 'type' => $photo->content_type,
41
+ 'caption' => $photo->caption,
42
+ 'url' => $photo->url,
42
43
  ];
43
44
  });
44
45
  }
@@ -11,24 +11,25 @@ class ReviewCustomer extends FleetbaseResource
11
11
  /**
12
12
  * Transform the resource into an array.
13
13
  *
14
- * @param \Illuminate\Http\Request $request
14
+ * @param \Illuminate\Http\Request $request
15
+ *
15
16
  * @return array
16
17
  */
17
18
  public function toArray($request)
18
19
  {
19
20
  return [
20
- 'id' => $this->when(Http::isInternalRequest(), $this->id, Str::replaceFirst('contact', 'customer', $this->public_id)),
21
- 'uuid' => $this->when(Http::isInternalRequest(), $this->uuid),
22
- 'public_id' => $this->when(Http::isInternalRequest(), $this->public_id),
23
- 'name' => $this->name,
24
- 'email' => $this->email,
25
- 'phone' => $this->phone,
26
- 'photo_url' => $this->photo_url,
21
+ 'id' => $this->when(Http::isInternalRequest(), $this->id, Str::replaceFirst('contact', 'customer', $this->public_id)),
22
+ 'uuid' => $this->when(Http::isInternalRequest(), $this->uuid),
23
+ 'public_id' => $this->when(Http::isInternalRequest(), $this->public_id),
24
+ 'name' => $this->name,
25
+ 'email' => $this->email,
26
+ 'phone' => $this->phone,
27
+ 'photo_url' => $this->photo_url,
27
28
  'reviews_count' => $this->getReviewsCount(),
28
29
  'uploads_count' => $this->getUploadsCount(),
29
- 'slug' => $this->slug,
30
- 'created_at' => $this->created_at,
31
- 'updated_at' => $this->updated_at,
30
+ 'slug' => $this->slug,
31
+ 'created_at' => $this->created_at,
32
+ 'updated_at' => $this->updated_at,
32
33
  ];
33
34
  }
34
35
 
@@ -10,53 +10,55 @@ class Store extends FleetbaseResource
10
10
  /**
11
11
  * Transform the resource into an array.
12
12
  *
13
- * @param \Illuminate\Http\Request $request
13
+ * @param \Illuminate\Http\Request $request
14
+ *
14
15
  * @return array
15
16
  */
16
17
  public function toArray($request)
17
18
  {
18
19
  return [
19
- 'id' => $this->when(Http::isInternalRequest(), $this->id, $this->public_id),
20
- 'uuid' => $this->when(Http::isInternalRequest(), $this->uuid),
21
- 'public_id' => $this->when(Http::isInternalRequest(), $this->public_id),
22
- 'key' => $this->when(Http::isInternalRequest(), $this->key),
23
- 'company_uuid' => $this->when(Http::isInternalRequest(), $this->company_uuid),
20
+ 'id' => $this->when(Http::isInternalRequest(), $this->id, $this->public_id),
21
+ 'uuid' => $this->when(Http::isInternalRequest(), $this->uuid),
22
+ 'public_id' => $this->when(Http::isInternalRequest(), $this->public_id),
23
+ 'key' => $this->when(Http::isInternalRequest(), $this->key),
24
+ 'company_uuid' => $this->when(Http::isInternalRequest(), $this->company_uuid),
24
25
  'created_by_uuid' => $this->when(Http::isInternalRequest(), $this->created_by_uuid),
25
- 'logo_uuid' => $this->when(Http::isInternalRequest(), $this->logo_uuid),
26
- 'backdrop_uuid' => $this->when(Http::isInternalRequest(), $this->backdrop_uuid),
27
- 'name' => $this->name,
28
- 'description' => $this->description,
29
- 'translations' => $this->translations ?? [],
30
- 'website' => $this->website,
31
- 'facebook' => $this->facebook,
32
- 'instagram' => $this->instagram,
33
- 'twitter' => $this->twitter,
34
- 'email' => $this->email,
35
- 'phone' => $this->phone,
36
- 'tags' => $this->tags ?? [],
37
- 'currency' => $this->currency ?? 'USD',
38
- 'options' => $this->formatOptions($this->options),
39
- 'logo_url' => $this->logo_url,
40
- 'backdrop_url' => $this->backdrop_url,
41
- 'rating' => $this->rating,
42
- 'online' => $this->online,
43
- 'is_network' => false,
44
- 'is_store' => true,
45
- 'category' => $this->when($request->filled('network') && $request->has('with_category'), new Category($this->getNetworkCategoryUsingId($request->input('network')))),
46
- 'networks' => $this->when($request->boolean('with_networks') || $request->inArray('with', 'networks'), Network::collection($this->networks)),
47
- 'locations' => $this->when($request->boolean('with_locations'), $this->locations->mapInto(StoreLocation::class)),
48
- 'media' => $this->when($request->boolean('with_media'), Media::collection($this->media)),
49
- 'slug' => $this->slug,
50
- 'created_at' => $this->created_at,
51
- 'updated_at' => $this->updated_at,
26
+ 'logo_uuid' => $this->when(Http::isInternalRequest(), $this->logo_uuid),
27
+ 'backdrop_uuid' => $this->when(Http::isInternalRequest(), $this->backdrop_uuid),
28
+ 'name' => $this->name,
29
+ 'description' => $this->description,
30
+ 'translations' => $this->translations ?? [],
31
+ 'website' => $this->website,
32
+ 'facebook' => $this->facebook,
33
+ 'instagram' => $this->instagram,
34
+ 'twitter' => $this->twitter,
35
+ 'email' => $this->email,
36
+ 'phone' => $this->phone,
37
+ 'tags' => $this->tags ?? [],
38
+ 'currency' => $this->currency ?? 'USD',
39
+ 'options' => $this->formatOptions($this->options),
40
+ 'logo_url' => $this->logo_url,
41
+ 'backdrop_url' => $this->backdrop_url,
42
+ 'rating' => $this->rating,
43
+ 'online' => $this->online,
44
+ 'is_network' => false,
45
+ 'is_store' => true,
46
+ 'category' => $this->when($request->filled('network') && $request->has('with_category'), new Category($this->getNetworkCategoryUsingId($request->input('network')))),
47
+ 'networks' => $this->when($request->boolean('with_networks') || $request->inArray('with', 'networks'), Network::collection($this->networks)),
48
+ 'locations' => $this->when($request->boolean('with_locations'), $this->locations->mapInto(StoreLocation::class)),
49
+ 'media' => $this->when($request->boolean('with_media'), Media::collection($this->media)),
50
+ 'slug' => $this->slug,
51
+ 'created_at' => $this->created_at,
52
+ 'updated_at' => $this->updated_at,
52
53
  ];
53
54
  }
54
55
 
55
56
  /**
56
57
  * Format the given options array by removing excluded keys.
57
58
  *
58
- * @param mixed $options The options array to format.
59
- * @return array The formatted options array.
59
+ * @param mixed $options the options array to format
60
+ *
61
+ * @return array the formatted options array
60
62
  */
61
63
  public function formatOptions($options = []): array
62
64
  {
@@ -65,7 +67,7 @@ class Store extends FleetbaseResource
65
67
  }
66
68
 
67
69
  $formattedOptions = [];
68
- $exclude = ['alerted_for_new_order'];
70
+ $exclude = ['alerted_for_new_order'];
69
71
 
70
72
  foreach ($options as $key => $value) {
71
73
  if (in_array($key, $exclude)) {
@@ -10,20 +10,21 @@ class StoreHour extends FleetbaseResource
10
10
  /**
11
11
  * Transform the resource into an array.
12
12
  *
13
- * @param \Illuminate\Http\Request $request
13
+ * @param \Illuminate\Http\Request $request
14
+ *
14
15
  * @return array
15
16
  */
16
17
  public function toArray($request)
17
18
  {
18
19
  return [
19
- 'id' => $this->when(Http::isInternalRequest(), $this->id, $this->public_id),
20
- 'uuid' => $this->when(Http::isInternalRequest(), $this->uuid),
20
+ 'id' => $this->when(Http::isInternalRequest(), $this->id, $this->public_id),
21
+ 'uuid' => $this->when(Http::isInternalRequest(), $this->uuid),
21
22
  'day_of_week' => $this->when(Http::isInternalRequest(), $this->day_of_week),
22
- 'day' => $this->day_of_week,
23
- 'start' => $this->start,
24
- 'end' => $this->end,
25
- 'created_at' => $this->when(Http::isInternalRequest(), $this->created_at),
26
- 'updated_at' => $this->when(Http::isInternalRequest(), $this->updated_at),
23
+ 'day' => $this->day_of_week,
24
+ 'start' => $this->start,
25
+ 'end' => $this->end,
26
+ 'created_at' => $this->when(Http::isInternalRequest(), $this->created_at),
27
+ 'updated_at' => $this->when(Http::isInternalRequest(), $this->updated_at),
27
28
  ];
28
29
  }
29
30
  }
@@ -11,20 +11,21 @@ class StoreLocation extends FleetbaseResource
11
11
  /**
12
12
  * Transform the resource into an array.
13
13
  *
14
- * @param \Illuminate\Http\Request $request
14
+ * @param \Illuminate\Http\Request $request
15
+ *
15
16
  * @return array
16
17
  */
17
18
  public function toArray($request)
18
19
  {
19
20
  return [
20
- 'id' => $this->when(Http::isInternalRequest(), $this->id, $this->public_id),
21
- 'uuid' => $this->when(Http::isInternalRequest(), $this->uuid),
22
- 'public_id' => $this->when(Http::isInternalRequest(), $this->public_id),
23
- 'store' => data_get($this, 'store.public_id'),
21
+ 'id' => $this->when(Http::isInternalRequest(), $this->id, $this->public_id),
22
+ 'uuid' => $this->when(Http::isInternalRequest(), $this->uuid),
23
+ 'public_id' => $this->when(Http::isInternalRequest(), $this->public_id),
24
+ 'store' => data_get($this, 'store.public_id'),
24
25
  'store_data' => $this->when($request->boolean('with_store'), new Store($this->store)),
25
- 'name' => $this->name,
26
- 'place' => $this->place ? new Place($this->place) : null,
27
- 'hours' => StoreHour::collection($this->hours),
26
+ 'name' => $this->name,
27
+ 'place' => $this->place ? new Place($this->place) : null,
28
+ 'hours' => StoreHour::collection($this->hours),
28
29
  'created_at' => $this->created_at,
29
30
  'updated_at' => $this->updated_at,
30
31
  ];
@@ -9,8 +9,6 @@ use Maatwebsite\Excel\Concerns\WithHeadingRow;
9
9
  class ProductsImport implements ToCollection, WithHeadingRow
10
10
  {
11
11
  /**
12
- * @param array $row
13
- *
14
12
  * @return \Illuminate\Support\Collection
15
13
  */
16
14
  public function collection(Collection $rows)
@@ -2,9 +2,9 @@
2
2
 
3
3
  namespace Fleetbase\Storefront\Jobs;
4
4
 
5
- use Fleetbase\Storefront\Models\Product;
6
- use Fleetbase\Models\File;
7
5
  use Fleetbase\FleetOps\Support\Utils;
6
+ use Fleetbase\Models\File;
7
+ use Fleetbase\Storefront\Models\Product;
8
8
  use Illuminate\Bus\Queueable;
9
9
  use Illuminate\Contracts\Queue\ShouldQueue;
10
10
  use Illuminate\Foundation\Bus\Dispatchable;
@@ -13,7 +13,10 @@ use Illuminate\Queue\SerializesModels;
13
13
 
14
14
  class DownloadProductImageUrl implements ShouldQueue
15
15
  {
16
- use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
16
+ use Dispatchable;
17
+ use InteractsWithQueue;
18
+ use Queueable;
19
+ use SerializesModels;
17
20
 
18
21
  /**
19
22
  * The uuid of the product.
@@ -37,7 +40,7 @@ class DownloadProductImageUrl implements ShouldQueue
37
40
  public function __construct(Product $product, string $url)
38
41
  {
39
42
  $this->product = $product->uuid;
40
- $this->url = $url;
43
+ $this->url = $url;
41
44
  }
42
45
 
43
46
  /**
@@ -14,7 +14,8 @@ class HandleOrderCompleted implements ShouldQueue
14
14
  /**
15
15
  * Handle the event.
16
16
  *
17
- * @param object $event
17
+ * @param object $event
18
+ *
18
19
  * @return void
19
20
  */
20
21
  public function handle(OrderCompleted $event)
@@ -14,7 +14,8 @@ class HandleOrderDispatched implements ShouldQueue
14
14
  /**
15
15
  * Handle the event.
16
16
  *
17
- * @param object $event
17
+ * @param object $event
18
+ *
18
19
  * @return void
19
20
  */
20
21
  public function handle(OrderDispatched $event)
@@ -15,7 +15,8 @@ class HandleOrderDriverAssigned implements ShouldQueue
15
15
  /**
16
16
  * Handle the event.
17
17
  *
18
- * @param object $event
18
+ * @param object $event
19
+ *
19
20
  * @return void
20
21
  */
21
22
  public function handle(OrderDriverAssigned $event)
@@ -10,7 +10,8 @@ class HandleOrderStarted
10
10
  /**
11
11
  * Handle the event.
12
12
  *
13
- * @param object $event
13
+ * @param object $event
14
+ *
14
15
  * @return void
15
16
  */
16
17
  public function handle(OrderStarted $event)
@@ -18,8 +19,8 @@ class HandleOrderStarted
18
19
  /** @var \Fleetbase\FleetOps\Models\Order $order */
19
20
  $order = $event->getModelRecord();
20
21
 
21
- // if storefront order / notify customer driver has started and is en-route
22
- if ($order->hasMeta('storefront_id')) {
22
+ // if storefront order / notify customer driver has started and is en-route
23
+ if ($order->hasMeta('storefront_id')) {
23
24
  $order->load(['customer']);
24
25
  $order->customer->notify(new StorefrontOrderEnroute($order));
25
26
  }
@@ -2,17 +2,18 @@
2
2
 
3
3
  namespace Fleetbase\Storefront\Mail;
4
4
 
5
- use Fleetbase\Storefront\Models\Network;
5
+ use Fleetbase\FleetOps\Support\Utils;
6
6
  use Fleetbase\Models\Invite;
7
7
  use Fleetbase\Models\User;
8
- use Fleetbase\FleetOps\Support\Utils;
8
+ use Fleetbase\Storefront\Models\Network;
9
9
  use Illuminate\Bus\Queueable;
10
10
  use Illuminate\Mail\Mailable;
11
11
  use Illuminate\Queue\SerializesModels;
12
12
 
13
13
  class StorefrontNetworkInvite extends Mailable
14
14
  {
15
- use Queueable, SerializesModels;
15
+ use Queueable;
16
+ use SerializesModels;
16
17
 
17
18
  public Invite $invite;
18
19
  public Network $network;
@@ -26,10 +27,10 @@ class StorefrontNetworkInvite extends Mailable
26
27
  */
27
28
  public function __construct(Invite $invite)
28
29
  {
29
- $this->invite = $invite;
30
+ $this->invite = $invite;
30
31
  $this->network = $this->invite->subject;
31
- $this->sender = $this->invite->createdBy;
32
- $this->url = Utils::consoleUrl('join/network/' . $this->invite->uri);
32
+ $this->sender = $this->invite->createdBy;
33
+ $this->url = Utils::consoleUrl('join/network/' . $this->invite->uri);
33
34
  }
34
35
 
35
36
  /**
@@ -7,16 +7,14 @@ use Fleetbase\Models\Category;
7
7
  class AddonCategory extends Category
8
8
  {
9
9
  /**
10
- * Relationships to auto load with driver
10
+ * Relationships to auto load with driver.
11
11
  *
12
12
  * @var array
13
13
  */
14
14
  protected $with = ['addons'];
15
15
 
16
16
  /**
17
- * The key to use in the payload responses
18
- *
19
- * @var string
17
+ * The key to use in the payload responses.
20
18
  */
21
19
  protected string $payloadKey = 'addon_category';
22
20