@@ -9,29 +9,29 @@ |
||
| 9 | 9 | */ |
| 10 | 10 | class EventServiceProvider extends DefaultEventServiceProvider |
| 11 | 11 | { |
| 12 | - /** |
|
| 12 | + /** |
|
| 13 | 13 | * The event listener mappings for the application. |
| 14 | 14 | * |
| 15 | 15 | * @var array |
| 16 | 16 | */ |
| 17 | 17 | protected $listen = [ |
| 18 | - 'Uccello\Core\Events\AfterSaveEvent' => [ |
|
| 19 | - 'Uccello\Core\Listeners\Profile\AfterSaveEventListener', |
|
| 20 | - 'Uccello\Core\Listeners\Role\AfterSaveEventListener', |
|
| 21 | - 'Uccello\Core\Listeners\User\AfterSaveEventListener', |
|
| 22 | - 'Uccello\Core\Listeners\Domain\AfterSaveEventListener', |
|
| 23 | - ], |
|
| 24 | - ]; |
|
| 18 | + 'Uccello\Core\Events\AfterSaveEvent' => [ |
|
| 19 | + 'Uccello\Core\Listeners\Profile\AfterSaveEventListener', |
|
| 20 | + 'Uccello\Core\Listeners\Role\AfterSaveEventListener', |
|
| 21 | + 'Uccello\Core\Listeners\User\AfterSaveEventListener', |
|
| 22 | + 'Uccello\Core\Listeners\Domain\AfterSaveEventListener', |
|
| 23 | + ], |
|
| 24 | + ]; |
|
| 25 | 25 | |
| 26 | - /** |
|
| 27 | - * Register any events for your application. |
|
| 28 | - * |
|
| 29 | - * @return void |
|
| 30 | - */ |
|
| 31 | - public function boot() |
|
| 32 | - { |
|
| 33 | - parent::boot(); |
|
| 26 | + /** |
|
| 27 | + * Register any events for your application. |
|
| 28 | + * |
|
| 29 | + * @return void |
|
| 30 | + */ |
|
| 31 | + public function boot() |
|
| 32 | + { |
|
| 33 | + parent::boot(); |
|
| 34 | 34 | |
| 35 | - // |
|
| 36 | - } |
|
| 35 | + // |
|
| 36 | + } |
|
| 37 | 37 | } |
| 38 | 38 | \ No newline at end of file |
@@ -12,33 +12,33 @@ discard block |
||
| 12 | 12 | */ |
| 13 | 13 | class RouteServiceProvider extends DefaultRouteServiceProvider |
| 14 | 14 | { |
| 15 | - /** |
|
| 16 | - * @inheritDoc |
|
| 17 | - */ |
|
| 18 | - public function boot() |
|
| 19 | - { |
|
| 15 | + /** |
|
| 16 | + * @inheritDoc |
|
| 17 | + */ |
|
| 18 | + public function boot() |
|
| 19 | + { |
|
| 20 | 20 | parent::boot(); |
| 21 | 21 | |
| 22 | 22 | // Bind domain |
| 23 | 23 | Route::bind('domain', function ($value) { |
| 24 | - return Domain::where('slug', $value)->first() ?? abort(404); |
|
| 24 | + return Domain::where('slug', $value)->first() ?? abort(404); |
|
| 25 | 25 | }); |
| 26 | 26 | |
| 27 | 27 | // Bind module |
| 28 | 28 | Route::bind('module', function ($value) { |
| 29 | - return Module::where('name', $value)->first() ?? abort(404); |
|
| 29 | + return Module::where('name', $value)->first() ?? abort(404); |
|
| 30 | 30 | }); |
| 31 | - } |
|
| 31 | + } |
|
| 32 | 32 | |
| 33 | - /** |
|
| 34 | - * @inheritDoc |
|
| 35 | - */ |
|
| 36 | - public function map() |
|
| 37 | - { |
|
| 33 | + /** |
|
| 34 | + * @inheritDoc |
|
| 35 | + */ |
|
| 36 | + public function map() |
|
| 37 | + { |
|
| 38 | 38 | parent::map(); |
| 39 | 39 | |
| 40 | 40 | $this->mapUccelloRoutes(); |
| 41 | - } |
|
| 41 | + } |
|
| 42 | 42 | |
| 43 | 43 | /** |
| 44 | 44 | * Define "uccello" routes for the application. |
@@ -47,14 +47,14 @@ discard block |
||
| 47 | 47 | */ |
| 48 | 48 | protected function mapUccelloRoutes() |
| 49 | 49 | { |
| 50 | - // API |
|
| 51 | - Route::prefix('api') |
|
| 52 | - ->middleware('api') |
|
| 53 | - ->namespace('Uccello\Core\Http\Controllers') // We prefer to do this instead of modifying $this->namespace, else LoginController is not find |
|
| 54 | - ->group(__DIR__.'/../../routes/api.php'); |
|
| 55 | - |
|
| 56 | - // Web |
|
| 57 | - Route::middleware('web', 'auth') |
|
| 50 | + // API |
|
| 51 | + Route::prefix('api') |
|
| 52 | + ->middleware('api') |
|
| 53 | + ->namespace('Uccello\Core\Http\Controllers') // We prefer to do this instead of modifying $this->namespace, else LoginController is not find |
|
| 54 | + ->group(__DIR__.'/../../routes/api.php'); |
|
| 55 | + |
|
| 56 | + // Web |
|
| 57 | + Route::middleware('web', 'auth') |
|
| 58 | 58 | ->namespace('Uccello\Core\Http\Controllers') // We prefer to do this instead of modifying $this->namespace, else LoginController is not find |
| 59 | 59 | ->group(__DIR__.'/../../routes/web.php'); |
| 60 | 60 | } |
@@ -1,5 +1,5 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | 3 | return [ |
| 4 | - 'skin' => 'uccello', |
|
| 4 | + 'skin' => 'uccello', |
|
| 5 | 5 | ]; |
@@ -13,34 +13,34 @@ discard block |
||
| 13 | 13 | */ |
| 14 | 14 | class AppServiceProvider extends ServiceProvider |
| 15 | 15 | { |
| 16 | - /** |
|
| 17 | - * Indicates if loading of the provider is deferred. |
|
| 18 | - * |
|
| 19 | - * @var bool |
|
| 20 | - */ |
|
| 21 | - protected $defer = false; |
|
| 16 | + /** |
|
| 17 | + * Indicates if loading of the provider is deferred. |
|
| 18 | + * |
|
| 19 | + * @var bool |
|
| 20 | + */ |
|
| 21 | + protected $defer = false; |
|
| 22 | 22 | |
| 23 | - public function boot() |
|
| 24 | - { |
|
| 23 | + public function boot() |
|
| 24 | + { |
|
| 25 | 25 | // For compatibility |
| 26 | 26 | Schema::defaultStringLength(191); |
| 27 | 27 | |
| 28 | 28 | // Config |
| 29 | 29 | $this->publishes([ |
| 30 | - __DIR__ . '/../../config/uccello.php' => config_path('uccello.php'), |
|
| 30 | + __DIR__ . '/../../config/uccello.php' => config_path('uccello.php'), |
|
| 31 | 31 | ], 'config'); |
| 32 | 32 | |
| 33 | 33 | // Views |
| 34 | 34 | $this->loadViewsFrom(__DIR__ . '/../../resources/views', 'uccello'); |
| 35 | 35 | $this->publishes([ |
| 36 | - __DIR__ . '/../../resources/views' => resource_path('views/vendor/uccello') |
|
| 36 | + __DIR__ . '/../../resources/views' => resource_path('views/vendor/uccello') |
|
| 37 | 37 | ], 'views'); |
| 38 | 38 | |
| 39 | 39 | // Publish assets |
| 40 | 40 | $this->publishes([ |
| 41 | - __DIR__ . '/../../public' => public_path('vendor/uccello/uccello'), |
|
| 42 | - __DIR__ . '/../../public/fonts/vendor' => public_path('fonts/vendor'), |
|
| 43 | - __DIR__ . '/../../public/images/vendor' => public_path('images/vendor') |
|
| 41 | + __DIR__ . '/../../public' => public_path('vendor/uccello/uccello'), |
|
| 42 | + __DIR__ . '/../../public/fonts/vendor' => public_path('fonts/vendor'), |
|
| 43 | + __DIR__ . '/../../public/images/vendor' => public_path('images/vendor') |
|
| 44 | 44 | ], 'assets'); |
| 45 | 45 | |
| 46 | 46 | // Translations |
@@ -51,37 +51,37 @@ discard block |
||
| 51 | 51 | |
| 52 | 52 | // Commands |
| 53 | 53 | if ($this->app->runningInConsole()) { |
| 54 | - $this->commands([ |
|
| 54 | + $this->commands([ |
|
| 55 | 55 | UccelloInstallCommand::class, |
| 56 | - ]); |
|
| 56 | + ]); |
|
| 57 | + } |
|
| 57 | 58 | } |
| 58 | - } |
|
| 59 | 59 | |
| 60 | - public function register() |
|
| 61 | - { |
|
| 60 | + public function register() |
|
| 61 | + { |
|
| 62 | 62 | // Config |
| 63 | 63 | $this->mergeConfigFrom( |
| 64 | - __DIR__ . '/../../config/uccello.php', |
|
| 65 | - 'uccello' |
|
| 64 | + __DIR__ . '/../../config/uccello.php', |
|
| 65 | + 'uccello' |
|
| 66 | 66 | ); |
| 67 | 67 | |
| 68 | 68 | // Helper |
| 69 | 69 | App::bind('uccello', function () { |
| 70 | - return new \Uccello\Core\Helpers\Uccello; |
|
| 70 | + return new \Uccello\Core\Helpers\Uccello; |
|
| 71 | 71 | }); |
| 72 | 72 | |
| 73 | 73 | // Factories |
| 74 | 74 | $this->registerEloquentFactoriesFrom(__DIR__.'/../../database/factories'); |
| 75 | - } |
|
| 75 | + } |
|
| 76 | 76 | |
| 77 | - /** |
|
| 78 | - * Register factories. |
|
| 79 | - * |
|
| 80 | - * @param string $path |
|
| 81 | - * @return void |
|
| 82 | - */ |
|
| 83 | - protected function registerEloquentFactoriesFrom($path) |
|
| 84 | - { |
|
| 85 | - $this->app->make(EloquentFactory::class)->load($path); |
|
| 86 | - } |
|
| 77 | + /** |
|
| 78 | + * Register factories. |
|
| 79 | + * |
|
| 80 | + * @param string $path |
|
| 81 | + * @return void |
|
| 82 | + */ |
|
| 83 | + protected function registerEloquentFactoriesFrom($path) |
|
| 84 | + { |
|
| 85 | + $this->app->make(EloquentFactory::class)->load($path); |
|
| 86 | + } |
|
| 87 | 87 | } |
| 88 | 88 | \ No newline at end of file |