@@ -12,7 +12,7 @@ |
||
| 12 | 12 | */ |
| 13 | 13 | public function up() |
| 14 | 14 | { |
| 15 | - Schema::create('subscriptions', function (Blueprint $table) { |
|
| 15 | + Schema::create('subscriptions', function(Blueprint $table) { |
|
| 16 | 16 | $table->increments('id'); |
| 17 | 17 | $table->integer('user_id')->unsigned(); |
| 18 | 18 | $table->foreign('user_id')->references('id')->on('users'); |
@@ -12,7 +12,7 @@ |
||
| 12 | 12 | */ |
| 13 | 13 | public function up() |
| 14 | 14 | { |
| 15 | - Schema::create('promotions', function (Blueprint $table) { |
|
| 15 | + Schema::create('promotions', function(Blueprint $table) { |
|
| 16 | 16 | $table->increments('id'); |
| 17 | 17 | $table->string('code'); |
| 18 | 18 | $table->integer('type')->unsigned(); |
@@ -12,7 +12,7 @@ |
||
| 12 | 12 | */ |
| 13 | 13 | public function up() |
| 14 | 14 | { |
| 15 | - Schema::create('taxes', function (Blueprint $table) { |
|
| 15 | + Schema::create('taxes', function(Blueprint $table) { |
|
| 16 | 16 | $table->increments('id'); |
| 17 | 17 | $table->integer('level'); |
| 18 | 18 | $table->string('name'); |
@@ -12,7 +12,7 @@ |
||
| 12 | 12 | */ |
| 13 | 13 | public function up() |
| 14 | 14 | { |
| 15 | - Schema::create('invoices', function (Blueprint $table) { |
|
| 15 | + Schema::create('invoices', function(Blueprint $table) { |
|
| 16 | 16 | $table->increments('id'); |
| 17 | 17 | $table->integer('user_id')->unsigned(); |
| 18 | 18 | $table->foreign('user_id')->references('id')->on('users'); |
@@ -29,11 +29,11 @@ |
||
| 29 | 29 | // parameter represents the DataTables column identifier. In this case simple |
| 30 | 30 | // indexes |
| 31 | 31 | $columns = [ |
| 32 | - ['db' => 'id', 'dt' => 0], |
|
| 33 | - ['db' => 'firstname', 'dt' => 1], |
|
| 34 | - ['db' => 'surname', 'dt' => 2], |
|
| 35 | - ['db' => 'zip', 'dt' => 3], |
|
| 36 | - ['db' => 'country', 'dt' => 4], |
|
| 32 | + ['db' => 'id', 'dt' => 0], |
|
| 33 | + ['db' => 'firstname', 'dt' => 1], |
|
| 34 | + ['db' => 'surname', 'dt' => 2], |
|
| 35 | + ['db' => 'zip', 'dt' => 3], |
|
| 36 | + ['db' => 'country', 'dt' => 4], |
|
| 37 | 37 | ]; |
| 38 | 38 | |
| 39 | 39 | // SQL server connection information |
@@ -39,7 +39,7 @@ |
||
| 39 | 39 | */ |
| 40 | 40 | public function map(Router $router) |
| 41 | 41 | { |
| 42 | - $router->group(['namespace' => $this->namespace], function ($router) { |
|
| 42 | + $router->group(['namespace' => $this->namespace], function($router) { |
|
| 43 | 43 | require app_path('Http/routes.php'); |
| 44 | 44 | }); |
| 45 | 45 | } |
@@ -26,6 +26,6 @@ |
||
| 26 | 26 | protected function schedule(Schedule $schedule) |
| 27 | 27 | { |
| 28 | 28 | $schedule->command('inspire') |
| 29 | - ->hourly(); |
|
| 29 | + ->hourly(); |
|
| 30 | 30 | } |
| 31 | 31 | } |
@@ -83,7 +83,7 @@ discard block |
||
| 83 | 83 | /** |
| 84 | 84 | * Store a newly created resource in storage. |
| 85 | 85 | * |
| 86 | - * @return Response |
|
| 86 | + * @return \Illuminate\Http\RedirectResponse |
|
| 87 | 87 | */ |
| 88 | 88 | public function store(ClientRequest $request) |
| 89 | 89 | { |
@@ -143,7 +143,7 @@ discard block |
||
| 143 | 143 | * |
| 144 | 144 | * @param int $id |
| 145 | 145 | * |
| 146 | - * @return Response |
|
| 146 | + * @return \Illuminate\Http\RedirectResponse |
|
| 147 | 147 | */ |
| 148 | 148 | public function update($id, ClientRequest $request) |
| 149 | 149 | { |
@@ -156,7 +156,6 @@ discard block |
||
| 156 | 156 | /** |
| 157 | 157 | * Remove the specified resource from storage. |
| 158 | 158 | * |
| 159 | - * @param int $id |
|
| 160 | 159 | * |
| 161 | 160 | * @return Response |
| 162 | 161 | */ |
@@ -58,14 +58,14 @@ discard block |
||
| 58 | 58 | public function GetPromotion() |
| 59 | 59 | { |
| 60 | 60 | return \Datatable::collection($this->promotion->select('code', 'type', 'id')->get()) |
| 61 | - ->addColumn('#', function ($model) { |
|
| 61 | + ->addColumn('#', function($model) { |
|
| 62 | 62 | return "<input type='checkbox' value=".$model->id.' name=select[] id=check>'; |
| 63 | 63 | }) |
| 64 | 64 | ->showColumns('code') |
| 65 | - ->addColumn('type', function ($model) { |
|
| 65 | + ->addColumn('type', function($model) { |
|
| 66 | 66 | return $this->type->where('id', $model->type)->first()->name; |
| 67 | 67 | }) |
| 68 | - ->addColumn('products', function ($model) { |
|
| 68 | + ->addColumn('products', function($model) { |
|
| 69 | 69 | $selected = $this->promoRelation->select('product_id')->where('promotion_id', $model->id)->get(); |
| 70 | 70 | |
| 71 | 71 | foreach ($selected as $key => $select) { |
@@ -77,7 +77,7 @@ discard block |
||
| 77 | 77 | return 'None'; |
| 78 | 78 | } |
| 79 | 79 | }) |
| 80 | - ->addColumn('action', function ($model) { |
|
| 80 | + ->addColumn('action', function($model) { |
|
| 81 | 81 | return '<a href='.url('promotions/'.$model->id.'/edit')." class='btn btn-sm btn-primary'>Edit</a>"; |
| 82 | 82 | }) |
| 83 | 83 | ->searchColumns('products') |
@@ -83,7 +83,7 @@ discard block |
||
| 83 | 83 | /** |
| 84 | 84 | * Store a newly created resource in storage. |
| 85 | 85 | * |
| 86 | - * @return Response |
|
| 86 | + * @return \Illuminate\Http\RedirectResponse |
|
| 87 | 87 | */ |
| 88 | 88 | public function store(ClientRequest $request) |
| 89 | 89 | { |
@@ -143,7 +143,7 @@ discard block |
||
| 143 | 143 | * |
| 144 | 144 | * @param int $id |
| 145 | 145 | * |
| 146 | - * @return Response |
|
| 146 | + * @return \Illuminate\Http\RedirectResponse |
|
| 147 | 147 | */ |
| 148 | 148 | public function update($id, ClientRequest $request) |
| 149 | 149 | { |
@@ -156,7 +156,6 @@ discard block |
||
| 156 | 156 | /** |
| 157 | 157 | * Remove the specified resource from storage. |
| 158 | 158 | * |
| 159 | - * @param int $id |
|
| 160 | 159 | * |
| 161 | 160 | * @return Response |
| 162 | 161 | */ |
@@ -66,26 +66,26 @@ |
||
| 66 | 66 | public function GetTax() |
| 67 | 67 | { |
| 68 | 68 | return \Datatable::collection($this->tax->select('id', 'name', 'level', 'country', 'state', 'rate', 'tax_classes_id')->get()) |
| 69 | - ->addColumn('#', function ($model) { |
|
| 69 | + ->addColumn('#', function($model) { |
|
| 70 | 70 | return "<input type='checkbox' value=".$model->id.' name=select[] id=check>'; |
| 71 | 71 | }) |
| 72 | - ->addColumn('tax_classes_id', function ($model) { |
|
| 72 | + ->addColumn('tax_classes_id', function($model) { |
|
| 73 | 73 | |
| 74 | 74 | return ucfirst($this->tax_class->where('id', $model->tax_classes_id)->first()->name); |
| 75 | 75 | }) |
| 76 | 76 | ->showColumns('name', 'level') |
| 77 | - ->addColumn('country', function ($model) { |
|
| 77 | + ->addColumn('country', function($model) { |
|
| 78 | 78 | if ($this->country->where('country_code_char2', $model->country)->first()) { |
| 79 | 79 | return $this->country->where('country_code_char2', $model->country)->first()->country_name; |
| 80 | 80 | } |
| 81 | 81 | }) |
| 82 | - ->addColumn('state', function ($model) { |
|
| 82 | + ->addColumn('state', function($model) { |
|
| 83 | 83 | if ($this->state->where('state_subdivision_code', $model->state)->first()) { |
| 84 | 84 | return $this->state->where('state_subdivision_code', $model->state)->first()->state_subdivision_name; |
| 85 | 85 | } |
| 86 | 86 | }) |
| 87 | 87 | ->showColumns('rate') |
| 88 | - ->addColumn('action', function ($model) { |
|
| 88 | + ->addColumn('action', function($model) { |
|
| 89 | 89 | return '<a href='.url('tax/'.$model->id.'/edit')." class='btn btn-sm btn-primary'>Edit</a>"; |
| 90 | 90 | }) |
| 91 | 91 | ->searchColumns('name') |