@@ -52,8 +52,8 @@ discard block |
||
52 | 52 | protected function mapWebRoutes() |
53 | 53 | { |
54 | 54 | Route::middleware('web') |
55 | - ->namespace($this->namespace) |
|
56 | - ->group(base_path('routes/web.php')); |
|
55 | + ->namespace($this->namespace) |
|
56 | + ->group(base_path('routes/web.php')); |
|
57 | 57 | } |
58 | 58 | |
59 | 59 | /** |
@@ -66,8 +66,8 @@ discard block |
||
66 | 66 | protected function mapApiRoutes() |
67 | 67 | { |
68 | 68 | Route::prefix('api') |
69 | - ->middleware('api') |
|
70 | - ->namespace($this->namespace) |
|
71 | - ->group(base_path('routes/api.php')); |
|
69 | + ->middleware('api') |
|
70 | + ->namespace($this->namespace) |
|
71 | + ->group(base_path('routes/api.php')); |
|
72 | 72 | } |
73 | 73 | } |
@@ -123,8 +123,7 @@ |
||
123 | 123 | ->addresses() |
124 | 124 | ->whereId($id) |
125 | 125 | ->firstOrFail(); |
126 | - } |
|
127 | - catch (ModelNotFoundException $e) |
|
126 | + } catch (ModelNotFoundException $e) |
|
128 | 127 | { |
129 | 128 | throw new AddressNotFoundException('Address not found.'); |
130 | 129 | } |
@@ -112,13 +112,13 @@ |
||
112 | 112 | { |
113 | 113 | // get plural from model name |
114 | 114 | $pluralModel = str_plural($this->model); |
115 | - // create container folder |
|
115 | + // create container folder |
|
116 | 116 | $this->filesystem->makeDirectory(app_path($baseFolder."/{$pluralModel}")); |
117 | - // add requests folder |
|
117 | + // add requests folder |
|
118 | 118 | $this->filesystem->makeDirectory(app_path($baseFolder."/{$pluralModel}/Requests")); |
119 | - // add repositories folder |
|
119 | + // add repositories folder |
|
120 | 120 | $this->filesystem->makeDirectory(app_path($baseFolder."/{$pluralModel}/Repositories/")); |
121 | - // add Interfaces folder |
|
121 | + // add Interfaces folder |
|
122 | 122 | $this->filesystem->makeDirectory(app_path($baseFolder."/{$pluralModel}/Repositories/Interfaces")); |
123 | 123 | } |
124 | 124 | } |
@@ -50,10 +50,11 @@ |
||
50 | 50 | $paths = request()->segments(); |
51 | 51 | if (count($paths) > 1) { |
52 | 52 | foreach ($paths as $key => $pah) { |
53 | - if ($key == 1) |
|
54 | - $breadcumb[] = ["name" => ucfirst($pah), "url" => request()->getBaseUrl() . "/" . $paths[0] . "/" . $paths[$key], 'icon' => config("module.admin." . $pah . ".icon")]; |
|
55 | - elseif ($key == 2) |
|
56 | - $breadcumb[] = ["name" => ucfirst($pah), "url" => request()->getBaseUrl() . "/" . $paths[0] . "/" . $paths[1] . "/" . $paths[$key], 'icon' => config("module.admin." . $pah . ".icon")]; |
|
53 | + if ($key == 1) { |
|
54 | + $breadcumb[] = ["name" => ucfirst($pah), "url" => request()->getBaseUrl() . "/" . $paths[0] . "/" . $paths[$key], 'icon' => config("module.admin." . $pah . ".icon")]; |
|
55 | + } elseif ($key == 2) { |
|
56 | + $breadcumb[] = ["name" => ucfirst($pah), "url" => request()->getBaseUrl() . "/" . $paths[0] . "/" . $paths[1] . "/" . $paths[$key], 'icon' => config("module.admin." . $pah . ".icon")]; |
|
57 | + } |
|
57 | 58 | } |
58 | 59 | } |
59 | 60 | $view->with( |
@@ -148,8 +148,7 @@ |
||
148 | 148 | if ($address->orders()->exists()) { |
149 | 149 | $address->status=0; |
150 | 150 | $address->save(); |
151 | - } |
|
152 | - else { |
|
151 | + } else { |
|
153 | 152 | $address->delete(); |
154 | 153 | } |
155 | 154 |
@@ -141,13 +141,13 @@ |
||
141 | 141 | { |
142 | 142 | $address = $this->addressRepo->findCustomerAddressById($addressId, auth()->user()); |
143 | 143 | |
144 | - if ($address->orders()->exists()) { |
|
145 | - $address->status=0; |
|
146 | - $address->save(); |
|
147 | - } |
|
148 | - else { |
|
149 | - $address->delete(); |
|
150 | - } |
|
144 | + if ($address->orders()->exists()) { |
|
145 | + $address->status=0; |
|
146 | + $address->save(); |
|
147 | + } |
|
148 | + else { |
|
149 | + $address->delete(); |
|
150 | + } |
|
151 | 151 | |
152 | 152 | return redirect()->route('accounts', ['tab' => 'address']) |
153 | 153 | ->with('message', 'Address delete successful'); |