Commit 9bf3f249 authored by Nicolas Widart's avatar Nicolas Widart

First Commit

parents
<?php namespace Modules\Setting\Composers;
use Illuminate\Support\Collection;
use Illuminate\Support\Facades\Request;
class SidebarViewComposer
{
public function compose($view)
{
$view->items->put('setting', [
'weight' => 5,
'request' => "*/$view->prefix/setting",
'route' => 'dashboard.index',
'icon-class' => 'fa fa-cog',
'title' => 'Settings',
]);
}
}
\ No newline at end of file
<?php namespace Modules\Setting\Database\Seeders;
use Illuminate\Database\Seeder;
use Illuminate\Database\Eloquent\Model;
class SettingDatabaseSeeder extends Seeder {
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
Model::unguard();
// $this->call("OthersTableSeeder");
}
}
\ No newline at end of file
<?php namespace Modules\Setting\Http\Controllers;
use Illuminate\Routing\Controller;
class SettingController extends Controller {
}
\ No newline at end of file
<?php
Route::group(['prefix' => 'setting', 'namespace' => 'Modules\Setting\Http\Controllers'], function()
{
Route::get('/', 'SettingController@index');
});
\ No newline at end of file
<?php namespace Modules\Setting\Providers;
use Illuminate\Support\ServiceProvider;
class SettingServiceProvider 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
View::composer('core::partials.sidebar-nav', 'Modules\Setting\Composers\SidebarViewComposer');
{
"name": "Setting",
"alias": "setting",
"description": "",
"keywords": [
],
"active": 1
}
\ No newline at end of file
<?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('setting', __DIR__ . '/Resources/views/');
Lang::addNamespace('setting', __DIR__ . '/Resources/lang/');
Config::addNamespace('setting', __DIR__ . '/Config/');
/*
|--------------------------------------------------------------------------
| Require The Routes file.
|--------------------------------------------------------------------------
|
| Next, this module will load filters and routes file.
|
*/
require __DIR__ . '/Http/routes.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