@@ -9,7 +9,7 @@ |
||
9 | 9 | protected $table = 'products'; |
10 | 10 | protected $fillable = ['name', 'description', 'type', 'group', 'file', 'image', 'require_domain', 'category', |
11 | 11 | 'stock_control', 'stock_qty', 'sort_order', 'tax_apply', 'retired', 'hidden', 'multiple_qty', 'auto_terminate', |
12 | - 'setup_order_placed', 'setup_first_payment', 'setup_accept_manually', 'no_auto_setup', 'shoping_cart_link', 'process_url', 'github_owner','github_repository']; |
|
12 | + 'setup_order_placed', 'setup_first_payment', 'setup_accept_manually', 'no_auto_setup', 'shoping_cart_link', 'process_url', 'github_owner', 'github_repository']; |
|
13 | 13 | |
14 | 14 | public function relation() |
15 | 15 | { |
@@ -6,6 +6,6 @@ |
||
6 | 6 | |
7 | 7 | class Github extends Model |
8 | 8 | { |
9 | - protected $table='githubs'; |
|
10 | - protected $fillable = ['client_id','client_secret','username','password']; |
|
9 | + protected $table = 'githubs'; |
|
10 | + protected $fillable = ['client_id', 'client_secret', 'username', 'password']; |
|
11 | 11 | } |
@@ -17,7 +17,7 @@ discard block |
||
17 | 17 | * Front end |
18 | 18 | */ |
19 | 19 | |
20 | -Route::match(['get','post'],'home', 'Front\CartController@ProductList'); |
|
20 | +Route::match(['get', 'post'], 'home', 'Front\CartController@ProductList'); |
|
21 | 21 | Route::get('pricing', 'Front\CartController@Cart'); |
22 | 22 | Route::get('cart/remove', 'Front\CartController@CartRemove'); |
23 | 23 | Route::get('cart/reduseqty', 'Front\CartController@ReduseQty'); |
@@ -214,15 +214,15 @@ discard block |
||
214 | 214 | /* |
215 | 215 | * github |
216 | 216 | */ |
217 | -Route::get('github-auth','Github\GithubController@authenticate'); |
|
218 | -Route::get('github-auth-app','Github\GithubController@authForSpecificApp'); |
|
219 | -Route::get('github-releases','Github\GithubController@listRepositories'); |
|
220 | -Route::get('github-one-release','Github\GithubController@getReleaseByTag'); |
|
221 | -Route::get('github-downloads','Github\GithubController@getDownloadCount'); |
|
222 | -Route::get('github','Github\GithubController@getSettings'); |
|
223 | -Route::patch('github','Github\GithubController@postSettings'); |
|
217 | +Route::get('github-auth', 'Github\GithubController@authenticate'); |
|
218 | +Route::get('github-auth-app', 'Github\GithubController@authForSpecificApp'); |
|
219 | +Route::get('github-releases', 'Github\GithubController@listRepositories'); |
|
220 | +Route::get('github-one-release', 'Github\GithubController@getReleaseByTag'); |
|
221 | +Route::get('github-downloads', 'Github\GithubController@getDownloadCount'); |
|
222 | +Route::get('github', 'Github\GithubController@getSettings'); |
|
223 | +Route::patch('github', 'Github\GithubController@postSettings'); |
|
224 | 224 | |
225 | 225 | /** |
226 | 226 | * download |
227 | 227 | */ |
228 | -Route::get('download/{userid}/{invoice_number}','Product\ProductController@userDownload'); |
|
228 | +Route::get('download/{userid}/{invoice_number}', 'Product\ProductController@userDownload'); |
@@ -68,10 +68,10 @@ discard block |
||
68 | 68 | } |
69 | 69 | |
70 | 70 | $cartCollection = Cart::getContent(); |
71 | - foreach($cartCollection as $item){ |
|
72 | - $attributes[]=$item->attributes; |
|
71 | + foreach ($cartCollection as $item) { |
|
72 | + $attributes[] = $item->attributes; |
|
73 | 73 | } |
74 | - return view('themes.default1.front.cart', compact('cartCollection','attributes')); |
|
74 | + return view('themes.default1.front.cart', compact('cartCollection', 'attributes')); |
|
75 | 75 | } catch (\Exception $ex) { |
76 | 76 | dd($ex); |
77 | 77 | |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | } |
80 | 80 | } |
81 | 81 | |
82 | - public function CheckTax($isTaxApply,$id) { |
|
82 | + public function CheckTax($isTaxApply, $id) { |
|
83 | 83 | try { |
84 | 84 | $rate1 = 0; |
85 | 85 | $rate2 = 0; |
@@ -145,9 +145,9 @@ discard block |
||
145 | 145 | $currency_attribute = $this->addCurrencyAttributes($id); |
146 | 146 | //dd($currency_attribute); |
147 | 147 | if ($compound == 1) { |
148 | - return ['conditions' => [$taxCondition1, $taxCondition2], 'attributes' => ['tax' => [['name' => $name1, 'rate' => $rate1], ['name' => $name2, 'rate' => $rate2]],'currency'=>$currency_attribute]]; |
|
148 | + return ['conditions' => [$taxCondition1, $taxCondition2], 'attributes' => ['tax' => [['name' => $name1, 'rate' => $rate1], ['name' => $name2, 'rate' => $rate2]], 'currency'=>$currency_attribute]]; |
|
149 | 149 | } else { |
150 | - return ['conditions' => $taxCondition2, 'attributes' => ['tax' => [['name' => $name2, 'rate' => $rate2]],'currency'=>$currency_attribute]]; |
|
150 | + return ['conditions' => $taxCondition2, 'attributes' => ['tax' => [['name' => $name2, 'rate' => $rate2]], 'currency'=>$currency_attribute]]; |
|
151 | 151 | } |
152 | 152 | } |
153 | 153 | } |
@@ -229,7 +229,7 @@ discard block |
||
229 | 229 | */ |
230 | 230 | $isTaxApply = $product->tax_apply; |
231 | 231 | |
232 | - $taxConditions = $this->CheckTax($isTaxApply,$id); |
|
232 | + $taxConditions = $this->CheckTax($isTaxApply, $id); |
|
233 | 233 | //dd($taxConditions); |
234 | 234 | |
235 | 235 | /* |
@@ -292,8 +292,8 @@ discard block |
||
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{ |
|
296 | - $currency=[]; |
|
295 | + } else { |
|
296 | + $currency = []; |
|
297 | 297 | } |
298 | 298 | return $currency; |
299 | 299 | } catch (\Exception $ex) { |
@@ -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; |
@@ -59,14 +59,14 @@ discard block |
||
59 | 59 | |
60 | 60 | public function GetTemplates() { |
61 | 61 | return \Datatable::collection($this->template->select('id', 'name', 'type')->get()) |
62 | - ->addColumn('#', function ($model) { |
|
62 | + ->addColumn('#', function($model) { |
|
63 | 63 | return "<input type='checkbox' value=" . $model->id . ' name=select[] id=check>'; |
64 | 64 | }) |
65 | 65 | ->showColumns('name') |
66 | - ->addColumn('type', function ($model) { |
|
66 | + ->addColumn('type', function($model) { |
|
67 | 67 | return $this->type->where('id', $model->type)->first()->name; |
68 | 68 | }) |
69 | - ->addColumn('action', function ($model) { |
|
69 | + ->addColumn('action', function($model) { |
|
70 | 70 | return '<a href=' . url('templates/' . $model->id . '/edit') . " class='btn btn-sm btn-primary'>Edit</a>"; |
71 | 71 | }) |
72 | 72 | ->searchColumns('name') |
@@ -212,12 +212,12 @@ discard block |
||
212 | 212 | if (!array_key_exists('product', $replace)) { |
213 | 213 | $replace['product'] = ''; |
214 | 214 | } |
215 | - $array1 = ['{{title}}', '{{currency}}', '{{price}}', '{{subscription}}', '{{name}}', '{{url}}', '{{password}}', '{{address}}', '{{username}}', '{{email}}','{{product}}']; |
|
215 | + $array1 = ['{{title}}', '{{currency}}', '{{price}}', '{{subscription}}', '{{name}}', '{{url}}', '{{password}}', '{{address}}', '{{username}}', '{{email}}', '{{product}}']; |
|
216 | 216 | $array2 = [$replace['title'], $replace['currency'], $replace['price'], $replace['subscription'], $replace['name'], $replace['url'], $replace['password'], $replace['address'], $replace['username'], $replace['email'], $replace['product']]; |
217 | 217 | |
218 | 218 | $data = str_replace($array1, $array2, $data); |
219 | 219 | |
220 | - \Mail::send('emails.mail', ['data' => $data], function ($m) use ($from, $to, $subject, $fromname, $toname, $cc, $attach) { |
|
220 | + \Mail::send('emails.mail', ['data' => $data], function($m) use ($from, $to, $subject, $fromname, $toname, $cc, $attach) { |
|
221 | 221 | $m->from($from, $fromname); |
222 | 222 | |
223 | 223 | $m->to($to, $toname)->subject($subject); |
@@ -303,8 +303,8 @@ discard block |
||
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{ |
|
307 | - return redirect('/')->with('fails',\Lang::get('message.no-such-currency-in-system')); |
|
306 | + } else { |
|
307 | + return redirect('/')->with('fails', \Lang::get('message.no-such-currency-in-system')); |
|
308 | 308 | } |
309 | 309 | |
310 | 310 | $array1 = ['{{title}}', '{{currency}}', '{{price}}', '{{subscription}}', '<li>{{feature}}</li>', '{{url}}']; |
@@ -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 |
@@ -12,7 +12,7 @@ |
||
12 | 12 | */ |
13 | 13 | public function up() |
14 | 14 | { |
15 | - Schema::create('githubs', function (Blueprint $table) { |
|
15 | + Schema::create('githubs', function(Blueprint $table) { |
|
16 | 16 | $table->increments('id'); |
17 | 17 | $table->string('client_id'); |
18 | 18 | $table->string('client_secret'); |
@@ -2,6 +2,6 @@ |
||
2 | 2 | |
3 | 3 | return [ |
4 | 4 | |
5 | - 'view' => 'breadcrumbs::bootstrap3', |
|
5 | + 'view' => 'breadcrumbs::bootstrap3', |
|
6 | 6 | |
7 | 7 | ]; |
@@ -4,19 +4,19 @@ |
||
4 | 4 | |
5 | 5 | class View { |
6 | 6 | |
7 | - protected $factory; |
|
7 | + protected $factory; |
|
8 | 8 | |
9 | - public function __construct(ViewFactory $factory) |
|
10 | - { |
|
11 | - $this->factory = $factory; |
|
12 | - } |
|
9 | + public function __construct(ViewFactory $factory) |
|
10 | + { |
|
11 | + $this->factory = $factory; |
|
12 | + } |
|
13 | 13 | |
14 | - public function render($view, $breadcrumbs) |
|
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)'); |
|
14 | + public function render($view, $breadcrumbs) |
|
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)'); |
|
18 | 18 | |
19 | - return $this->factory->make($view, compact('breadcrumbs'))->render(); |
|
20 | - } |
|
19 | + return $this->factory->make($view, compact('breadcrumbs'))->render(); |
|
20 | + } |
|
21 | 21 | |
22 | 22 | } |
@@ -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 | } |
@@ -4,44 +4,44 @@ |
||
4 | 4 | |
5 | 5 | class CurrentRoute { |
6 | 6 | |
7 | - protected $route; |
|
8 | - protected $router; |
|
7 | + protected $route; |
|
8 | + protected $router; |
|
9 | 9 | |
10 | - public function __construct(Router $router) |
|
11 | - { |
|
12 | - $this->router = $router; |
|
13 | - } |
|
10 | + public function __construct(Router $router) |
|
11 | + { |
|
12 | + $this->router = $router; |
|
13 | + } |
|
14 | 14 | |
15 | - public function get() |
|
16 | - { |
|
17 | - if ($this->route) |
|
18 | - return $this->route; |
|
15 | + public function get() |
|
16 | + { |
|
17 | + if ($this->route) |
|
18 | + return $this->route; |
|
19 | 19 | |
20 | - $route = $this->router->current(); |
|
20 | + $route = $this->router->current(); |
|
21 | 21 | |
22 | - if (is_null($route)) |
|
23 | - return ['', []]; |
|
22 | + if (is_null($route)) |
|
23 | + return ['', []]; |
|
24 | 24 | |
25 | - $name = $route->getName(); |
|
25 | + $name = $route->getName(); |
|
26 | 26 | |
27 | - if (is_null($name)) { |
|
28 | - $uri = head($route->methods()) . ' /' . $route->uri(); |
|
29 | - throw new Exception("The current route ($uri) is not named - please check routes.php for an \"as\" parameter"); |
|
30 | - } |
|
27 | + if (is_null($name)) { |
|
28 | + $uri = head($route->methods()) . ' /' . $route->uri(); |
|
29 | + throw new Exception("The current route ($uri) is not named - please check routes.php for an \"as\" parameter"); |
|
30 | + } |
|
31 | 31 | |
32 | - $params = array_values($route->parameters()); |
|
32 | + $params = array_values($route->parameters()); |
|
33 | 33 | |
34 | - return [$name, $params]; |
|
35 | - } |
|
34 | + return [$name, $params]; |
|
35 | + } |
|
36 | 36 | |
37 | - public function set($name, $params) |
|
38 | - { |
|
39 | - $this->route = [$name, $params]; |
|
40 | - } |
|
37 | + public function set($name, $params) |
|
38 | + { |
|
39 | + $this->route = [$name, $params]; |
|
40 | + } |
|
41 | 41 | |
42 | - public function clear() |
|
43 | - { |
|
44 | - $this->route = null; |
|
45 | - } |
|
42 | + public function clear() |
|
43 | + { |
|
44 | + $this->route = null; |
|
45 | + } |
|
46 | 46 | |
47 | 47 | } |
@@ -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 |