Skip to content

Commit

Permalink
change named routes to kebab case
Browse files Browse the repository at this point in the history
  • Loading branch information
anandiamy committed Jul 9, 2019
1 parent c57853e commit 3806ecf
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions stubs/laravolt/Http/Controllers/Controller.php.stub
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class :ModuleName:Controller extends Controller
{
:ModuleName:::create($request->all());

return redirect()->route(':moduleName:.index')->withSuccess(':ModuleName: saved');
return redirect()->route(':module-name:.index')->withSuccess(':ModuleName: saved');
}

public function show(:ModuleName: $:moduleName:)
Expand All @@ -50,6 +50,6 @@ class :ModuleName:Controller extends Controller
{
$:moduleName:->delete();

return redirect()->route(':moduleName:.index')->withSuccess(':ModuleName: deleted');
return redirect()->route(':module-name:.index')->withSuccess(':ModuleName: deleted');
}
}
6 changes: 3 additions & 3 deletions stubs/laravolt/Resources/views/create.blade.php.stub
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,18 @@
</div>
<div class="right menu">
<div class="item">
<a href="{{ route(':moduleName:.index') }}" class="ui button basic small"><i class="icon angle left"></i>
<a href="{{ route(':module-name:.index') }}" class="ui button basic small"><i class="icon angle left"></i>
Back to index
</a>
</div>
</div>
</div>

{!! form()->post(route(':moduleName:.store'))->multipart() !!}
{!! form()->post(route(':module-name:.store'))->multipart() !!}
:FORM_CREATE_FIELDS:
{!! form()->action([
form()->submit('Save'),
form()->link('Cancel', route(':moduleName:.index'))
form()->link('Cancel', route(':module-name:.index'))
]) !!}
{!! form()->close() !!}

Expand Down
6 changes: 3 additions & 3 deletions stubs/laravolt/Resources/views/edit.blade.php.stub
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,18 @@
</div>
<div class="right menu">
<div class="item">
<a href="{{ route(':moduleName:.index') }}" class="ui button basic small"><i class="icon angle left"></i>
<a href="{{ route(':module-name:.index') }}" class="ui button basic small"><i class="icon angle left"></i>
Back to index
</a>
</div>
</div>
</div>

{!! form()->bind($:moduleName:)->put(route(':moduleName:.update', $:moduleName:->getKey()))->multipart() !!}
{!! form()->bind($:moduleName:)->put(route(':module-name:.update', $:moduleName:->getKey()))->multipart() !!}
:FORM_CREATE_FIELDS:
{!! form()->action([
form()->submit('Save'),
form()->link('Cancel', route(':moduleName:.index'))
form()->link('Cancel', route(':module-name:.index'))
]) !!}

{!! form()->close() !!}
Expand Down
2 changes: 1 addition & 1 deletion stubs/laravolt/Resources/views/index.blade.php.stub
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
</div>
<div class="right menu">
<div class="item">
<a href="{{ route(':moduleName:.create') }}" class="ui button primary"><i class="icon plus"></i> Add</a>
<a href="{{ route(':module-name:.create') }}" class="ui button primary"><i class="icon plus"></i> Add</a>
</div>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion stubs/laravolt/Resources/views/show.blade.php.stub
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
</div>
<div class="right menu">
<div class="item">
<a href="{{ route(':moduleName:.index') }}" class="ui button basic small"><i class="icon angle left"></i>
<a href="{{ route(':module-name:.index') }}" class="ui button basic small"><i class="icon angle left"></i>
Back to index
</a>
</div>
Expand Down
2 changes: 1 addition & 1 deletion stubs/laravolt/TableView/IndexTableView.php.stub
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class IndexTableView extends TableView
return [
Numbering::make('No'),
:TABLE_VIEW_FIELDS:
RestfulButton::make(':moduleName:'),
RestfulButton::make(':module-name:'),
];
}
}

0 comments on commit 3806ecf

Please sign in to comment.