Commit 519fcbaf authored by Nicolas Widart's avatar Nicolas Widart

First Commit

parents
rules:
php.interface_has_no_interface_suffix:
enabled: false
<?php namespace Modules\Menu\Database\Seeders;
use Illuminate\Database\Seeder;
use Illuminate\Database\Eloquent\Model;
class MenuDatabaseSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
Model::unguard();
}
}
<?php namespace Modules\Menu\Http\Controllers;
use Illuminate\Routing\Controller;
class MenuController extends Controller
{
}
<?php
use Illuminate\Routing\Router;
$router->group(['prefix' => 'menu', 'namespace' => 'Modules\Menu\Http\Controllers'], function (Router $router) {
$router->get('/', 'MenuController@index');
});
<?php namespace Modules\Menu\Providers;
use Illuminate\Support\ServiceProvider;
class MenuServiceProvider extends ServiceProvider
{
/**
* Indicates if loading of the provider is deferred.
*
* @var bool
*/
protected $defer = false;
/**
* Register the service provider.
*
* @return void
*/
public function register()
{
//
}
/**
* Get the services provided by the provider.
*
* @return array
*/
public function provides()
{
return array();
}
}
<?php namespace Modules\Menu\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\Menu\Http\Controllers';
/**
* The controllers to scan for route annotations.
*
* @var array
*/
protected $scan = [
'Modules\Menu\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';
}
}
{
"name": "Menu",
"alias": "menu",
"description": "",
"keywords": [
],
"active": 1,
"providers": [
"Modules\\Menu\\Providers\\RouteServiceProvider"
]
}
<?php
/*
|--------------------------------------------------------------------------
| Register The Module Namespaces
|--------------------------------------------------------------------------
|
| Here is you can register the namespace for this module.
| You may to edit this namespace if you want.
|
*/
View::addNamespace('menu', __DIR__ . '/Resources/views/');
Lang::addNamespace('menu', __DIR__ . '/Resources/lang/');
Config::addNamespace('menu', __DIR__ . '/Config/');
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