Commit d2174ab5 authored by Nicolas Widart's avatar Nicolas Widart

Squashed 'Modules/Workshop/' changes from a484d0e..02afc9e

02afc9e Remvoving partials include
fc232f4 Adding code climate
ba0ecde Removing commented code
e276015 New route autoloading.
bae3cc6 Adding sensiolab config file
b5ba0ef Adding travis config
527715b Removing flash msg includes
6e20145 Adding blank lines at EOF

git-subtree-dir: Modules/Workshop
git-subtree-split: 02afc9e48ebd4f2ee3c8f1c0cb53002f1342eb50
parent 267637ef
rules:
php.interface_has_no_interface_suffix:
enabled: false
language: php
php:
- 5.6
- 5.5
- 5.4
- hhvm
<?php namespace Modules\Workshop\Composers;
use Illuminate\Contracts\View\View;
use Modules\Workshop\Manager\ModuleManager;
class MigrateViewComposer
......@@ -14,7 +15,7 @@ class MigrateViewComposer
$this->module = $module;
}
public function compose($view)
public function compose(View $view)
{
$view->modules = $this->module->enabled();
}
......
......@@ -14,8 +14,6 @@ class WorkshopDatabaseSeeder extends Seeder
public function run()
{
Model::unguard();
// $this->call("OthersTableSeeder");
}
}
<?php
Route::group(['prefix' => LaravelLocalization::setLocale(), 'before' => 'LaravelLocalizationRedirectFilter|auth.admin|permissions'], function()
use Illuminate\Routing\Router;
$router->group(['prefix' => LaravelLocalization::setLocale(), 'before' => 'LaravelLocalizationRedirectFilter|auth.admin|permissions'], function(Router $router)
{
Route::group(['prefix' => Config::get('core::core.admin-prefix'), 'namespace' => 'Modules\Workshop\Http\Controllers'],
function () {
Route::get('modules', ['as' => 'dashboard.modules.index', 'uses' => 'ModulesController@index']);
Route::post('modules', ['as' => 'dashboard.modules.store', 'uses' => 'ModulesController@store']);
$router->group(['prefix' => Config::get('core::core.admin-prefix'), 'namespace' => 'Modules\Workshop\Http\Controllers'],
function (Router $router) {
$router->get('modules', ['as' => 'dashboard.modules.index', 'uses' => 'ModulesController@index']);
$router->post('modules', ['as' => 'dashboard.modules.store', 'uses' => 'ModulesController@store']);
# Workbench
Route::get('workbench', ['as' => 'dashboard.workbench.index', 'uses' => 'WorkbenchController@index']);
Route::post('generate', ['as' => 'dashboard.workbench.generate.index', 'uses' => 'WorkbenchController@generate']);
Route::post('migrate', ['as' => 'dashboard.workbench.migrate.index', 'uses' => 'WorkbenchController@migrate']);
Route::post('install', ['as' => 'dashboard.workbench.install.index', 'uses' => 'WorkbenchController@install']);
Route::post('seed', ['as' => 'dashboard.workbench.seed.index', 'uses' => 'WorkbenchController@seed']);
$router->get('workbench', ['as' => 'dashboard.workbench.index', 'uses' => 'WorkbenchController@index']);
$router->post('generate', ['as' => 'dashboard.workbench.generate.index', 'uses' => 'WorkbenchController@generate']);
$router->post('migrate', ['as' => 'dashboard.workbench.migrate.index', 'uses' => 'WorkbenchController@migrate']);
$router->post('install', ['as' => 'dashboard.workbench.install.index', 'uses' => 'WorkbenchController@install']);
$router->post('seed', ['as' => 'dashboard.workbench.seed.index', 'uses' => 'WorkbenchController@seed']);
}
);
});
<?php namespace Modules\Workshop\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\Workshop\Http\Controllers';
/**
* The controllers to scan for route annotations.
*
* @var array
*/
protected $scan = [
'Modules\Workshop\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';
}
}
......@@ -24,7 +24,6 @@
</ul>
<div class="tab-content">
<div class="tab-pane active" id="tab_1-1">
@include('flash::message')
<ul>
@foreach($modules as $module)
<li>
......
@include('flash::message')
<div class="row">
<div class="col-md-6">
{!! Form::open(['route' => 'dashboard.workbench.generate.index', 'method' => 'post']) !!}
......
@include('flash::message')
{!! Form::open(['route' => 'dashboard.workbench.migrate.index', 'method' => 'post']) !!}
<div class="box-body">
<div class='form-group{{ $errors->has('module') ? ' has-error' : '' }}'>
......
@include('flash::message')
{!! Form::open(['route' => 'dashboard.workbench.seed.index', 'method' => 'post']) !!}
<div class="box-body">
<div class='form-group{{ $errors->has('module') ? ' has-error' : '' }}'>
......
......@@ -6,6 +6,7 @@
],
"active": 1,
"providers": [
"Modules\\Workshop\\Providers\\RouteServiceProvider",
"Modules\\Workshop\\Providers\\WorkshopServiceProvider"
]
}
......@@ -2,3 +2,4 @@
[![SensioLabsInsight](https://insight.sensiolabs.com/projects/d6258dc8-cd2a-4288-94a5-8a8089e6609e/mini.png)](https://insight.sensiolabs.com/projects/d6258dc8-cd2a-4288-94a5-8a8089e6609e)
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/nWidart-Modules/Workshop/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/nWidart-Modules/Workshop/?branch=master)
[![Code Climate](https://codeclimate.com/github/nWidart-Modules/Workshop/badges/gpa.svg)](https://codeclimate.com/github/nWidart-Modules/Workshop)
......@@ -16,14 +16,4 @@ Lang::addNamespace('workshop', __DIR__ . '/Resources/lang/');
Config::addNamespace('workshop', __DIR__ . '/Config/');
/*
|--------------------------------------------------------------------------
| Require The Routes file.
|--------------------------------------------------------------------------
|
| Next, this module will load filters and routes file.
|
*/
require __DIR__ . '/Http/routes.php';
require __DIR__ . '/composers.php';
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