Skip to content

Commit

Permalink
Updating service providers
Browse files Browse the repository at this point in the history
  • Loading branch information
arcanedev-maroc committed Feb 20, 2017
1 parent 452c698 commit 1c7106e
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 36 deletions.
Empty file removed database/migrations/.gitkeep
Empty file.
39 changes: 22 additions & 17 deletions src/Providers/RouteServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,35 +11,40 @@
*/
class RouteServiceProvider extends ServiceProvider
{
/* ------------------------------------------------------------------------------------------------
| Main Functions
| ------------------------------------------------------------------------------------------------
/* -----------------------------------------------------------------
| Properties
| -----------------------------------------------------------------
*/
/**
* The admin controller namespace for the application.
*
* @var string
*/
protected $adminNamespace = 'Arcanesoft\\Tracker\\Http\\Controllers\\Admin';

/* -----------------------------------------------------------------
| Main Methods
| -----------------------------------------------------------------
*/
/**
* Define the routes for the application.
*/
public function map()
{
$this->mapAdminRoutes();
$this->adminGroup(function () {
$this->mapAdminRoutes();
});
}

/* ------------------------------------------------------------------------------------------------
| Routes
| ------------------------------------------------------------------------------------------------
*/
/**
* Register the admin routes.
*/
private function mapAdminRoutes()
{
$attributes = $this->getAdminAttributes(
'tracker.',
'Arcanesoft\\Tracker\\Http\\Controllers\\Admin',
$this->config()->get('arcanesoft.tracker.route.prefix', 'tracker')
);

$this->group($attributes, function () {
Routes\Admin\TrackerRoutes::register();
});
$this->name('tracker.')
->prefix($this->config()->get('arcanesoft.tracker.route.prefix', 'tracker'))
->group(function () {
Routes\Admin\TrackerRoutes::register();
});
}
}
24 changes: 5 additions & 19 deletions src/TrackerServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
*/
class TrackerServiceProvider extends PackageServiceProvider
{
/* ------------------------------------------------------------------------------------------------
/* -----------------------------------------------------------------
| Properties
| ------------------------------------------------------------------------------------------------
| -----------------------------------------------------------------
*/
/**
* Package name.
Expand All @@ -21,23 +21,9 @@ class TrackerServiceProvider extends PackageServiceProvider
*/
protected $package = 'tracker';

/* ------------------------------------------------------------------------------------------------
| Getters & Setters
| ------------------------------------------------------------------------------------------------
*/
/**
* Get the base path of the package.
*
* @return string
*/
public function getBasePath()
{
return dirname(__DIR__);
}

/* ------------------------------------------------------------------------------------------------
| Main Functions
| ------------------------------------------------------------------------------------------------
/* -----------------------------------------------------------------
| Main Methods
| -----------------------------------------------------------------
*/
/**
* Register the service provider.
Expand Down

0 comments on commit 1c7106e

Please sign in to comment.