@@ -292,7 +292,7 @@ |
||
| 292 | 292 | if ($product) { |
| 293 | 293 | $productCurrency = $product->price()->where('currency', $currency)->first()->currency; |
| 294 | 294 | $currency = $this->currency->where('code', $productCurrency)->get()->toArray(); |
| 295 | - }else{ |
|
| 295 | + } else{ |
|
| 296 | 296 | $currency=[]; |
| 297 | 297 | } |
| 298 | 298 | return $currency; |
@@ -303,7 +303,7 @@ |
||
| 303 | 303 | $currency = $this->price->where('product_id', $product->id)->where('currency', $currency)->first()->currency; |
| 304 | 304 | |
| 305 | 305 | $subscription = $this->plan->where('id', $this->price->where('product_id', $product->id)->where('currency', $currency)->first()->subscription)->first()->name; |
| 306 | - }else{ |
|
| 306 | + } else{ |
|
| 307 | 307 | return redirect('/')->with('fails',\Lang::get('message.no-such-currency-in-system')); |
| 308 | 308 | } |
| 309 | 309 | |
@@ -405,7 +405,7 @@ discard block |
||
| 405 | 405 | //dd($repository); |
| 406 | 406 | $github_controller = new \App\Http\Controllers\Github\GithubController(); |
| 407 | 407 | return $github_controller->getReleaseByTag($owner, $repository); |
| 408 | - }elseif($file){ |
|
| 408 | + } elseif($file){ |
|
| 409 | 409 | $file = storage_path() . '/products/' . $file; |
| 410 | 410 | return \Response::download($file); |
| 411 | 411 | } |
@@ -427,10 +427,10 @@ discard block |
||
| 427 | 427 | $item = $invoice_item->where('invoice_id',$invoice->id)->first(); |
| 428 | 428 | $product_id= $this->product->where('name',$item->product_name)->first()->id; |
| 429 | 429 | $this->downloadProduct($product_id); |
| 430 | - }else{ |
|
| 430 | + } else{ |
|
| 431 | 431 | return redirect('auth/login')->with('fails',\Lang::get('activate-your-account')); |
| 432 | 432 | } |
| 433 | - }else{ |
|
| 433 | + } else{ |
|
| 434 | 434 | return redirect('auth/login')->with('fails',\Lang::get('please-purcahse-a-product')); |
| 435 | 435 | } |
| 436 | 436 | } catch (Exception $ex) { |
@@ -13,8 +13,9 @@ |
||
| 13 | 13 | |
| 14 | 14 | public function render($view, $breadcrumbs) |
| 15 | 15 | { |
| 16 | - if (!$view) |
|
| 17 | - throw new Exception('Breadcrumbs view not specified (check the view in config/breadcrumbs.php, and ensure DaveJamesMiller\Breadcrumbs\ServiceProvider is loaded before any dependants in config/app.php)'); |
|
| 16 | + if (!$view) { |
|
| 17 | + throw new Exception('Breadcrumbs view not specified (check the view in config/breadcrumbs.php, and ensure DaveJamesMiller\Breadcrumbs\ServiceProvider is loaded before any dependants in config/app.php)'); |
|
| 18 | + } |
|
| 18 | 19 | |
| 19 | 20 | return $this->factory->make($view, compact('breadcrumbs'))->render(); |
| 20 | 21 | } |
@@ -14,13 +14,15 @@ |
||
| 14 | 14 | |
| 15 | 15 | public function get() |
| 16 | 16 | { |
| 17 | - if ($this->route) |
|
| 18 | - return $this->route; |
|
| 17 | + if ($this->route) { |
|
| 18 | + return $this->route; |
|
| 19 | + } |
|
| 19 | 20 | |
| 20 | 21 | $route = $this->router->current(); |
| 21 | 22 | |
| 22 | - if (is_null($route)) |
|
| 23 | - return ['', []]; |
|
| 23 | + if (is_null($route)) { |
|
| 24 | + return ['', []]; |
|
| 25 | + } |
|
| 24 | 26 | |
| 25 | 27 | $name = $route->getName(); |
| 26 | 28 | |
@@ -16,8 +16,9 @@ |
||
| 16 | 16 | |
| 17 | 17 | protected function call($name, $params) |
| 18 | 18 | { |
| 19 | - if (!isset($this->callbacks[$name])) |
|
| 20 | - throw new Exception("Breadcrumb not found with name \"{$name}\""); |
|
| 19 | + if (!isset($this->callbacks[$name])) { |
|
| 20 | + throw new Exception("Breadcrumb not found with name \"{$name}\""); |
|
| 21 | + } |
|
| 21 | 22 | |
| 22 | 23 | array_unshift($params, $this); |
| 23 | 24 | |
@@ -37,10 +37,11 @@ discard block |
||
| 37 | 37 | |
| 38 | 38 | public function generate($name = null) |
| 39 | 39 | { |
| 40 | - if (is_null($name)) |
|
| 41 | - list($name, $params) = $this->currentRoute->get(); |
|
| 42 | - else |
|
| 43 | - $params = array_slice(func_get_args(), 1); |
|
| 40 | + if (is_null($name)) { |
|
| 41 | + list($name, $params) = $this->currentRoute->get(); |
|
| 42 | + } else { |
|
| 43 | + $params = array_slice(func_get_args(), 1); |
|
| 44 | + } |
|
| 44 | 45 | |
| 45 | 46 | return $this->generator->generate($this->callbacks, $name, $params); |
| 46 | 47 | } |
@@ -52,21 +53,24 @@ discard block |
||
| 52 | 53 | |
| 53 | 54 | public function generateIfExists($name = null) |
| 54 | 55 | { |
| 55 | - if (is_null($name)) |
|
| 56 | - list($name, $params) = $this->currentRoute->get(); |
|
| 57 | - else |
|
| 58 | - $params = array_slice(func_get_args(), 1); |
|
| 56 | + if (is_null($name)) { |
|
| 57 | + list($name, $params) = $this->currentRoute->get(); |
|
| 58 | + } else { |
|
| 59 | + $params = array_slice(func_get_args(), 1); |
|
| 60 | + } |
|
| 59 | 61 | |
| 60 | - if (!$this->exists($name)) |
|
| 61 | - return []; |
|
| 62 | + if (!$this->exists($name)) { |
|
| 63 | + return []; |
|
| 64 | + } |
|
| 62 | 65 | |
| 63 | 66 | return $this->generator->generate($this->callbacks, $name, $params); |
| 64 | 67 | } |
| 65 | 68 | |
| 66 | 69 | public function generateIfExistsArray($name, $params = []) |
| 67 | 70 | { |
| 68 | - if (!$this->exists($name)) |
|
| 69 | - return []; |
|
| 71 | + if (!$this->exists($name)) { |
|
| 72 | + return []; |
|
| 73 | + } |
|
| 70 | 74 | |
| 71 | 75 | return $this->generator->generate($this->callbacks, $name, $params); |
| 72 | 76 | } |
@@ -82,10 +86,11 @@ discard block |
||
| 82 | 86 | |
| 83 | 87 | public function render($name = null) |
| 84 | 88 | { |
| 85 | - if (is_null($name)) |
|
| 86 | - list($name, $params) = $this->currentRoute->get(); |
|
| 87 | - else |
|
| 88 | - $params = array_slice(func_get_args(), 1); |
|
| 89 | + if (is_null($name)) { |
|
| 90 | + list($name, $params) = $this->currentRoute->get(); |
|
| 91 | + } else { |
|
| 92 | + $params = array_slice(func_get_args(), 1); |
|
| 93 | + } |
|
| 89 | 94 | |
| 90 | 95 | $breadcrumbs = $this->generator->generate($this->callbacks, $name, $params); |
| 91 | 96 | |
@@ -101,13 +106,15 @@ discard block |
||
| 101 | 106 | |
| 102 | 107 | public function renderIfExists($name = null) |
| 103 | 108 | { |
| 104 | - if (is_null($name)) |
|
| 105 | - list($name, $params) = $this->currentRoute->get(); |
|
| 106 | - else |
|
| 107 | - $params = array_slice(func_get_args(), 1); |
|
| 109 | + if (is_null($name)) { |
|
| 110 | + list($name, $params) = $this->currentRoute->get(); |
|
| 111 | + } else { |
|
| 112 | + $params = array_slice(func_get_args(), 1); |
|
| 113 | + } |
|
| 108 | 114 | |
| 109 | - if (!$this->exists($name)) |
|
| 110 | - return ''; |
|
| 115 | + if (!$this->exists($name)) { |
|
| 116 | + return ''; |
|
| 117 | + } |
|
| 111 | 118 | |
| 112 | 119 | $breadcrumbs = $this->generator->generate($this->callbacks, $name, $params); |
| 113 | 120 | |
@@ -116,8 +123,9 @@ discard block |
||
| 116 | 123 | |
| 117 | 124 | public function renderIfExistsArray($name, $params = []) |
| 118 | 125 | { |
| 119 | - if (!$this->exists($name)) |
|
| 120 | - return ''; |
|
| 126 | + if (!$this->exists($name)) { |
|
| 127 | + return ''; |
|
| 128 | + } |
|
| 121 | 129 | |
| 122 | 130 | $breadcrumbs = $this->generator->generate($this->callbacks, $name, $params); |
| 123 | 131 | |
@@ -292,7 +292,7 @@ |
||
| 292 | 292 | if ($product) { |
| 293 | 293 | $productCurrency = $product->price()->where('currency', $currency)->first()->currency; |
| 294 | 294 | $currency = $this->currency->where('code', $productCurrency)->get()->toArray(); |
| 295 | - }else{ |
|
| 295 | + } else{ |
|
| 296 | 296 | $currency=[]; |
| 297 | 297 | } |
| 298 | 298 | return $currency; |