@@ -8,7 +8,7 @@ |
||
| 8 | 8 | { |
| 9 | 9 | public function up() |
| 10 | 10 | { |
| 11 | - Schema::create('bedard_shop_categories', function (Blueprint $table) { |
|
| 11 | + Schema::create('bedard_shop_categories', function(Blueprint $table) { |
|
| 12 | 12 | $table->engine = 'InnoDB'; |
| 13 | 13 | $table->increments('id'); |
| 14 | 14 | $table->integer('parent_id')->nullable()->unsigned()->index(); |
@@ -8,7 +8,7 @@ |
||
| 8 | 8 | { |
| 9 | 9 | public function up() |
| 10 | 10 | { |
| 11 | - Schema::create('bedard_shop_statuses', function (Blueprint $table) { |
|
| 11 | + Schema::create('bedard_shop_statuses', function(Blueprint $table) { |
|
| 12 | 12 | $table->engine = 'InnoDB'; |
| 13 | 13 | $table->increments('id'); |
| 14 | 14 | $table->string('name')->default('')->index(); |
@@ -8,7 +8,7 @@ |
||
| 8 | 8 | { |
| 9 | 9 | public function up() |
| 10 | 10 | { |
| 11 | - Schema::create('bedard_shop_inventory_option_value', function (Blueprint $table) { |
|
| 11 | + Schema::create('bedard_shop_inventory_option_value', function(Blueprint $table) { |
|
| 12 | 12 | $table->engine = 'InnoDB'; |
| 13 | 13 | $table->integer('inventory_id')->unsigned(); |
| 14 | 14 | $table->integer('option_value_id')->unsigned(); |
@@ -8,7 +8,7 @@ |
||
| 8 | 8 | { |
| 9 | 9 | public function up() |
| 10 | 10 | { |
| 11 | - Schema::create('bedard_shop_carts', function (Blueprint $table) { |
|
| 11 | + Schema::create('bedard_shop_carts', function(Blueprint $table) { |
|
| 12 | 12 | $table->engine = 'InnoDB'; |
| 13 | 13 | $table->increments('id'); |
| 14 | 14 | $table->string('token', 40)->index(); |
@@ -8,7 +8,7 @@ |
||
| 8 | 8 | { |
| 9 | 9 | public function up() |
| 10 | 10 | { |
| 11 | - Schema::create('bedard_shop_products', function (Blueprint $table) { |
|
| 11 | + Schema::create('bedard_shop_products', function(Blueprint $table) { |
|
| 12 | 12 | $table->engine = 'InnoDB'; |
| 13 | 13 | $table->increments('id'); |
| 14 | 14 | $table->string('name')->default(''); |
@@ -8,7 +8,7 @@ |
||
| 8 | 8 | { |
| 9 | 9 | public function up() |
| 10 | 10 | { |
| 11 | - Schema::create('bedard_shop_cart_status', function (Blueprint $table) { |
|
| 11 | + Schema::create('bedard_shop_cart_status', function(Blueprint $table) { |
|
| 12 | 12 | $table->engine = 'InnoDB'; |
| 13 | 13 | $table->string('driver')->nullable(); |
| 14 | 14 | $table->integer('cart_id')->unsigned()->nullable(); |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -Route::group(['middleware' => '\Bedard\Shop\Classes\ApiMiddleware'], function () { |
|
| 3 | +Route::group(['middleware' => '\Bedard\Shop\Classes\ApiMiddleware'], function() { |
|
| 4 | 4 | // cart |
| 5 | 5 | Route::get('api/bedard/shop/cart', 'Bedard\Shop\Api\CartApi@index'); |
| 6 | 6 | Route::get('api/bedard/shop/cart/touch', 'Bedard\Shop\Api\CartApi@touch'); |
@@ -14,7 +14,7 @@ |
||
| 14 | 14 | */ |
| 15 | 15 | public function handle($request, Closure $next) |
| 16 | 16 | { |
| 17 | - if (! ApiSettings::get('is_enabled')) { |
|
| 17 | + if (!ApiSettings::get('is_enabled')) { |
|
| 18 | 18 | abort(403, 'Forbidden'); |
| 19 | 19 | |
| 20 | 20 | return; |
@@ -76,7 +76,7 @@ |
||
| 76 | 76 | ) { |
| 77 | 77 | foreach ($options['relationships'] as $relationship) { |
| 78 | 78 | $query->with([ |
| 79 | - $relationship => function ($model) { |
|
| 79 | + $relationship => function($model) { |
|
| 80 | 80 | // @todo: add controls to select columns of a relationship |
| 81 | 81 | $model->select('*'); |
| 82 | 82 | }, |