@@ -9,47 +9,47 @@ |
||
9 | 9 | |
10 | 10 | class UpdateManagerController extends Controller |
11 | 11 | { |
12 | - // When including ths trait make sure you inject RepositoryContract as $repository and |
|
13 | - // CustomersRepository as $customers to the constructor |
|
14 | - use VerifiesPurchase; |
|
12 | + // When including ths trait make sure you inject RepositoryContract as $repository and |
|
13 | + // CustomersRepository as $customers to the constructor |
|
14 | + use VerifiesPurchase; |
|
15 | 15 | |
16 | - /** |
|
17 | - * Update Repository. |
|
18 | - * |
|
19 | - * @var mixed |
|
20 | - **/ |
|
21 | - public $repository; |
|
16 | + /** |
|
17 | + * Update Repository. |
|
18 | + * |
|
19 | + * @var mixed |
|
20 | + **/ |
|
21 | + public $repository; |
|
22 | 22 | |
23 | - /** |
|
24 | - * Customers Repository. |
|
25 | - * |
|
26 | - * @var mixed |
|
27 | - **/ |
|
28 | - public $customers; |
|
23 | + /** |
|
24 | + * Customers Repository. |
|
25 | + * |
|
26 | + * @var mixed |
|
27 | + **/ |
|
28 | + public $customers; |
|
29 | 29 | |
30 | - /** |
|
31 | - * Create a new instance of the UpdatesManagerController::class. |
|
32 | - **/ |
|
33 | - public function __construct(RepositoryContract $repository, CustomersRepository $customers) |
|
34 | - { |
|
35 | - $this->repository = $repository; |
|
36 | - $this->customers = $customers; |
|
37 | - } |
|
30 | + /** |
|
31 | + * Create a new instance of the UpdatesManagerController::class. |
|
32 | + **/ |
|
33 | + public function __construct(RepositoryContract $repository, CustomersRepository $customers) |
|
34 | + { |
|
35 | + $this->repository = $repository; |
|
36 | + $this->customers = $customers; |
|
37 | + } |
|
38 | 38 | |
39 | - /** |
|
40 | - * @return mixed Illuminate\Http\Response |
|
41 | - * |
|
42 | - * @param $version Version to fetch |
|
43 | - **/ |
|
44 | - public function fetchUpdate($version) |
|
45 | - { |
|
46 | - $this->getCustomer(); |
|
47 | - if (null == $this->customer) { |
|
48 | - return $this->invalidKeyResponse(); |
|
49 | - } |
|
50 | - $update = $this->repository->config('updates.updatesPath') . "/update_{$version}.zip"; |
|
51 | - if (file_exists($update)) { |
|
52 | - return response()->download($update); |
|
53 | - } |
|
54 | - } |
|
39 | + /** |
|
40 | + * @return mixed Illuminate\Http\Response |
|
41 | + * |
|
42 | + * @param $version Version to fetch |
|
43 | + **/ |
|
44 | + public function fetchUpdate($version) |
|
45 | + { |
|
46 | + $this->getCustomer(); |
|
47 | + if (null == $this->customer) { |
|
48 | + return $this->invalidKeyResponse(); |
|
49 | + } |
|
50 | + $update = $this->repository->config('updates.updatesPath') . "/update_{$version}.zip"; |
|
51 | + if (file_exists($update)) { |
|
52 | + return response()->download($update); |
|
53 | + } |
|
54 | + } |
|
55 | 55 | } |
@@ -47,7 +47,7 @@ |
||
47 | 47 | if (null == $this->customer) { |
48 | 48 | return $this->invalidKeyResponse(); |
49 | 49 | } |
50 | - $update = $this->repository->config('updates.updatesPath') . "/update_{$version}.zip"; |
|
50 | + $update = $this->repository->config('updates.updatesPath')."/update_{$version}.zip"; |
|
51 | 51 | if (file_exists($update)) { |
52 | 52 | return response()->download($update); |
53 | 53 | } |
@@ -9,52 +9,52 @@ |
||
9 | 9 | |
10 | 10 | class InstallManagerController extends Controller |
11 | 11 | { |
12 | - /* |
|
12 | + /* |
|
13 | 13 | * When including this trait make sure you inject RepositoryContract as $repository |
14 | 14 | * and CustomersRepository as $customers to the constructor |
15 | 15 | */ |
16 | - use VerifiesPurchase; |
|
16 | + use VerifiesPurchase; |
|
17 | 17 | |
18 | - /** |
|
19 | - * Update Repository. |
|
20 | - * |
|
21 | - * @var mixed |
|
22 | - **/ |
|
23 | - public $repository; |
|
18 | + /** |
|
19 | + * Update Repository. |
|
20 | + * |
|
21 | + * @var mixed |
|
22 | + **/ |
|
23 | + public $repository; |
|
24 | 24 | |
25 | - /** |
|
26 | - * Customers Repository. |
|
27 | - * |
|
28 | - * @var mixed |
|
29 | - **/ |
|
30 | - public $customers; |
|
25 | + /** |
|
26 | + * Customers Repository. |
|
27 | + * |
|
28 | + * @var mixed |
|
29 | + **/ |
|
30 | + public $customers; |
|
31 | 31 | |
32 | - /** |
|
33 | - * Create a new instance of the UpdatesManagerController::class. |
|
34 | - **/ |
|
35 | - public function __construct(RepositoryContract $repository, CustomersRepository $customers) |
|
36 | - { |
|
37 | - $this->repository = $repository; |
|
38 | - $this->customers = $customers; |
|
39 | - } |
|
32 | + /** |
|
33 | + * Create a new instance of the UpdatesManagerController::class. |
|
34 | + **/ |
|
35 | + public function __construct(RepositoryContract $repository, CustomersRepository $customers) |
|
36 | + { |
|
37 | + $this->repository = $repository; |
|
38 | + $this->customers = $customers; |
|
39 | + } |
|
40 | 40 | |
41 | - /** |
|
42 | - * Get the installer zip file for the version specified |
|
43 | - * NOTE: The purchase key must be passed in the request for verification. |
|
44 | - * |
|
45 | - * @return mixed Illuminate\Http\Response |
|
46 | - * |
|
47 | - * @param $version Version to fetch |
|
48 | - **/ |
|
49 | - public function getInstaller($version) |
|
50 | - { |
|
51 | - $response = $this->verifyPurchase(); |
|
52 | - if (null == $this->customer) { |
|
53 | - return $this->invalidKeyResponse(); |
|
54 | - } |
|
55 | - $install = $this->repository->config('install.resourcePath') . "/install_{$version}.zip"; |
|
56 | - if (file_exists($install)) { |
|
57 | - return response()->download($install); |
|
58 | - } |
|
59 | - } |
|
41 | + /** |
|
42 | + * Get the installer zip file for the version specified |
|
43 | + * NOTE: The purchase key must be passed in the request for verification. |
|
44 | + * |
|
45 | + * @return mixed Illuminate\Http\Response |
|
46 | + * |
|
47 | + * @param $version Version to fetch |
|
48 | + **/ |
|
49 | + public function getInstaller($version) |
|
50 | + { |
|
51 | + $response = $this->verifyPurchase(); |
|
52 | + if (null == $this->customer) { |
|
53 | + return $this->invalidKeyResponse(); |
|
54 | + } |
|
55 | + $install = $this->repository->config('install.resourcePath') . "/install_{$version}.zip"; |
|
56 | + if (file_exists($install)) { |
|
57 | + return response()->download($install); |
|
58 | + } |
|
59 | + } |
|
60 | 60 | } |
@@ -52,7 +52,7 @@ |
||
52 | 52 | if (null == $this->customer) { |
53 | 53 | return $this->invalidKeyResponse(); |
54 | 54 | } |
55 | - $install = $this->repository->config('install.resourcePath') . "/install_{$version}.zip"; |
|
55 | + $install = $this->repository->config('install.resourcePath')."/install_{$version}.zip"; |
|
56 | 56 | if (file_exists($install)) { |
57 | 57 | return response()->download($install); |
58 | 58 | } |