@@ -13,15 +13,15 @@ |
||
13 | 13 | public function run() |
14 | 14 | { |
15 | 15 | Capsule::schema()->dropIfExists('coaches'); |
16 | - Capsule::schema()->create('coaches', function (Blueprint $table) { |
|
16 | + Capsule::schema()->create('coaches', function(Blueprint $table) { |
|
17 | 17 | $table->increments('id'); |
18 | 18 | $table->string('name'); |
19 | 19 | $table->string('surname'); |
20 | 20 | $table->tinyInteger('age'); |
21 | - $table->string('nationality',2); |
|
21 | + $table->string('nationality', 2); |
|
22 | 22 | $table->float('skillAvg'); |
23 | 23 | $table->float('wageReq'); |
24 | - $table->string('favouriteModule',10); |
|
24 | + $table->string('favouriteModule', 10); |
|
25 | 25 | $table->integer('team_id')->nullable(); |
26 | 26 | $table->timestamps(); |
27 | 27 | }); |
@@ -13,16 +13,16 @@ |
||
13 | 13 | public function run() |
14 | 14 | { |
15 | 15 | Capsule::schema()->dropIfExists('players'); |
16 | - Capsule::schema()->create('players', function (Blueprint $table) { |
|
16 | + Capsule::schema()->create('players', function(Blueprint $table) { |
|
17 | 17 | $table->increments('id'); |
18 | 18 | $table->string('name'); |
19 | 19 | $table->string('surname'); |
20 | 20 | $table->tinyInteger('age'); |
21 | - $table->string('nationality',2); |
|
21 | + $table->string('nationality', 2); |
|
22 | 22 | $table->float('skillAvg'); |
23 | 23 | $table->float('wageReq'); |
24 | 24 | $table->float('val'); |
25 | - $table->string('role',2); |
|
25 | + $table->string('role', 2); |
|
26 | 26 | $table->integer('team_id')->nullable(); |
27 | 27 | $table->timestamps(); |
28 | 28 | }); |
@@ -2,7 +2,7 @@ |
||
2 | 2 | |
3 | 3 | use Illuminate\Database\Capsule\Manager as Capsule; |
4 | 4 | |
5 | -$dotenv = new Dotenv\Dotenv(__DIR__ . "/../"); |
|
5 | +$dotenv = new Dotenv\Dotenv(__DIR__."/../"); |
|
6 | 6 | $dotenv->load(); |
7 | 7 | |
8 | 8 | /** |
@@ -13,7 +13,7 @@ |
||
13 | 13 | public function run() |
14 | 14 | { |
15 | 15 | Capsule::schema()->dropIfExists('matches'); |
16 | - Capsule::schema()->create('matches', function (Blueprint $table) { |
|
16 | + Capsule::schema()->create('matches', function(Blueprint $table) { |
|
17 | 17 | $table->increments('id'); |
18 | 18 | $table->integer('home_team_id'); |
19 | 19 | $table->integer('goal_home')->default(0); |
@@ -56,7 +56,7 @@ |
||
56 | 56 | return $this->belongsTo(Team::class, 'away_team_id'); |
57 | 57 | } |
58 | 58 | |
59 | - public function scopeComplete($query){ |
|
59 | + public function scopeComplete($query) { |
|
60 | 60 | return $query->with( |
61 | 61 | 'homeTeam', |
62 | 62 | 'homeTeam.roster', |
@@ -13,7 +13,7 @@ |
||
13 | 13 | public function run() |
14 | 14 | { |
15 | 15 | Capsule::schema()->dropIfExists('match_players'); |
16 | - Capsule::schema()->create('match_players', function (Blueprint $table) { |
|
16 | + Capsule::schema()->create('match_players', function(Blueprint $table) { |
|
17 | 17 | $table->increments('id'); |
18 | 18 | $table->integer('match_id'); |
19 | 19 | $table->integer('team_id'); |
@@ -13,7 +13,7 @@ |
||
13 | 13 | public function run() |
14 | 14 | { |
15 | 15 | Capsule::schema()->dropIfExists('leagues'); |
16 | - Capsule::schema()->create('leagues', function (Blueprint $table) { |
|
16 | + Capsule::schema()->create('leagues', function(Blueprint $table) { |
|
17 | 17 | $table->increments('id'); |
18 | 18 | $table->string('name'); |
19 | 19 | $table->timestamps(); |
@@ -13,7 +13,7 @@ |
||
13 | 13 | public function run() |
14 | 14 | { |
15 | 15 | Capsule::schema()->dropIfExists('league_rounds'); |
16 | - Capsule::schema()->create('league_rounds', function (Blueprint $table) { |
|
16 | + Capsule::schema()->create('league_rounds', function(Blueprint $table) { |
|
17 | 17 | $table->increments('id'); |
18 | 18 | $table->integer('league_id'); |
19 | 19 | $table->integer('day')->default(0); |
@@ -13,7 +13,7 @@ |
||
13 | 13 | public function run() |
14 | 14 | { |
15 | 15 | Capsule::schema()->dropIfExists('leagues'); |
16 | - Capsule::schema()->create('league_teams', function (Blueprint $table) { |
|
16 | + Capsule::schema()->create('league_teams', function(Blueprint $table) { |
|
17 | 17 | $table->increments('id'); |
18 | 18 | $table->integer('league_id'); |
19 | 19 | $table->integer('team_id'); |