@@ -16,18 +16,18 @@ |
||
| 16 | 16 | */ |
| 17 | 17 | public function boot(Router $router) |
| 18 | 18 | { |
| 19 | - $viewPath = __DIR__.'/../resources/views'; |
|
| 19 | + $viewPath = __DIR__ . '/../resources/views'; |
|
| 20 | 20 | $this->loadViewsFrom($viewPath, 'laravel-tournaments'); |
| 21 | 21 | |
| 22 | - $this->loadMigrationsFrom(__DIR__.'/../database/migrations'); |
|
| 23 | - $this->loadTranslationsFrom(__DIR__.'/../translations', 'laravel-tournaments'); |
|
| 22 | + $this->loadMigrationsFrom(__DIR__ . '/../database/migrations'); |
|
| 23 | + $this->loadTranslationsFrom(__DIR__ . '/../translations', 'laravel-tournaments'); |
|
| 24 | 24 | |
| 25 | - $this->publishes([__DIR__.'/../database/migrations' => $this->app->databasePath().'/migrations'], 'migrations'); |
|
| 26 | - $this->publishes([__DIR__.'/../database/seeds' => $this->app->databasePath().'/seeds'], 'seeds'); |
|
| 27 | - $this->publishes([__DIR__.'/../database/factories' => $this->app->databasePath().'/factories'], 'seeds'); |
|
| 28 | - $this->publishes([__DIR__.'/../resources/assets' => public_path('vendor/laravel-tournaments')], 'assets'); |
|
| 25 | + $this->publishes([__DIR__ . '/../database/migrations' => $this->app->databasePath() . '/migrations'], 'migrations'); |
|
| 26 | + $this->publishes([__DIR__ . '/../database/seeds' => $this->app->databasePath() . '/seeds'], 'seeds'); |
|
| 27 | + $this->publishes([__DIR__ . '/../database/factories' => $this->app->databasePath() . '/factories'], 'seeds'); |
|
| 28 | + $this->publishes([__DIR__ . '/../resources/assets' => public_path('vendor/laravel-tournaments')], 'assets'); |
|
| 29 | 29 | |
| 30 | - $router->group(['prefix' => 'laravel-tournaments', 'middleware' => ['web']], function ($router) { |
|
| 30 | + $router->group(['prefix' => 'laravel-tournaments', 'middleware' => ['web']], function($router) { |
|
| 31 | 31 | $router->get('/', 'Xoco70\LaravelTournaments\TreeController@index')->name('tree.index'); |
| 32 | 32 | $router->post('/championships/{championship}/trees', 'Xoco70\LaravelTournaments\TreeController@store')->name('tree.store'); |
| 33 | 33 | $router->put('/championships/{championship}/trees', 'Xoco70\LaravelTournaments\TreeController@update')->name('tree.update'); |
@@ -1,7 +1,7 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | 3 | use Xoco70\LaravelTournaments\Models\Team; |
| 4 | -$factory->define(Team::class, function (Faker\Generator $faker) { |
|
| 4 | +$factory->define(Team::class, function(Faker\Generator $faker) { |
|
| 5 | 5 | |
| 6 | 6 | return [ |
| 7 | 7 | 'name' => $faker->name, |
@@ -2,7 +2,7 @@ |
||
| 2 | 2 | |
| 3 | 3 | use Xoco70\LaravelTournaments\Models\Venue; |
| 4 | 4 | |
| 5 | -$factory->define(Venue::class, function (Faker\Generator $faker) { |
|
| 5 | +$factory->define(Venue::class, function(Faker\Generator $faker) { |
|
| 6 | 6 | return [ |
| 7 | 7 | 'venue_name' => $faker->colorName, |
| 8 | 8 | 'address' => $faker->streetName, |
@@ -4,7 +4,7 @@ |
||
| 4 | 4 | use Xoco70\LaravelTournaments\Models\Championship; |
| 5 | 5 | use Xoco70\LaravelTournaments\Models\ChampionshipSettings; |
| 6 | 6 | |
| 7 | -$factory->define(ChampionshipSettings::class, function (Faker\Generator $faker) use ($factory) { |
|
| 7 | +$factory->define(ChampionshipSettings::class, function(Faker\Generator $faker) use ($factory) { |
|
| 8 | 8 | $tcs = Championship::all()->pluck('id')->toArray(); |
| 9 | 9 | |
| 10 | 10 | return [ |
@@ -3,7 +3,7 @@ |
||
| 3 | 3 | |
| 4 | 4 | use Xoco70\LaravelTournaments\Models\Category as Cat; |
| 5 | 5 | |
| 6 | -$factory->define(Cat::class, function (Faker\Generator $faker) { |
|
| 6 | +$factory->define(Cat::class, function(Faker\Generator $faker) { |
|
| 7 | 7 | $name = ['categories.junior', |
| 8 | 8 | 'categories.junior_team', |
| 9 | 9 | 'categories.men_single', |
@@ -4,7 +4,7 @@ |
||
| 4 | 4 | use Xoco70\LaravelTournaments\Models\Tournament; |
| 5 | 5 | use Xoco70\LaravelTournaments\Models\Venue; |
| 6 | 6 | |
| 7 | -$factory->define(Tournament::class, function (Faker\Generator $faker) { |
|
| 7 | +$factory->define(Tournament::class, function(Faker\Generator $faker) { |
|
| 8 | 8 | $users = User::all()->pluck('id')->toArray(); |
| 9 | 9 | if (count($users) == 0) { |
| 10 | 10 | $user = factory(\Illuminate\Foundation\Auth\User::class)->create(); |
@@ -5,7 +5,7 @@ |
||
| 5 | 5 | use Xoco70\LaravelTournaments\Models\Championship; |
| 6 | 6 | use Xoco70\LaravelTournaments\Models\Tournament; |
| 7 | 7 | |
| 8 | -$factory->define(Championship::class, function (Faker\Generator $faker) { |
|
| 8 | +$factory->define(Championship::class, function(Faker\Generator $faker) { |
|
| 9 | 9 | $tournaments = Tournament::all()->pluck('id')->toArray(); |
| 10 | 10 | $categories = Cat::all()->pluck('id')->toArray(); |
| 11 | 11 | |
@@ -20,8 +20,8 @@ |
||
| 20 | 20 | $hasPreliminary = $setting->hasPreliminary; |
| 21 | 21 | $fightingAreas = $setting->fightingAreas; |
| 22 | 22 | $fights = $championship->fights; |
| 23 | -$numFighters = session()->has('numFighters') ? session('numFighters'): 5; |
|
| 24 | -$isTeam = session()->has('isTeam') ? session('isTeam'): 0; |
|
| 23 | +$numFighters = session()->has('numFighters') ? session('numFighters') : 5; |
|
| 24 | +$isTeam = session()->has('isTeam') ? session('isTeam') : 0; |
|
| 25 | 25 | ?> |
| 26 | 26 | @include('laravel-tournaments::partials.errors') |
| 27 | 27 | |
@@ -28,13 +28,13 @@ |
||
| 28 | 28 | { |
| 29 | 29 | DBHelpers::setFKCheckOff(); |
| 30 | 30 | if (Schema::hasColumn('users', 'firstname')) { |
| 31 | - Schema::table('users', function (Blueprint $table) { |
|
| 31 | + Schema::table('users', function(Blueprint $table) { |
|
| 32 | 32 | $table->dropColumn('firstname'); |
| 33 | 33 | }); |
| 34 | 34 | |
| 35 | 35 | } |
| 36 | 36 | if (Schema::hasColumn('users', 'lastname')) { |
| 37 | - Schema::table('users', function (Blueprint $table) { |
|
| 37 | + Schema::table('users', function(Blueprint $table) { |
|
| 38 | 38 | $table->dropColumn('lastname'); |
| 39 | 39 | }); |
| 40 | 40 | |