Commit 564351cc authored by Nicolas Widart's avatar Nicolas Widart

Squashed 'Modules/Dashboard/' changes from 7eef842..32a9233

32a9233 Adding code quality badges
259fde8 Merge pull request #2 from nWidart-Modules/swap-to-new-routes
4761a1a Swapping to the new routes

git-subtree-dir: Modules/Dashboard
git-subtree-split: 32a9233a7b12bd677fa41498fb8073095fd84564
parent dac8bd33
<?php <?php
Route::group(['prefix' => LaravelLocalization::setLocale(), 'before' => 'LaravelLocalizationRedirectFilter|auth.admin'], function() $router->group(['prefix' => LaravelLocalization::setLocale(), 'before' => 'LaravelLocalizationRedirectFilter|auth.admin'], function($router)
{ {
Route::group(['prefix' => Config::get('core::core.admin-prefix'), 'namespace' => 'Modules\Dashboard\Http\Controllers'], function() $router->group(['prefix' => Config::get('core::core.admin-prefix'), 'namespace' => 'Modules\Dashboard\Http\Controllers'], function($router)
{ {
Route::get('/', ['as' => 'dashboard.index', 'uses' => 'Admin\DashboardController@index']); $router->get('/', ['as' => 'dashboard.index', 'uses' => 'Admin\DashboardController@index']);
}); });
}); });
<?php namespace Modules\Dashboard\Providers;
use Illuminate\Routing\Router;
use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider;
class RouteServiceProvider extends ServiceProvider
{
/**
* The root namespace to assume when generating URLs to actions.
*
* @var string
*/
protected $rootUrlNamespace = 'Modules\Dashboard\Http\Controllers';
/**
* The controllers to scan for route annotations.
*
* @var array
*/
protected $scan = [
'Modules\Dashboard\Http\Controllers',
];
/**
* Called before routes are registered.
*
* Register any model bindings or pattern based filters.
*
* @param Router $router
* @return void
*/
public function before(Router $router)
{
//
}
/**
* Define the routes for the application.
*
* @return void
*/
public function map(Router $router)
{
require __DIR__ . '/../Http/routes.php';
}
}
...@@ -3,5 +3,8 @@ ...@@ -3,5 +3,8 @@
"alias": "dashboard", "alias": "dashboard",
"description": "The module responsible for the admin dashboard page.", "description": "The module responsible for the admin dashboard page.",
"keywords": [], "keywords": [],
"active": 1 "active": 1,
"providers": [
"Modules\\Dashboard\\Providers\\RouteServiceProvider"
]
} }
\ No newline at end of file
# Dashboard Module
[![SensioLabsInsight](https://insight.sensiolabs.com/projects/3616f9d8-1e5c-46c6-9058-13e916851254/mini.png)](https://insight.sensiolabs.com/projects/3616f9d8-1e5c-46c6-9058-13e916851254)
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/nWidart-Modules/Dashboard/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/nWidart-Modules/Dashboard/?branch=master)
\ No newline at end of file
...@@ -16,15 +16,5 @@ Lang::addNamespace('dashboard', __DIR__ . '/Resources/lang/'); ...@@ -16,15 +16,5 @@ Lang::addNamespace('dashboard', __DIR__ . '/Resources/lang/');
Config::addNamespace('dashboard', __DIR__ . '/Config/'); Config::addNamespace('dashboard', __DIR__ . '/Config/');
/*
|--------------------------------------------------------------------------
| Require The Routes file.
|--------------------------------------------------------------------------
|
| Next, this module will load filters and routes file.
|
*/
require __DIR__ . '/Http/routes.php';
require __DIR__ . '/composers.php'; require __DIR__ . '/composers.php';
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment