app->make('Slider\Com.ryo.test\Interfaces\BannerRepositoryInterface'); return $bannerrepo->findorNew($banner); }); } if (Request::is('*/com.ryo.test/albums/*')) { Route::bind('albums', function ($albums) { $albumsrepo = $this->app->make('Slider\Com.ryo.test\Interfaces\AlbumsRepositoryInterface'); return $albumsrepo->findorNew($albums); }); } if (Request::is('*/com.ryo.test/pistures/*')) { Route::bind('pistures', function ($pistures) { $pisturesrepo = $this->app->make('Slider\Com.ryo.test\Interfaces\PisturesRepositoryInterface'); return $pisturesrepo->findorNew($pistures); }); } } /** * Define the routes for the package. * * @return void */ public function map() { $this->mapWebRoutes(); } /** * Define the "web" routes for the package. * * These routes all receive session state, CSRF protection, etc. * * @return void */ protected function mapWebRoutes() { if (request()->segment(1) == 'api' || request()->segment(2) == 'api') { return; } Route::group([ 'middleware' => 'web', 'namespace' => $this->namespace, 'prefix' => trans_setlocale(), ], function ($router) { require (__DIR__ . '/../../routes/web.php'); }); } }