Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Platform
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
Platform
Commits
eb207d98
Commit
eb207d98
authored
Sep 27, 2014
by
Nicolas Widart
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Making the module name required
parent
99b203d2
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
8 deletions
+13
-8
WorkbenchController.php
Http/Controllers/WorkbenchController.php
+1
-2
GenerateModuleRequest.php
Http/Requests/GenerateModuleRequest.php
+3
-1
MigrateModuleRequest.php
Http/Requests/MigrateModuleRequest.php
+3
-1
index.blade.php
Resources/views/admin/workbench/index.blade.php
+6
-4
No files found.
Http/Controllers/WorkbenchController.php
View file @
eb207d98
...
...
@@ -28,8 +28,7 @@ class WorkbenchController extends AdminBaseController
public
function
migrate
(
MigrateModuleRequest
$request
)
{
$output
=
new
BufferedOutput
;
$arguments
=
$request
->
name
?
[
'module'
=>
$request
->
name
]
:
[];
Artisan
::
call
(
'module:migrate'
,
$arguments
,
$output
);
Artisan
::
call
(
'module:migrate'
,
[
'module'
=>
$request
->
module
],
$output
);
Flash
::
message
(
$output
->
fetch
());
return
Redirect
::
route
(
'dashboard.workbench.index'
);
...
...
Http/Requests/GenerateModuleRequest.php
View file @
eb207d98
...
...
@@ -6,7 +6,9 @@ class GenerateModuleRequest extends FormRequest
{
public
function
rules
()
{
return
[];
return
[
'name'
=>
'required'
];
}
public
function
authorize
()
...
...
Http/Requests/MigrateModuleRequest.php
View file @
eb207d98
...
...
@@ -6,7 +6,9 @@ class MigrateModuleRequest extends FormRequest
{
public
function
rules
()
{
return
[];
return
[
'module'
=>
'required'
];
}
public
function
authorize
()
...
...
Resources/views/admin/workbench/index.blade.php
View file @
eb207d98
...
...
@@ -23,9 +23,10 @@
@include('flash::message')
{!! Form::open(['route' => 'dashboard.workbench.generate.index', 'method' => 'post']) !!}
<div class="
box
-
body
">
<div class='form-group'>
<div class='form-group
{{
$errors->has
('name') ? ' has-error' : '' }}
'>
{!! Form::label('name', 'Module Name:') !!}
{!! Form::text('name', Input::old('name'), ['class' => 'form-control', 'placeholder' => 'Module Name']) !!}
{!!
$errors->first
('name', '<span class="
help
-
block
">:message</span>') !!}
</div>
</div>
<div class="
box
-
footer
">
...
...
@@ -37,9 +38,10 @@
@include('flash::message')
{!! Form::open(['route' => 'dashboard.workbench.migrate.index', 'method' => 'post']) !!}
<div class="
box
-
body
">
<div class='form-group'>
{!! Form::label('name', 'Module Name:') !!}
{!! Form::text('name', Input::old('name'), ['class' => 'form-control', 'placeholder' => 'Module Name']) !!}
<div class='form-group{{
$errors->has
('module') ? ' has-error' : '' }}'>
{!! Form::label('module', 'Module Name:') !!}
{!! Form::text('module', Input::old('name'), ['class' => 'form-control', 'placeholder' => 'Module Name']) !!}
{!!
$errors->first
('module', '<span class="
help
-
block
">:message</span>') !!}
</div>
</div>
<div class="
box
-
footer
">
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment