app->make('Litepie\Medium\Interfaces\MediaRepositoryInterface'); return $mediarepo->findorNew($media); }); } if (Request::is('*/medium/brand/*')) { Route::bind('brand', function ($brand) { $brandrepo = $this->app->make('Litepie\Medium\Interfaces\BrandRepositoryInterface'); return $brandrepo->findorNew($brand); }); } if (Request::is('*/medium/media_tag/*')) { Route::bind('media_tag', function ($media_tag) { $media_tagrepo = $this->app->make('Litepie\Medium\Interfaces\MediaTagRepositoryInterface'); return $media_tagrepo->findorNew($media_tag); }); } if (Request::is('*/medium/media_topic/*')) { Route::bind('media_topic', function ($media_topic) { $media_topicrepo = $this->app->make('Litepie\Medium\Interfaces\MediaTopicRepositoryInterface'); return $media_topicrepo->findorNew($media_topic); }); } if (Request::is('*/medium/target_group/*')) { Route::bind('target_group', function ($target_group) { $target_grouprepo = $this->app->make('Litepie\Medium\Interfaces\TargetGroupRepositoryInterface'); return $target_grouprepo->findorNew($target_group); }); } if (Request::is('*/medium/media_detail/*')) { Route::bind('media_detail', function ($media_detail) { $media_detailrepo = $this->app->make('Litepie\Medium\Interfaces\MediaDetailRepositoryInterface'); return $media_detailrepo->findorNew($media_detail); }); } if (Request::is('*/medium/media_detail_category/*')) { Route::bind('media_detail_category', function ($media_detail_category) { $media_detail_categoryrepo = $this->app->make('Litepie\Medium\Interfaces\MediaDetailCategoryRepositoryInterface'); return $media_detail_categoryrepo->findorNew($media_detail_category); }); } } /** * 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() { Route::group([ 'middleware' => 'web', 'namespace' => $this->namespace, ], function ($router) { require (__DIR__ . '/../../routes/web.php'); }); } }