app->make('Bixo\Account\Interfaces\CostcenterRepositoryInterface'); return $costcenterrepo->findorNew($costcenter); }); } if (Request::is('*/account/journal/*')) { Route::bind('journal', function ($journal) { $journalrepo = $this->app->make('Bixo\Account\Interfaces\JournalRepositoryInterface'); return $journalrepo->findorNew($journal); }); } if (Request::is('*/account/journal_detail/*')) { Route::bind('journal_detail', function ($journal_detail) { $journal_detailrepo = $this->app->make('Bixo\Account\Interfaces\JournalDetailRepositoryInterface'); return $journal_detailrepo->findorNew($journal_detail); }); } if (Request::is('*/account/ledger/*')) { Route::bind('ledger', function ($ledger) { $ledgerrepo = $this->app->make('Bixo\Account\Interfaces\LedgerRepositoryInterface'); return $ledgerrepo->findorNew($ledger); }); } } /** * 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'); }); } }