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; <?php namespace Modules\Workshop\Composers;
use Illuminate\Contracts\View\View;
use Modules\Workshop\Manager\ModuleManager; use Modules\Workshop\Manager\ModuleManager;
class MigrateViewComposer class MigrateViewComposer
...@@ -14,8 +15,8 @@ class MigrateViewComposer ...@@ -14,8 +15,8 @@ class MigrateViewComposer
$this->module = $module; $this->module = $module;
} }
public function compose($view) public function compose(View $view)
{ {
$view->modules = $this->module->enabled(); $view->modules = $this->module->enabled();
} }
} }
\ No newline at end of file
...@@ -23,4 +23,4 @@ return [ ...@@ -23,4 +23,4 @@ return [
'seed' => [ 'seed' => [
'seed' 'seed'
] ]
]; ];
\ No newline at end of file
...@@ -14,8 +14,6 @@ class WorkshopDatabaseSeeder extends Seeder ...@@ -14,8 +14,6 @@ class WorkshopDatabaseSeeder extends Seeder
public function run() public function run()
{ {
Model::unguard(); Model::unguard();
// $this->call("OthersTableSeeder");
} }
} }
\ No newline at end of file
...@@ -46,4 +46,4 @@ class ModulesController extends AdminBaseController ...@@ -46,4 +46,4 @@ class ModulesController extends AdminBaseController
Flash::success('Modules configuration saved!'); Flash::success('Modules configuration saved!');
return Redirect::route('dashboard.modules.index'); return Redirect::route('dashboard.modules.index');
} }
} }
\ No newline at end of file
...@@ -86,4 +86,4 @@ class WorkbenchController extends AdminBaseController ...@@ -86,4 +86,4 @@ class WorkbenchController extends AdminBaseController
Flash::message($output->fetch()); Flash::message($output->fetch());
return Redirect::route('dashboard.workbench.index'); return Redirect::route('dashboard.workbench.index');
} }
} }
\ No newline at end of file
...@@ -20,4 +20,4 @@ class GenerateModuleRequest extends FormRequest ...@@ -20,4 +20,4 @@ class GenerateModuleRequest extends FormRequest
{ {
return []; return [];
} }
} }
\ No newline at end of file
...@@ -20,4 +20,4 @@ class InstallModuleRequest extends FormRequest ...@@ -20,4 +20,4 @@ class InstallModuleRequest extends FormRequest
{ {
return []; return [];
} }
} }
\ No newline at end of file
...@@ -20,4 +20,4 @@ class MigrateModuleRequest extends FormRequest ...@@ -20,4 +20,4 @@ class MigrateModuleRequest extends FormRequest
{ {
return []; return [];
} }
} }
\ No newline at end of file
...@@ -18,4 +18,4 @@ class ModulesRequest extends FormRequest ...@@ -18,4 +18,4 @@ class ModulesRequest extends FormRequest
{ {
return []; return [];
} }
} }
\ No newline at end of file
...@@ -20,4 +20,4 @@ class SeedModuleRequest extends FormRequest ...@@ -20,4 +20,4 @@ class SeedModuleRequest extends FormRequest
{ {
return []; return [];
} }
} }
\ No newline at end of file
<?php <?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'], $router->group(['prefix' => Config::get('core::core.admin-prefix'), 'namespace' => 'Modules\Workshop\Http\Controllers'],
function () { function (Router $router) {
Route::get('modules', ['as' => 'dashboard.modules.index', 'uses' => 'ModulesController@index']); $router->get('modules', ['as' => 'dashboard.modules.index', 'uses' => 'ModulesController@index']);
Route::post('modules', ['as' => 'dashboard.modules.store', 'uses' => 'ModulesController@store']); $router->post('modules', ['as' => 'dashboard.modules.store', 'uses' => 'ModulesController@store']);
# Workbench # Workbench
Route::get('workbench', ['as' => 'dashboard.workbench.index', 'uses' => 'WorkbenchController@index']); $router->get('workbench', ['as' => 'dashboard.workbench.index', 'uses' => 'WorkbenchController@index']);
Route::post('generate', ['as' => 'dashboard.workbench.generate.index', 'uses' => 'WorkbenchController@generate']); $router->post('generate', ['as' => 'dashboard.workbench.generate.index', 'uses' => 'WorkbenchController@generate']);
Route::post('migrate', ['as' => 'dashboard.workbench.migrate.index', 'uses' => 'WorkbenchController@migrate']); $router->post('migrate', ['as' => 'dashboard.workbench.migrate.index', 'uses' => 'WorkbenchController@migrate']);
Route::post('install', ['as' => 'dashboard.workbench.install.index', 'uses' => 'WorkbenchController@install']); $router->post('install', ['as' => 'dashboard.workbench.install.index', 'uses' => 'WorkbenchController@install']);
Route::post('seed', ['as' => 'dashboard.workbench.seed.index', 'uses' => 'WorkbenchController@seed']); $router->post('seed', ['as' => 'dashboard.workbench.seed.index', 'uses' => 'WorkbenchController@seed']);
} }
); );
}); });
...@@ -92,4 +92,4 @@ class ModuleManager ...@@ -92,4 +92,4 @@ class ModuleManager
$this->module->enable($moduleToEnable); $this->module->enable($moduleToEnable);
} }
} }
} }
\ No newline at end of file
<?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 @@ ...@@ -24,7 +24,6 @@
</ul> </ul>
<div class="tab-content"> <div class="tab-content">
<div class="tab-pane active" id="tab_1-1"> <div class="tab-pane active" id="tab_1-1">
@include('flash::message')
<ul> <ul>
@foreach($modules as $module) @foreach($modules as $module)
<li> <li>
......
@include('flash::message')
<div class="row"> <div class="row">
<div class="col-md-6"> <div class="col-md-6">
{!! Form::open(['route' => 'dashboard.workbench.generate.index', 'method' => 'post']) !!} {!! Form::open(['route' => 'dashboard.workbench.generate.index', 'method' => 'post']) !!}
...@@ -35,4 +34,4 @@ ...@@ -35,4 +34,4 @@
</div> </div>
{!! Form::close() !!} {!! Form::close() !!}
</div> </div>
</div> </div>
\ No newline at end of file
@include('flash::message')
{!! Form::open(['route' => 'dashboard.workbench.migrate.index', 'method' => 'post']) !!} {!! Form::open(['route' => 'dashboard.workbench.migrate.index', 'method' => 'post']) !!}
<div class="box-body"> <div class="box-body">
<div class='form-group{{ $errors->has('module') ? ' has-error' : '' }}'> <div class='form-group{{ $errors->has('module') ? ' has-error' : '' }}'>
...@@ -10,4 +9,4 @@ ...@@ -10,4 +9,4 @@
<div class="box-footer"> <div class="box-footer">
<button type="submit" class="btn btn-primary btn-flat">{{ trans('workshop::workbench.button.migrate') }}</button> <button type="submit" class="btn btn-primary btn-flat">{{ trans('workshop::workbench.button.migrate') }}</button>
</div> </div>
{!! Form::close() !!} {!! Form::close() !!}
\ No newline at end of file
@include('flash::message')
{!! Form::open(['route' => 'dashboard.workbench.seed.index', 'method' => 'post']) !!} {!! Form::open(['route' => 'dashboard.workbench.seed.index', 'method' => 'post']) !!}
<div class="box-body"> <div class="box-body">
<div class='form-group{{ $errors->has('module') ? ' has-error' : '' }}'> <div class='form-group{{ $errors->has('module') ? ' has-error' : '' }}'>
...@@ -10,4 +9,4 @@ ...@@ -10,4 +9,4 @@
<div class="box-footer"> <div class="box-footer">
<button type="submit" class="btn btn-primary btn-flat">{{ trans('workshop::workbench.button.seed') }}</button> <button type="submit" class="btn btn-primary btn-flat">{{ trans('workshop::workbench.button.seed') }}</button>
</div> </div>
{!! Form::close() !!} {!! Form::close() !!}
\ No newline at end of file
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
], ],
"active": 1, "active": 1,
"providers": [ "providers": [
"Modules\\Workshop\\Providers\\RouteServiceProvider",
"Modules\\Workshop\\Providers\\WorkshopServiceProvider" "Modules\\Workshop\\Providers\\WorkshopServiceProvider"
] ]
} }
\ No newline at end of file
# Workshop Module # Workshop Module
[![SensioLabsInsight](https://insight.sensiolabs.com/projects/d6258dc8-cd2a-4288-94a5-8a8089e6609e/mini.png)](https://insight.sensiolabs.com/projects/d6258dc8-cd2a-4288-94a5-8a8089e6609e) [![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) [![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)
\ No newline at end of file [![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/'); ...@@ -16,14 +16,4 @@ Lang::addNamespace('workshop', __DIR__ . '/Resources/lang/');
Config::addNamespace('workshop', __DIR__ . '/Config/'); Config::addNamespace('workshop', __DIR__ . '/Config/');
/* require __DIR__ . '/composers.php';
|--------------------------------------------------------------------------
| 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