app->make('Litepie\Media\Interfaces\MediaRepositoryInterface'); return $mediarepo->findorNew($media); }); } if (Request::is('*/media/brand/*')) { Route::bind('brand', function ($brand) { $brandrepo = $this->app->make('Litepie\Media\Interfaces\BrandRepositoryInterface'); return $brandrepo->findorNew($brand); }); } if (Request::is('*/media/media_tag/*')) { Route::bind('media_tag', function ($media_tag) { $media_tagrepo = $this->app->make('Litepie\Media\Interfaces\MediaTagRepositoryInterface'); return $media_tagrepo->findorNew($media_tag); }); } if (Request::is('*/media/media_topic/*')) { Route::bind('media_topic', function ($media_topic) { $media_topicrepo = $this->app->make('Litepie\Media\Interfaces\MediaTopicRepositoryInterface'); return $media_topicrepo->findorNew($media_topic); }); } if (Request::is('*/media/target_group/*')) { Route::bind('target_group', function ($target_group) { $target_grouprepo = $this->app->make('Litepie\Media\Interfaces\TargetGroupRepositoryInterface'); return $target_grouprepo->findorNew($target_group); }); } if (Request::is('*/media/media_detail/*')) { Route::bind('media_detail', function ($media_detail) { $media_detailrepo = $this->app->make('Litepie\Media\Interfaces\MediaDetailRepositoryInterface'); return $media_detailrepo->findorNew($media_detail); }); } if (Request::is('*/media/media_detail_category/*')) { Route::bind('media_detail_category', function ($media_detail_category) { $media_detail_categoryrepo = $this->app->make('Litepie\Media\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'); }); } }