loadMigrationsFrom(__DIR__ . '/../../database/migrations'); $this->mergeConfigFrom(__DIR__ . '/../../config/image.php', 'image'); $this->app->register(ImageServiceProvider::class); $this->app->register(ImageOptimizerServiceProvider::class); $this->loadRoutes(); if ($this->app->runningInConsole()) { $this->publishes([ // __DIR__ . '/../../config/synchronize.php' => base_path('config/synchronize.php') ]); } } public function loadRoutes() { $this->app->post('images/upload', [ 'as' => 'uploadImage', 'uses' => '\Meoran\Images\Http\Controllers\ImagesController@upload' ]); $this->app->get('images/{template}/{filename}', [ 'as' => 'getPicture', 'uses' => '\Meoran\Images\Http\Controllers\ImagesController@get' ]); } }