Commit b11eb59b authored by Sylvain's avatar Sylvain

Changement du dossier App -> app

parent 032e1a37
......@@ -99,6 +99,15 @@ return [
* default: /backend
*/
'url_prefix' => '/',
/**
* Namespace des constroleurs à surcharger
* default: Goldenscarab\\Modulus\\App\\Http\\Controllers
* - DashboardController
*
* Exemple : 'App\\Http\\Controllers' pour une route App\\Http\\Controllers\\DashboardController@index'
*/
'namespace_custom' => 'App\\Http\\Controllers',
];
```
......@@ -106,6 +115,40 @@ return [
Vous pouvez personnaliser l'url de base d'accès à Modulus depuis le fichier de config `config/modulus.php`.
Si vous souhaitez personnaliser l'URL de Modulus à la racine du nom de domaine, penser à nettoyer la route par défaut du fichier `routes/web.php`
Vous pouvez aussi personnaliser le Tableau de Bord en changeant le paramètre `namespace_custom` du fichier `config/modulus.php`
Ainsi vous redirigez la route `DashboardController@index` vers le namespace de votre choix.
Exemple :
```shell
php artisan make:controller DashboardController
```
Dans le fichier `config/modulus.php`
```php
'namespace_custom' => 'App\\Http\\Controllers',
```
Il ne reste plus qu'à personnaliser la methode `index` du controller fraichement créer pour afficher un nouveau Dashboard.
Pour la vue, vous pouvez utilisez le modèle suivant :
```html
@extends('modulus::layouts.app.adminlte')
@section('content')
<h1>Dashboard</h1>
@endsection
@push('scripts)
<script></script>
@endpush
@push('styles')
<style></style>
@endpush
```
**Middlewares**
Ajouter au fichier `app/Http/Kernel.php`, dans la variable `$routeMiddleware`, les lignes suivantes :
......
......@@ -23,7 +23,8 @@
],
"autoload": {
"psr-4": {
"Goldenscarab\\Modulus\\": "src/"
"Goldenscarab\\Modulus\\": "src/",
"Goldenscarab\\Modulus\\App\\": "src/app/"
},
"files": [
......
......@@ -46,6 +46,14 @@ class RouteServiceProvider extends ServiceProvider
->group(function($router) {
require __DIR__.'/../../routes/web.php';
});
// Custom
$router->prefix(trim(AUTH_HOME, '/'))
->middleware(['web'])
->namespace(config('modulus.namespace_custom'))
->group(function($router) {
require __DIR__.'/../../routes/custom.php';
});
}
/**
......
......@@ -25,4 +25,11 @@ return [
* default: /backend
*/
'url_prefix' => '/backend',
/**
* Namespace des constroleurs à surcharger
* default: Goldenscarab\\Modulus\\App\\Http\\Controllers
* - DashboardController
*/
'namespace_custom' => 'Goldenscarab\\Modulus\\App\\Http\\Controllers\\App',
];
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- Generator: Adobe Illustrator 19.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 473.931 473.931" style="enable-background:new 0 0 473.931 473.931;" xml:space="preserve">
<circle style="fill:#A3D5E0;" cx="236.966" cy="236.966" r="236.966"/>
<path style="fill:#CEA272;" d="M274.054,296.991c-1.205,14.6-15.091,24.722-31.001,22.611l0,0
c-15.925-2.118-27.85-15.671-26.638-30.275l5.059-61.152c1.201-14.6,15.083-24.729,31.001-22.611l0,0
c15.925,2.107,27.842,15.663,26.638,30.263L274.054,296.991z"/>
<path style="fill:#D6A972;" d="M296.493,214.755c2.137,24.621-17.654,44.815-44.201,45.114l0,0
c-26.559,0.299-49.807-19.416-51.947-44.041l-8.932-103.112c-2.137-24.613,17.657-44.815,44.205-45.111l0,0
c26.552-0.296,49.803,19.412,51.939,44.037L296.493,214.755z"/>
<path style="fill:#8B401E;" d="M185.973,115.598c0,0,5.205,69.193,10.29,53.552c27.824-85.466,108.055-50.764,111.014-60.961
l-19.655-2.791c0,0,20.22-5.474,21.347-15.229C308.972,90.165,195.155,26.892,185.973,115.598z"/>
<g>
<path style="fill:#C4C3B7;" d="M232.169,473.812c1.598,0.03,3.177,0.12,4.778,0.12c21.609,0,42.518-2.948,62.413-8.363
l-25.93-184.626l-56.901,9.77L232.169,473.812z"/>
<polygon style="fill:#C4C3B7;" points="160.48,305.335 160.888,305.264 204.251,292.819 199.357,293.661 "/>
</g>
<g>
<polygon style="fill:#7F807D;" points="204.251,292.819 216.528,290.716 216.412,289.332 "/>
<polygon style="fill:#7F807D;" points="157.034,306.368 160.888,305.264 160.48,305.335 "/>
<path style="fill:#7F807D;" d="M204.251,292.819l-43.363,12.445l-3.854,1.104l3.446-1.033l-21.081,3.678L95.763,427.275
c11.435,8.498,23.667,15.962,36.553,22.316l26.892-83.172l0.307,8.498l-0.962,85.671c23.117,8.101,47.861,12.707,73.619,13.216
l-15.641-183.099L204.251,292.819z"/>
<path style="fill:#7F807D;" d="M405.008,404.013L361.604,271.94l-56.433,6.357l0.019,0.045l-31.756,2.601l25.93,184.626
c14.503-3.955,28.452-9.216,41.706-15.712l-6.93-103.684l36.796,86.233C383.167,424.001,394.576,414.501,405.008,404.013z"/>
</g>
<path style="fill:#A2A29B;" d="M252.868,320.92c0.172,1.175,10.862,74.858,15.764,150.842c1.235-0.165,2.485-0.288,3.712-0.471
c-4.917-76.122-15.599-149.741-15.772-150.913L252.868,320.92z"/>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
</svg>
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- Generator: Adobe Illustrator 19.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 512 512" style="enable-background:new 0 0 512 512;" xml:space="preserve">
<circle style="fill:#88C5CC;" cx="256" cy="256" r="256"/>
<path style="fill:#406A80;" d="M339.216,387.528l-29.552,5.14L318,403.332l-62,49.004l-62-49.004l8.336-10.664l-30.668-5.336
l6.036-3.64l-52.608,9.644l-33.172,59.136C136.356,489.616,193.556,512,256,512c57.368,0,110.324-18.872,153.008-50.744l-38.1-67.92
L339.216,387.528z"/>
<path style="fill:#395F73;" d="M386.908,393.336l-52.612-9.644l6.036,3.64l-1.116,0.196l31.692,5.808l38.1,67.92
c3.78-2.82,7.456-5.768,11.072-8.788L386.908,393.336z"/>
<g>
<path style="fill:#FFDC80;" d="M246.828,102.688c1.428-0.12,2.868-0.216,4.32-0.284
C249.688,102.468,248.256,102.572,246.828,102.688z"/>
<path style="fill:#FFDC80;" d="M178.976,254.164c-1.584,1.236-3.548,2.004-5.712,2.004c-5.148,0-9.324-4.176-9.324-9.324
s4.176-9.324,9.324-9.324c1.636,0,3.152,0.46,4.492,1.2c-0.016,5.096,0.168,8.124,0.168,8.124c0-0.92,0.1-1.74,0.132-2.632
c2.36-67.128,92.76-49.504,120.204-69.992c2.996-2.236,5.248-4.928,6.544-8.24c14.916,14.312,25.356,35.024,28.376,58.672
c0.036,0.296,0.06,0.596,0.096,0.892c0.468,3.92,0.728,7.916,0.776,11.976c0.008,0,0.02-0.004,0.028-0.004
c5.148,0,9.324,4.176,9.324,9.324s-4.176,9.324-9.324,9.324c-0.456,0-0.896-0.072-1.336-0.136
c-4.228,27.26-18.344,50.352-37.74,63.764l-3.352,24.74c49.784-11.484,80.824-38.136,94.912-64.92c0,0-32.5-51.64-37.304-70.928
c-13.472-54.24-46.476-101.276-102.576-105.988c-56.088,4.704-89.112,51.748-102.584,106
c-4.776,19.288-37.304,70.928-37.304,70.928c15.812,30.072,52.928,60.052,114.044,68.508l-3.844-28.332
C197.16,306.08,182.84,282.24,178.976,254.164z"/>
<path style="fill:#FFDC80;" d="M291.164,348.124L291.164,348.124c56.608-7.832,92.64-34.124,110.196-61.868
C383.804,314,347.772,340.292,291.164,348.124z"/>
</g>
<path style="fill:#F2CD6D;" d="M349.26,208.688c4.804,19.288,37.304,70.928,37.304,70.928
c-14.088,26.784-45.128,53.436-94.912,64.92l-0.488,3.588c56.608-7.832,92.64-34.124,110.196-61.868
c1.396-2.208,2.676-4.424,3.844-6.64c0,0-32.496-51.64-37.296-70.928C353.7,151.5,317.812,102.284,256,102.284
c-1.64,0-3.252,0.044-4.852,0.12c-1.452,0.068-2.892,0.168-4.32,0.284c-0.048,0.004-0.1,0.004-0.152,0.012c0.004,0,0.004,0,0.008,0
C302.784,107.412,335.788,154.448,349.26,208.688z"/>
<path style="fill:#FFD7CC;" d="M252.316,414.652c10.58-14.072,23.868-44.524,23.868-44.524l5.848-43.168
c-8.144,3.448-16.904,5.34-26.032,5.34c-14.212,0-27.524-4.564-39.004-12.504l3.844,28.332l1.196,8.812l0,0L252.316,414.652z"/>
<path style="fill:#F2CCC2;" d="M291.652,344.536l3.352-24.74c-4.104,2.84-8.44,5.248-12.972,7.164l-5.848,43.168
c0,0-13.284,30.452-23.868,44.524l3.684,7.02l33.964-64.728l0.008,0.004l1.196-8.82v-0.004L291.652,344.536z"/>
<g>
<path style="fill:#2179A6;" d="M177.924,246.844c0,0-0.184-3.028-0.168-8.124c-1.336-0.74-2.852-1.2-4.492-1.2
c-5.148,0-9.324,4.176-9.324,9.324s4.176,9.324,9.324,9.324c2.164,0,4.132-0.768,5.712-2.004c-0.448-3.264-0.764-6.58-0.924-9.948
C178.024,245.104,177.924,245.924,177.924,246.844z"/>
<path style="fill:#2179A6;" d="M332.744,256.032c0.44,0.064,0.88,0.136,1.336,0.136c5.148,0,9.324-4.176,9.324-9.324
s-4.176-9.324-9.324-9.324c-0.008,0-0.02,0.004-0.028,0.004c0.004,0.456,0.028,0.904,0.028,1.36
C334.08,244.744,333.608,250.472,332.744,256.032z"/>
</g>
<g>
<path style="fill:#FFE1D9;" d="M333.18,224.656c0.036,0.296,0.06,0.596,0.096,0.892C333.24,225.252,333.216,224.952,333.18,224.656
z"/>
<path style="fill:#FFE1D9;" d="M332.744,256.032c0.864-5.564,1.336-11.288,1.336-17.148c0,51.588-34.964,93.416-78.08,93.416
c9.132,0,17.888-1.892,26.032-5.34c4.532-1.916,8.868-4.328,12.972-7.164C314.4,306.384,328.516,283.296,332.744,256.032z"/>
<path style="fill:#FFE1D9;" d="M320.092,238.884c0-25.132-8.34-47.884-21.832-64.66c-27.444,20.484-117.844,2.864-120.204,69.992
c0.16,3.368,0.472,6.684,0.924,9.948c3.864,28.076,18.184,51.916,38.02,65.632c11.48,7.936,24.792,12.504,39.004,12.504
c-2.364,0-4.684-0.172-6.992-0.424C288.84,327.64,320.092,287.648,320.092,238.884z"/>
</g>
<path style="fill:#F2D6CE;" d="M334.08,238.884c0-0.456-0.024-0.908-0.028-1.36c-0.048-4.06-0.308-8.056-0.776-11.976
c-0.036-0.296-0.056-0.596-0.096-0.892c-3.02-23.648-13.46-44.36-28.376-58.672c-1.296,3.308-3.544,6-6.544,8.24
c13.492,16.78,21.832,39.528,21.832,64.66c0,48.764-31.252,88.756-71.084,92.992c2.308,0.252,4.628,0.424,6.992,0.424
C299.116,332.3,334.08,290.472,334.08,238.884z"/>
<g>
<polygon style="fill:#F5F5F5;" points="202.336,392.668 194,403.332 256,452.336 318,403.332 309.664,392.668 339.216,387.528
340.332,387.332 334.296,383.692 289.972,356.948 289.964,356.944 256,421.672 252.316,414.652 222.036,356.944 222.036,356.944
177.704,383.692 171.668,387.332 "/>
<ellipse style="fill:#F5F5F5;" cx="220" cy="232" rx="16" ry="12"/>
</g>
<circle style="fill:#2179A6;" cx="220" cy="232" r="8"/>
<ellipse style="fill:#F5F5F5;" cx="292" cy="232" rx="16" ry="12"/>
<circle style="fill:#2179A6;" cx="292" cy="232" r="8"/>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
</svg>
<?php
use Illuminate\Support\Facades\Route;
// Dashboard
Route::get('/', 'DashboardController@index')->name('modulus.dashboard');
......@@ -15,6 +15,8 @@ use Illuminate\Support\Facades\Route;
Route::group(
[
'middleware' => ['auth', 'auth.active', 'role:admin|client'],
......@@ -23,9 +25,6 @@ Route::group(
'as' => 'modulus.'
], function ($router) {
// Dashboard
Route::get('/', 'DashboardController@index')->name('dashboard');
// Tracker
Route::group(['prefix' => 'tracker', 'as' => 'tracker.'], function() {
Route::get('export', 'DashboardController@export')->name('export');
......
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