app->make('Moblyze\Plan\Interfaces\PlanRepositoryInterface'); return $planrepo->findorNew($plan); }); } if (Request::is('*/plan/location/*')) { Route::bind('location', function ($location) { $locationrepo = $this->app->make('Moblyze\Plan\Interfaces\LocationRepositoryInterface'); return $locationrepo->findorNew($location); }); } if (Request::is('*/plan/crew/*')) { Route::bind('crew', function ($crew) { $crewrepo = $this->app->make('Moblyze\Plan\Interfaces\CrewRepositoryInterface'); return $crewrepo->findorNew($crew); }); } if (Request::is('*/plan/passenger/*')) { Route::bind('passenger', function ($passenger) { $passengerrepo = $this->app->make('Moblyze\Plan\Interfaces\PassengerRepositoryInterface'); return $passengerrepo->findorNew($passenger); }); } if (Request::is('*/plan/floatpassenger/*')) { Route::bind('floatpassenger', function ($floatpassenger) { $floatpassengerrepo = $this->app->make('Moblyze\Plan\Interfaces\FloatpassengerRepositoryInterface'); return $floatpassengerrepo->findorNew($floatpassenger); }); } if (Request::is('*/plan/users/*')) { Route::bind('users', function ($users) { $usersrepo = $this->app->make('Moblyze\Plan\Interfaces\UsersRepositoryInterface'); return $usersrepo->findorNew($users); }); } if (Request::is('*/plan/manager/*')) { Route::bind('manager', function ($manager) { $managerrepo = $this->app->make('Moblyze\Plan\Interfaces\ManagerRepositoryInterface'); return $managerrepo->findorNew($manager); }); } } /** * Define the routes for the package. * * @return void */ public function map() { $this->mapWebRoutes(); $this->mapApiRoutes(); } /** * 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'); }); } /** * Define the "api" routes for the package. * * These routes are typically stateless. * * @return void */ protected function mapApiRoutes() { Route::group([ 'middleware' => 'api', 'namespace' => $this->namespace, 'prefix' => 'api', ], function ($router) { require (__DIR__ . '/../../routes/api.php'); }); } }