@@ -15,7 +15,7 @@ |
||
| 15 | 15 | * @param \Faker\Generator $faker |
| 16 | 16 | * @return array |
| 17 | 17 | */ |
| 18 | - Inventory::class, function (Faker\Generator $faker) { |
|
| 18 | + Inventory::class, function(Faker\Generator $faker) { |
|
| 19 | 19 | return [ |
| 20 | 20 | 'name' => $faker->word |
| 21 | 21 | |
@@ -11,7 +11,7 @@ |
||
| 11 | 11 | */ |
| 12 | 12 | /** @var \Illuminate\Database\Eloquent\Factory $factory */ |
| 13 | 13 | use Scool\Inventory\Models\Inventory; |
| 14 | -$factory->define(Inventory::class, function (Faker\Generator $faker) { |
|
| 14 | +$factory->define(Inventory::class, function(Faker\Generator $faker) { |
|
| 15 | 15 | return [ |
| 16 | 16 | 'id' => $faker->randomDigit, |
| 17 | 17 | 'id_public' => $faker->randomDigit, |
@@ -13,7 +13,7 @@ |
||
| 13 | 13 | */ |
| 14 | 14 | public function up() |
| 15 | 15 | { |
| 16 | - Schema::create('brands', function (Blueprint $table) { |
|
| 16 | + Schema::create('brands', function(Blueprint $table) { |
|
| 17 | 17 | $table->increments('id'); |
| 18 | 18 | $table->timestamps(); |
| 19 | 19 | }); |
@@ -13,7 +13,7 @@ |
||
| 13 | 13 | */ |
| 14 | 14 | public function up() |
| 15 | 15 | { |
| 16 | - Schema::create('inventory_objects', function (Blueprint $table) { |
|
| 16 | + Schema::create('inventory_objects', function(Blueprint $table) { |
|
| 17 | 17 | $table->increments('id'); |
| 18 | 18 | $table->timestamps(); |
| 19 | 19 | }); |
@@ -13,7 +13,7 @@ |
||
| 13 | 13 | */ |
| 14 | 14 | public function up() |
| 15 | 15 | { |
| 16 | - Schema::create('providers', function (Blueprint $table) { |
|
| 16 | + Schema::create('providers', function(Blueprint $table) { |
|
| 17 | 17 | $table->increments('id'); |
| 18 | 18 | $table->timestamps(); |
| 19 | 19 | }); |
@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | if ($request->wantsJson()) { |
| 62 | 62 | return response()->json($response); |
| 63 | 63 | } |
| 64 | - return redirect()->back()->with('message', $response['message']); |
|
| 64 | + return redirect()->back()->with('message', $response[ 'message' ]); |
|
| 65 | 65 | } catch (ValidatorException $e) { |
| 66 | 66 | if ($request->wantsJson()) { |
| 67 | 67 | return response()->json([ |
@@ -121,7 +121,7 @@ discard block |
||
| 121 | 121 | if ($request->wantsJson()) { |
| 122 | 122 | return response()->json($response); |
| 123 | 123 | } |
| 124 | - return redirect()->back()->with('message', $response['message']); |
|
| 124 | + return redirect()->back()->with('message', $response[ 'message' ]); |
|
| 125 | 125 | } catch (ValidatorException $e) { |
| 126 | 126 | if ($request->wantsJson()) { |
| 127 | 127 | return response()->json([ |
@@ -11,7 +11,7 @@ |
||
| 11 | 11 | */ |
| 12 | 12 | /** @var \Illuminate\Database\Eloquent\Factory $factory */ |
| 13 | 13 | use Scool\Inventory\Models\Inventory; |
| 14 | -$factory->define(Inventory::class, function (Faker\Generator $faker) { |
|
| 14 | +$factory->define(Inventory::class, function(Faker\Generator $faker) { |
|
| 15 | 15 | return [ |
| 16 | 16 | 'id' => $faker->randomDigit, |
| 17 | 17 | 'id_public' => $faker->randomDigit, |
@@ -8,7 +8,7 @@ |
||
| 8 | 8 | class InventoryValidator extends LaravelValidator |
| 9 | 9 | { |
| 10 | 10 | protected $rules = [ |
| 11 | - ValidatorInterface::RULE_CREATE => [], |
|
| 12 | - ValidatorInterface::RULE_UPDATE => [], |
|
| 11 | + ValidatorInterface::RULE_CREATE => [ ], |
|
| 12 | + ValidatorInterface::RULE_UPDATE => [ ], |
|
| 13 | 13 | ]; |
| 14 | 14 | } |
@@ -1,5 +1,5 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -Route::group(['middleware' => 'auth'], function () { |
|
| 3 | +Route::group([ 'middleware' => 'auth' ], function() { |
|
| 4 | 4 | Route::resource('inventory', 'InventoryController'); |
| 5 | 5 | }); |