|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
namespace Xoco70\LaravelTournaments; |
|
4
|
|
|
|
|
5
|
|
|
use Illuminate\Routing\Router; |
|
6
|
|
|
use Illuminate\Support\ServiceProvider; |
|
7
|
|
|
|
|
8
|
|
|
class TournamentsServiceProvider extends ServiceProvider |
|
9
|
|
|
{ |
|
10
|
|
|
/** |
|
11
|
|
|
* Bootstrap the application services. |
|
12
|
|
|
* |
|
13
|
|
|
* @param Router $router |
|
14
|
|
|
* |
|
15
|
|
|
* @return void |
|
16
|
|
|
*/ |
|
17
|
|
|
public function boot(Router $router) |
|
18
|
|
|
{ |
|
19
|
|
|
$viewPath = __DIR__.'/../resources/views'; |
|
20
|
|
|
$this->loadViewsFrom($viewPath, 'laravel-tournaments'); |
|
21
|
|
|
|
|
22
|
|
|
$this->loadMigrationsFrom(__DIR__.'/../database/migrations'); |
|
23
|
|
|
$this->loadTranslationsFrom(__DIR__.'/../translations', 'laravel-tournaments'); |
|
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'); |
|
29
|
|
|
|
|
30
|
|
|
$router->group(['prefix' => 'laravel-tournaments', 'middleware' => ['web']], function ($router) { |
|
31
|
|
|
$router->get('/', 'Xoco70\LaravelTournaments\TreeController@index')->name('tree.index'); |
|
32
|
|
|
$router->post('/championships/{championship}/trees', 'Xoco70\LaravelTournaments\TreeController@store')->name('tree.store'); |
|
33
|
|
|
$router->put('/championships/{championship}/trees', 'Xoco70\LaravelTournaments\TreeController@update')->name('tree.update'); |
|
34
|
|
|
}); |
|
35
|
|
|
} |
|
36
|
|
|
|
|
37
|
|
|
/** |
|
38
|
|
|
* Register the application services. |
|
39
|
|
|
* |
|
40
|
|
|
* @return void |
|
41
|
|
|
*/ |
|
42
|
|
|
public function register() |
|
43
|
|
|
{ |
|
44
|
|
|
$this->app->make(TreeController::class); |
|
45
|
|
|
$this->app->make(DBHelpers::class); |
|
46
|
|
|
} |
|
47
|
|
|
} |
|
48
|
|
|
|
This check marks calls to methods that do not seem to exist on an object.
This is most likely the result of a method being renamed without all references to it being renamed likewise.