Skip to content

Commit

Permalink
Replacing URL::route() by route() helper
Browse files Browse the repository at this point in the history
  • Loading branch information
nWidart committed Sep 14, 2017
1 parent fa617af commit 8e183ca
Show file tree
Hide file tree
Showing 21 changed files with 57 additions and 59 deletions.
6 changes: 3 additions & 3 deletions Modules/Media/Resources/views/admin/edit.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
{{ trans('media::media.title.edit media') }} <small>{{ $file->filename }}</small>
</h1>
<ol class="breadcrumb">
<li><a href="{{ URL::route('dashboard.index') }}"><i class="fa fa-dashboard"></i> {{ trans('core::core.breadcrumb.home') }}</a></li>
<li><a href="{{ URL::route('admin.media.media.index') }}">{{ trans('media::media.title.media') }}</a></li>
<li><a href="{{ route('dashboard.index') }}"><i class="fa fa-dashboard"></i> {{ trans('core::core.breadcrumb.home') }}</a></li>
<li><a href="{{ route('admin.media.media.index') }}">{{ trans('media::media.title.media') }}</a></li>
<li class="active">{{ trans('media::media.title.edit media') }}</li>
</ol>
@stop
Expand All @@ -29,7 +29,7 @@
@tags('asgardcms/media', $file)
<div class="box-footer">
<button type="submit" class="btn btn-primary btn-flat">{{ trans('core::core.button.update') }}</button>
<a class="btn btn-danger pull-right btn-flat" href="{{ URL::route('admin.media.media.index')}}"><i class="fa fa-times"></i> {{ trans('core::core.button.cancel') }}</a>
<a class="btn btn-danger pull-right btn-flat" href="{{ route('admin.media.media.index')}}"><i class="fa fa-times"></i> {{ trans('core::core.button.cancel') }}</a>
</div>
</div>
</div> {{-- end nav-tabs-custom --}}
Expand Down
6 changes: 3 additions & 3 deletions Modules/Menu/Resources/views/admin/menuitems/create.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
{{ trans('menu::menu.titles.create menu item') }}
</h1>
<ol class="breadcrumb">
<li><a href="{{ URL::route('dashboard.index') }}"><i class="fa fa-dashboard"></i> {{ trans('core::core.breadcrumb.home') }}</a></li>
<li><a href="{{ URL::route('admin.menu.menu.index') }}">{{ trans('menu::menu.breadcrumb.menu') }}</a></li>
<li><a href="{{ route('dashboard.index') }}"><i class="fa fa-dashboard"></i> {{ trans('core::core.breadcrumb.home') }}</a></li>
<li><a href="{{ route('admin.menu.menu.index') }}">{{ trans('menu::menu.breadcrumb.menu') }}</a></li>
<li>{{ trans('menu::menu.breadcrumb.create menu item') }}</li>
</ol>
@stop
Expand Down Expand Up @@ -52,7 +52,7 @@
</div>
<div class="box-footer">
<button type="submit" class="btn btn-primary btn-flat">{{ trans('core::core.button.create') }}</button>
<a class="btn btn-danger pull-right btn-flat" href="{{ URL::route('admin.menu.menu.edit', [$menu->id])}}"><i class="fa fa-times"></i> {{ trans('core::core.button.cancel') }}</a>
<a class="btn btn-danger pull-right btn-flat" href="{{ route('admin.menu.menu.edit', [$menu->id])}}"><i class="fa fa-times"></i> {{ trans('core::core.button.cancel') }}</a>
</div>
</div>
<div class="col-md-3">
Expand Down
6 changes: 3 additions & 3 deletions Modules/Menu/Resources/views/admin/menuitems/edit.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
{{ trans('menu::menu.titles.edit menu item') }}
</h1>
<ol class="breadcrumb">
<li><a href="{{ URL::route('dashboard.index') }}"><i class="fa fa-dashboard"></i> {{ trans('core::core.breadcrumb.home') }}</a></li>
<li><a href="{{ URL::route('admin.menu.menu.index') }}">{{ trans('menu::menu.breadcrumb.menu') }}</a></li>
<li><a href="{{ route('dashboard.index') }}"><i class="fa fa-dashboard"></i> {{ trans('core::core.breadcrumb.home') }}</a></li>
<li><a href="{{ route('admin.menu.menu.index') }}">{{ trans('menu::menu.breadcrumb.menu') }}</a></li>
<li>{{ trans('menu::menu.breadcrumb.edit menu item') }}</li>
</ol>
@stop
Expand Down Expand Up @@ -52,7 +52,7 @@
</div>
<div class="box-footer">
<button type="submit" class="btn btn-primary btn-flat">{{ trans('core::core.button.update') }}</button>
<a class="btn btn-danger pull-right btn-flat" href="{{ URL::route('admin.menu.menu.edit', [$menu->id])}}"><i class="fa fa-times"></i> {{ trans('core::core.button.cancel') }}</a>
<a class="btn btn-danger pull-right btn-flat" href="{{ route('admin.menu.menu.edit', [$menu->id])}}"><i class="fa fa-times"></i> {{ trans('core::core.button.cancel') }}</a>
</div>
</div>
<div class="col-md-3">
Expand Down
6 changes: 3 additions & 3 deletions Modules/Menu/Resources/views/admin/menus/create.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
{{ trans('menu::menu.titles.create menu') }}
</h1>
<ol class="breadcrumb">
<li><a href="{{ URL::route('dashboard.index') }}"><i class="fa fa-dashboard"></i> {{ trans('core::core.breadcrumb.home') }}</a></li>
<li><a href="{{ URL::route('admin.menu.menu.index') }}">{{ trans('menu::menu.breadcrumb.menu') }}</a></li>
<li><a href="{{ route('dashboard.index') }}"><i class="fa fa-dashboard"></i> {{ trans('core::core.breadcrumb.home') }}</a></li>
<li><a href="{{ route('admin.menu.menu.index') }}">{{ trans('menu::menu.breadcrumb.menu') }}</a></li>
<li>{{ trans('menu::menu.breadcrumb.create menu') }}</li>
</ol>
@stop
Expand Down Expand Up @@ -52,7 +52,7 @@
</div>
<div class="box-footer">
<button type="submit" class="btn btn-primary btn-flat">{{ trans('core::core.button.create') }}</button>
<a class="btn btn-danger pull-right btn-flat" href="{{ URL::route('admin.menu.menu.index')}}"><i class="fa fa-times"></i> {{ trans('core::core.button.cancel') }}</a>
<a class="btn btn-danger pull-right btn-flat" href="{{ route('admin.menu.menu.index')}}"><i class="fa fa-times"></i> {{ trans('core::core.button.cancel') }}</a>
</div>
</div>
</div>
Expand Down
8 changes: 4 additions & 4 deletions Modules/Menu/Resources/views/admin/menus/edit.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
{{ trans('menu::menu.titles.edit menu') }}
</h1>
<ol class="breadcrumb">
<li><a href="{{ URL::route('dashboard.index') }}"><i class="fa fa-dashboard"></i> {{ trans('core::core.breadcrumb.home') }}</a></li>
<li><a href="{{ URL::route('admin.menu.menu.index') }}">{{ trans('menu::menu.breadcrumb.menu') }}</a></li>
<li><a href="{{ route('dashboard.index') }}"><i class="fa fa-dashboard"></i> {{ trans('core::core.breadcrumb.home') }}</a></li>
<li><a href="{{ route('admin.menu.menu.index') }}">{{ trans('menu::menu.breadcrumb.menu') }}</a></li>
<li>{{ trans('menu::menu.breadcrumb.edit menu') }}</li>
</ol>
@stop
Expand All @@ -21,7 +21,7 @@
<div class="col-md-6">
<div class="row">
<div class="btn-group pull-right" style="margin: 0 15px 15px 0;">
<a href="{{ URL::route('dashboard.menuitem.create', [$menu->id]) }}" class="btn btn-primary btn-flat">
<a href="{{ route('dashboard.menuitem.create', [$menu->id]) }}" class="btn btn-primary btn-flat">
<i class="fa fa-pencil"></i> {{ trans('menu::menu.button.create menu item') }}
</a>
</div>
Expand Down Expand Up @@ -70,7 +70,7 @@
</div>
<div class="box-footer">
<button type="submit" class="btn btn-primary btn-flat">{{ trans('core::core.button.update') }}</button>
<a class="btn btn-danger pull-right btn-flat" href="{{ URL::route('admin.menu.menu.index')}}"><i class="fa fa-times"></i> {{ trans('core::core.button.cancel') }}</a>
<a class="btn btn-danger pull-right btn-flat" href="{{ route('admin.menu.menu.index')}}"><i class="fa fa-times"></i> {{ trans('core::core.button.cancel') }}</a>
</div>
</div>
</div>
Expand Down
10 changes: 5 additions & 5 deletions Modules/Menu/Resources/views/admin/menus/index.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
{{ trans('menu::menu.titles.menu') }}
</h1>
<ol class="breadcrumb">
<li><a href="{{ URL::route('dashboard.index') }}"><i class="fa fa-dashboard"></i> {{ trans('core::core.breadcrumb.home') }}</a></li>
<li><a href="{{ route('dashboard.index') }}"><i class="fa fa-dashboard"></i> {{ trans('core::core.breadcrumb.home') }}</a></li>
<li class="active">{{ trans('menu::menu.breadcrumb.menu') }}</li>
</ol>
@stop
Expand All @@ -15,7 +15,7 @@
<div class="col-md-12">
<div class="row">
<div class="btn-group pull-right" style="margin: 0 15px 15px 0;">
<a href="{{ URL::route('admin.menu.menu.create') }}" class="btn btn-primary btn-flat">
<a href="{{ route('admin.menu.menu.create') }}" class="btn btn-primary btn-flat">
<i class="fa fa-pencil"></i> {{ trans('menu::menu.button.create menu') }}
</a>
</div>
Expand All @@ -38,18 +38,18 @@
<?php foreach ($menus as $menu): ?>
<tr>
<td>
<a href="{{ URL::route('admin.menu.menu.edit', [$menu->id]) }}">
<a href="{{ route('admin.menu.menu.edit', [$menu->id]) }}">
{{ $menu->name }}
</a>
</td>
<td>
<a href="{{ URL::route('admin.menu.menu.edit', [$menu->id]) }}">
<a href="{{ route('admin.menu.menu.edit', [$menu->id]) }}">
{{ $menu->title }}
</a>
</td>
<td>
<div class="btn-group">
<a href="{{ URL::route('admin.menu.menu.edit', [$menu->id]) }}" class="btn btn-default btn-flat"><i class="glyphicon glyphicon-pencil"></i></a>
<a href="{{ route('admin.menu.menu.edit', [$menu->id]) }}" class="btn btn-default btn-flat"><i class="glyphicon glyphicon-pencil"></i></a>
<button class="btn btn-danger btn-flat" data-toggle="modal" data-target="#confirmation-{{ $menu->id }}"><i class="glyphicon glyphicon-trash"></i></button>
</div>
</td>
Expand Down
4 changes: 1 addition & 3 deletions Modules/Menu/Services/MenuRenderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

namespace Modules\Menu\Services;

use Illuminate\Support\Facades\URL;

class MenuRenderer
{
/**
Expand Down Expand Up @@ -48,7 +46,7 @@ private function generateHtmlFor($items)
$this->menu .= '<ol class="dd-list">';
foreach ($items as $item) {
$this->menu .= "<li class=\"dd-item\" data-id=\"{$item->id}\">";
$editLink = URL::route('dashboard.menuitem.edit', [$this->menuId, $item->id]);
$editLink = route('dashboard.menuitem.edit', [$this->menuId, $item->id]);
$style = $item->isRoot() ? 'none' : 'inline';
$this->menu .= <<<HTML
<div class="btn-group" role="group" aria-label="Action buttons" style="display: {$style}">
Expand Down
4 changes: 2 additions & 2 deletions Modules/Page/Resources/views/admin/create.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
{{ trans('page::pages.create page') }}
</h1>
<ol class="breadcrumb">
<li><a href="{{ URL::route('dashboard.index') }}"><i class="fa fa-dashboard"></i> {{ trans('core::core.breadcrumb.home') }}</a></li>
<li><a href="{{ URL::route('admin.page.page.index') }}">{{ trans('page::pages.pages') }}</a></li>
<li><a href="{{ route('dashboard.index') }}"><i class="fa fa-dashboard"></i> {{ trans('core::core.breadcrumb.home') }}</a></li>
<li><a href="{{ route('admin.page.page.index') }}">{{ trans('page::pages.pages') }}</a></li>
<li class="active">{{ trans('page::pages.create page') }}</li>
</ol>
@stop
Expand Down
4 changes: 2 additions & 2 deletions Modules/Page/Resources/views/admin/edit.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
{{ trans('page::pages.edit page') }}
</h1>
<ol class="breadcrumb">
<li><a href="{{ URL::route('dashboard.index') }}"><i class="fa fa-dashboard"></i> {{ trans('core::core.breadcrumb.home') }}</a></li>
<li><a href="{{ URL::route('admin.page.page.index') }}">{{ trans('page::pages.pages') }}</a></li>
<li><a href="{{ route('dashboard.index') }}"><i class="fa fa-dashboard"></i> {{ trans('core::core.breadcrumb.home') }}</a></li>
<li><a href="{{ route('admin.page.page.index') }}">{{ trans('page::pages.pages') }}</a></li>
<li class="active">{{ trans('page::pages.edit page') }}</li>
</ol>
@stop
Expand Down
2 changes: 1 addition & 1 deletion Modules/Page/Resources/views/admin/index.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
{{ trans('page::pages.pages') }}
</h1>
<ol class="breadcrumb">
<li><a href="{{ URL::route('dashboard.index') }}"><i class="fa fa-dashboard"></i> {{ trans('core::core.breadcrumb.home') }}</a></li>
<li><a href="{{ route('dashboard.index') }}"><i class="fa fa-dashboard"></i> {{ trans('core::core.breadcrumb.home') }}</a></li>
<li class="active">{{ trans('page::pages.pages') }}</li>
</ol>
@stop
Expand Down
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
</h1>
<ol class="breadcrumb">
<li><a href="#"><i class="fa fa-dashboard"></i> {{ trans('core::core.breadcrumb.home') }}</a></li>
<li><a href="{{ URL::route('admin.setting.settings.index') }}"><i class="fa fa-cog"></i> {{ trans('setting::settings.breadcrumb.settings') }}</a></li>
<li><a href="{{ route('admin.setting.settings.index') }}"><i class="fa fa-cog"></i> {{ trans('setting::settings.breadcrumb.settings') }}</a></li>
<li class="active"><i class="fa fa-cog"></i> {{ trans('setting::settings.breadcrumb.module settings', ['module' => ucfirst($currentModule)]) }}</li>
</ol>
@stop
Expand All @@ -28,7 +28,7 @@
<ul class="nav nav-list">
<?php foreach ($modulesWithSettings as $module => $settings): ?>
<li>
<a href="{{ URL::route('dashboard.module.settings', [$module]) }}"
<a href="{{ route('dashboard.module.settings', [$module]) }}"
class="{{ $module === $currentModule->getName() ? 'active' : '' }}">
{{ ucfirst($module) }}
<small class="badge pull-right bg-blue">{{ count($settings) }}</small>
Expand Down Expand Up @@ -72,7 +72,7 @@ class="{{ $module === $currentModule->getName() ? 'active' : '' }}">
<?php endif; ?>
<div class="box-footer">
<button type="submit" class="btn btn-primary btn-flat">{{ trans('core::core.button.update') }}</button>
<a class="btn btn-danger pull-right btn-flat" href="{{ URL::route('admin.setting.settings.index')}}"><i class="fa fa-times"></i> {{ trans('core::core.button.cancel') }}</a>
<a class="btn btn-danger pull-right btn-flat" href="{{ route('admin.setting.settings.index')}}"><i class="fa fa-times"></i> {{ trans('core::core.button.cancel') }}</a>
</div>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
{{ trans('user::users.api-keys') }}
</h1>
<ol class="breadcrumb">
<li><a href="{{ URL::route('dashboard.index') }}"><i class="fa fa-dashboard"></i> {{ trans('core::core.breadcrumb.home') }}</a></li>
<li><a href="{{ route('dashboard.index') }}"><i class="fa fa-dashboard"></i> {{ trans('core::core.breadcrumb.home') }}</a></li>
<li class="active">{{ trans('user::users.api-keys') }}</li>
</ol>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
{{ trans('user::users.title.edit-profile') }}
</h1>
<ol class="breadcrumb">
<li><a href="{{ URL::route('dashboard.index') }}"><i class="fa fa-dashboard"></i> {{ trans('core::core.breadcrumb.home') }}</a></li>
<li><a href="{{ route('dashboard.index') }}"><i class="fa fa-dashboard"></i> {{ trans('core::core.breadcrumb.home') }}</a></li>
<li class="active">{{ trans('user::users.breadcrumb.edit-profile') }}</li>
</ol>
@stop
Expand Down
6 changes: 3 additions & 3 deletions Modules/User/Resources/views/admin/roles/create.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
@section('content-header')
<h1>New Role</h1>
<ol class="breadcrumb">
<li><a href="{{ URL::route('dashboard.index') }}"><i class="fa fa-dashboard"></i> {{ trans('core::core.breadcrumb.home') }}</a></li>
<li class=""><a href="{{ URL::route('admin.user.role.index') }}">{{ trans('user::roles.breadcrumb.roles') }}</a></li>
<li><a href="{{ route('dashboard.index') }}"><i class="fa fa-dashboard"></i> {{ trans('core::core.breadcrumb.home') }}</a></li>
<li class=""><a href="{{ route('admin.user.role.index') }}">{{ trans('user::roles.breadcrumb.roles') }}</a></li>
<li class="active">{{ trans('user::roles.breadcrumb.new') }}</li>
</ol>
@stop
Expand Down Expand Up @@ -44,7 +44,7 @@
</div>
<div class="box-footer">
<button type="submit" class="btn btn-primary btn-flat">{{ trans('user::button.create') }}</button>
<a class="btn btn-danger pull-right btn-flat" href="{{ URL::route('admin.user.role.index')}}"><i class="fa fa-times"></i> {{ trans('user::button.cancel') }}</a>
<a class="btn btn-danger pull-right btn-flat" href="{{ route('admin.user.role.index')}}"><i class="fa fa-times"></i> {{ trans('user::button.cancel') }}</a>
</div>
</div>
</div>
Expand Down
8 changes: 4 additions & 4 deletions Modules/User/Resources/views/admin/roles/edit.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
{{ trans('user::roles.title.edit') }} <small>{{ $role->name }}</small>
</h1>
<ol class="breadcrumb">
<li><a href="{{ URL::route('dashboard.index') }}"><i class="fa fa-dashboard"></i> {{ trans('core::core.breadcrumb.home') }}</a></li>
<li class=""><a href="{{ URL::route('admin.user.role.index') }}">{{ trans('user::roles.breadcrumb.roles') }}</a></li>
<li><a href="{{ route('dashboard.index') }}"><i class="fa fa-dashboard"></i> {{ trans('core::core.breadcrumb.home') }}</a></li>
<li class=""><a href="{{ route('admin.user.role.index') }}">{{ trans('user::roles.breadcrumb.roles') }}</a></li>
<li class="active">{{ trans('user::roles.breadcrumb.edit') }}</li>
</ol>
@stop
Expand Down Expand Up @@ -53,7 +53,7 @@
<ul>
<?php foreach ($role->users as $user): ?>
<li>
<a href="{{ URL::route('admin.user.user.edit', [$user->id]) }}">{{ $user->present()->fullname() }}</a>
<a href="{{ route('admin.user.user.edit', [$user->id]) }}">{{ $user->present()->fullname() }}</a>
</li>
<?php endforeach; ?>
</ul>
Expand All @@ -63,7 +63,7 @@
</div>
<div class="box-footer">
<button type="submit" class="btn btn-primary btn-flat">{{ trans('user::button.update') }}</button>
<a class="btn btn-danger pull-right btn-flat" href="{{ URL::route('admin.user.role.index')}}"><i class="fa fa-times"></i> {{ trans('user::button.cancel') }}</a>
<a class="btn btn-danger pull-right btn-flat" href="{{ route('admin.user.role.index')}}"><i class="fa fa-times"></i> {{ trans('user::button.cancel') }}</a>
</div>
</div><!-- /.tab-content -->
</div>
Expand Down
10 changes: 5 additions & 5 deletions Modules/User/Resources/views/admin/roles/index.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
{{ trans('user::roles.title.roles') }}
</h1>
<ol class="breadcrumb">
<li><a href="{{ URL::route('dashboard.index') }}"><i class="fa fa-dashboard"></i> {{ trans('core::core.breadcrumb.home') }}</a></li>
<li><a href="{{ route('dashboard.index') }}"><i class="fa fa-dashboard"></i> {{ trans('core::core.breadcrumb.home') }}</a></li>
<li class="active">{{ trans('user::roles.breadcrumb.roles') }}</li>
</ol>
@stop
Expand All @@ -15,7 +15,7 @@
<div class="col-xs-12">
<div class="row">
<div class="btn-group pull-right" style="margin: 0 15px 15px 0;">
<a href="{{ URL::route('admin.user.role.create') }}" class="btn btn-primary btn-flat" style="padding: 4px 10px;">
<a href="{{ route('admin.user.role.create') }}" class="btn btn-primary btn-flat" style="padding: 4px 10px;">
<i class="fa fa-pencil"></i> {{ trans('user::roles.button.new-role') }}
</a>
</div>
Expand All @@ -39,17 +39,17 @@
<?php foreach ($roles as $role): ?>
<tr>
<td>
<a href="{{ URL::route('admin.user.role.edit', [$role->id]) }}">
<a href="{{ route('admin.user.role.edit', [$role->id]) }}">
{{ $role->id }}
</a>
</td>
<td>
<a href="{{ URL::route('admin.user.role.edit', [$role->id]) }}">
<a href="{{ route('admin.user.role.edit', [$role->id]) }}">
{{ $role->name }}
</a>
</td>
<td>
<a href="{{ URL::route('admin.user.role.edit', [$role->id]) }}">
<a href="{{ route('admin.user.role.edit', [$role->id]) }}">
{{ $role->created_at }}
</a>
</td>
Expand Down
Loading

0 comments on commit 8e183ca

Please sign in to comment.