Skip to content

Commit

Permalink
Merge branch 'development'
Browse files Browse the repository at this point in the history
  • Loading branch information
rappasoft committed Jul 2, 2020
2 parents ae39f20 + 18167e8 commit 886fd7b
Show file tree
Hide file tree
Showing 8 changed files with 604 additions and 583 deletions.
13 changes: 12 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,16 @@ All notable changes to this project will be documented in this file.

## [Unreleased]

## [7.0.3] - 2020-07-01

## Changed

- Updated breadcrumbs to be more readable
- Update link utility to allow slot
- Add note for Gate::after in AuthServiceProvider if wanted
- Change title bar delimiter from - to |
- Update yarn and composer

## [7.0.2] - 2020-06-28

## Changed
Expand Down Expand Up @@ -201,7 +211,8 @@ Started from scratch with a blank Laravel 7.* installation. This release is not
- Fix yarn tests
- Fix: Socially logged in users get assigned the default role

[Unreleased]: https://github.com/rappasoft/laravel-boilerplate/compare/v7.0.2...development
[Unreleased]: https://github.com/rappasoft/laravel-boilerplate/compare/v7.0.3...development
[7.0.3]: https://github.com/rappasoft/laravel-boilerplate/compare/v7.0.2...v7.0.3
[7.0.2]: https://github.com/rappasoft/laravel-boilerplate/compare/v7.0.1...v7.0.2
[7.0.1]: https://github.com/rappasoft/laravel-boilerplate/compare/v7.0.0...v7.0.1
[7.0.0]: https://github.com/rappasoft/laravel-boilerplate/compare/v6.0.3...v7.0.0
Expand Down
5 changes: 5 additions & 0 deletions app/Providers/AuthServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,10 @@ public function boot()
Gate::before(function ($user) {
return $user->isAdmin() ? true : null;
});

// Learn when to use this instead: https://docs.spatie.be/laravel-permission/v3/basic-usage/super-admin/#gate-after
// Gate::after(function ($user) {
// return $user->isAdmin();
// });
}
}
40 changes: 23 additions & 17 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion resources/views/backend/layouts/app.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="csrf-token" content="{{ csrf_token() }}">
<title>{{ appName() }} - @yield('title')</title>
<title>{{ appName() }} | @yield('title')</title>
<meta name="description" content="@yield('meta_description', appName())">
<meta name="author" content="@yield('meta_author', 'Anthony Rappa')">
@yield('meta')
Expand Down
4 changes: 2 additions & 2 deletions resources/views/components/utils/link.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
@if ($permission)
@if ($logged_in_user->can($permission))
@if (!$hide)
<a {{ $attributes->merge(['href' => '#', 'class' => $active]) }}>@if ($icon)<i class="{{ $icon }}"></i> @endif{{ $text }}</a>
<a {{ $attributes->merge(['href' => '#', 'class' => $active]) }}>@if ($icon)<i class="{{ $icon }}"></i> @endif{{ strlen($text) ? $text : $slot }}</a>
@endif
@endif
@else
@if (!$hide)
<a {{ $attributes->merge(['href' => '#', 'class' => $active]) }}>@if ($icon)<i class="{{ $icon }}"></i> @endif{{ $text }}</a>
<a {{ $attributes->merge(['href' => '#', 'class' => $active]) }}>@if ($icon)<i class="{{ $icon }}"></i> @endif{{ strlen($text) ? $text : $slot }}</a>
@endif
@endif
2 changes: 1 addition & 1 deletion resources/views/frontend/layouts/app.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="csrf-token" content="{{ csrf_token() }}">
<title>{{ appName() }} - @yield('title')</title>
<title>{{ appName() }} | @yield('title')</title>
<meta name="description" content="@yield('meta_description', appName())">
<meta name="author" content="@yield('meta_author', 'Anthony Rappa')">
@yield('meta')
Expand Down
10 changes: 5 additions & 5 deletions routes/backend/auth.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@
Route::get('edit', [UserController::class, 'edit'])
->name('edit')
->breadcrumbs(function (Trail $trail, User $user) {
$trail->parent('admin.auth.user.index')
->push(__('Editing :user', ['user' => $user->name]), route('admin.auth.user.edit', $user));
$trail->parent('admin.auth.user.show', $user)
->push(__('Edit'), route('admin.auth.user.edit', $user));
});

Route::patch('/', [UserController::class, 'update'])->name('update');
Expand Down Expand Up @@ -82,7 +82,7 @@
->middleware('permission:access.user.list')
->breadcrumbs(function (Trail $trail, User $user) {
$trail->parent('admin.auth.user.index')
->push(__('Viewing :user', ['user' => $user->name]), route('admin.auth.user.show', $user));
->push($user->name, route('admin.auth.user.show', $user));
});

Route::patch('mark/{status}', [DeactivatedUserController::class, 'update'])
Expand All @@ -98,8 +98,8 @@
->name('change-password')
->middleware('permission:access.user.change-password')
->breadcrumbs(function (Trail $trail, User $user) {
$trail->parent('admin.auth.user.index')
->push(__('Changing Password for :user', ['user' => $user->name]), route('admin.auth.user.change-password', $user));
$trail->parent('admin.auth.user.show', $user)
->push(__('Change Password'), route('admin.auth.user.change-password', $user));
});

Route::patch('password/change', [UserPasswordController::class, 'update'])
Expand Down
Loading

0 comments on commit 886fd7b

Please sign in to comment.