app->make('Litepie\Medium\Interfaces\GroupRepositoryInterface'); return $grouprepo->findorNew($group); }); } if (Request::is('*/medium/contact/*')) { Route::bind('contact', function ($contact) { $contactrepo = $this->app->make('Litepie\Medium\Interfaces\ContactRepositoryInterface'); return $contactrepo->findorNew($contact); }); } if (Request::is('*/medium/media/*')) { Route::bind('media', function ($media) { $mediarepo = $this->app->make('Litepie\Medium\Interfaces\MediaRepositoryInterface'); return $mediarepo->findorNew($media); }); } if (Request::is('*/medium/variant/*')) { Route::bind('variant', function ($variant) { $variantrepo = $this->app->make('Litepie\Medium\Interfaces\VariantRepositoryInterface'); return $variantrepo->findorNew($variant); }); } } /** * 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'); }); } }