Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ php artisan vendor:publish --tag=laravel-email-database-log-migration
- Use Laravel HTML Facade with [Laravel Collective](https://laravelcollective.com/):

```
{!! html()->link(route('social.redirect', ['provider' => 'twitch']), 'Twitch', array('class' => 'btn btn-lg btn-primary btn-block twitch')) !!}
{!! html()->a(route('social.redirect', ['provider' => 'twitch']), 'Twitch', array('class' => 'btn btn-lg btn-primary btn-block twitch')) !!}
```

### Other API keys
Expand Down
19 changes: 9 additions & 10 deletions app/Http/Controllers/ProfilesController.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,14 @@
use App\Models\User;
use App\Notifications\SendGoodbyeEmail;
use App\Traits\CaptureIpTrait;
use File;
use Illuminate\Database\Eloquent\ModelNotFoundException;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\File;
use Illuminate\Support\Facades\Hash;
use Illuminate\Support\Facades\Session;
use Image;
use Illuminate\Support\Facades\Validator;
use Intervention\Image\Facades\Image;
use jeremykenedy\Uuid\Uuid;
use Validator;
use View;

class ProfilesController extends Controller
{
Expand Down Expand Up @@ -143,7 +142,7 @@ public function update(UpdateUserProfile $request, $username)
*/
public function updateUserAccount(Request $request, $id)
{
$currentUser = \Auth::user();
$currentUser = Auth::user();
$user = User::findOrFail($id);
$emailCheck = ($request->input('email') !== '') && ($request->input('email') !== $user->email);
$ipAddress = new CaptureIpTrait();
Expand Down Expand Up @@ -203,7 +202,7 @@ public function updateUserAccount(Request $request, $id)
*/
public function updateUserPassword(UpdateUserPasswordRequest $request, $id)
{
$currentUser = \Auth::user();
$currentUser = Auth::user();
$user = User::findOrFail($id);
$ipAddress = new CaptureIpTrait();

Expand All @@ -226,7 +225,7 @@ public function updateUserPassword(UpdateUserPasswordRequest $request, $id)
public function upload(Request $request)
{
if ($request->hasFile('file')) {
$currentUser = \Auth::user();
$currentUser = Auth::user();
$avatar = $request->file('file');
$filename = 'avatar.'.$avatar->getClientOriginalExtension();
$save_path = storage_path().'/users/id/'.$currentUser->id.'/uploads/images/avatar/';
Expand Down Expand Up @@ -270,7 +269,7 @@ public function userProfileAvatar($id, $image)
*/
public function deleteUserAccount(DeleteUserAccount $request, $id)
{
$currentUser = \Auth::user();
$currentUser = Auth::user();
$user = User::findOrFail($id);
$ipAddress = new CaptureIpTrait();

Expand Down Expand Up @@ -310,7 +309,7 @@ public function deleteUserAccount(DeleteUserAccount $request, $id)
/**
* Send GoodBye Email Function via Notify.
*
* @param array $user
* @param User $user
* @param string $token
* @return void
*/
Expand Down
2 changes: 1 addition & 1 deletion app/Http/Controllers/ThemesManagementController.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use App\Models\Theme;
use App\Models\User;
use Illuminate\Http\Request;
use Validator;
use Illuminate\Support\Facades\Validator;

class ThemesManagementController extends Controller
{
Expand Down
4 changes: 2 additions & 2 deletions app/Http/Controllers/UsersManagementController.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
use App\Models\Role;
use App\Models\User;
use App\Traits\CaptureIpTrait;
use Auth;
use Illuminate\Http\Request;
use Illuminate\Http\Response;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Hash;
use Validator;
use Illuminate\Support\Facades\Validator;

class UsersManagementController extends Controller
{
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"jeremykenedy/laravel-email-database-log": "^12.0",
"jeremykenedy/laravel-exception-notifier": "^4.1",
"jeremykenedy/laravel-https": "^2.0",
"jeremykenedy/laravel-logger": "^10.0",
"jeremykenedy/laravel-logger": "^11.0",
"jeremykenedy/laravel-phpinfo": "^1.3",
"jeremykenedy/laravel-roles": "^11.5",
"jeremykenedy/laravel2step": "^4.0",
Expand Down Expand Up @@ -101,6 +101,6 @@
"pestphp/pest-plugin": true
}
},
"minimum-stability": "dev",
"minimum-stability": "stable",
"prefer-stable": true
}
2 changes: 0 additions & 2 deletions config/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
use App\Providers\MacroServiceProvider;
use Creativeorange\Gravatar\Facades\Gravatar;
use Illuminate\Support\Facades\Facade;
use Illuminate\Support\Facades\Input;
use Illuminate\Support\Facades\Redis;
use Intervention\Image\Facades\Image;
use jeremykenedy\Uuid\Uuid;
Expand Down Expand Up @@ -220,7 +219,6 @@
'aliases' => Facade::defaultAliases()->merge([
'Redis' => Redis::class,
'Socialite' => Socialite::class,
'Input' => Input::class,
'Gravatar' => Gravatar::class,
'Image' => Image::class,
'Uuid' => Uuid::class,
Expand Down
36 changes: 18 additions & 18 deletions resources/views/profiles/edit.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
</div>
</div>
</div>
{{ html()->model($user->profile) }}
@php( html()->model($user->profile) )
{{ html()->form('POST', route('profile.update', $user->name))
->id('user_profile_form')
->class('form-horizontal')
Expand Down Expand Up @@ -161,11 +161,11 @@
</div>
</div>
{{ html()->form()->close() }}
{{ html()->endModel() }}
@php( html()->endModel() )
</div>

<div class="tab-pane fade edit-settings-tab" role="tabpanel" aria-labelledby="edit-settings-tab">
{{ html()->model($user) }}
@php( html()->model($user) )
{{ html()->form('POST', action([App\Http\Controllers\ProfilesController::class, 'updateUserAccount'], $user->id))
->id('user_basics_form')
->open() }}
Expand Down Expand Up @@ -265,7 +265,7 @@
</div>
</div>
{{ html()->form()->close() }}
{{ html()->endModel() }}
@php( html()->endModel() )
</div>

<div class="tab-pane fade edit-account-tab" role="tabpanel" aria-labelledby="edit-account-tab">
Expand All @@ -289,7 +289,7 @@
{{ trans('profile.changePwTitle') }}
</h3>

{{ html()->model($user) }}
@php( html()->model($user) )
{{ html()->form('POST', action([App\Http\Controllers\ProfilesController::class, 'updateUserPassword'], $user->id))
->attribute('autocomplete', 'new-password')
->open() }}
Expand Down Expand Up @@ -340,7 +340,7 @@
</div>
</div>
{{ html()->form()->close() }}
{{ html()->endModel() }}
@php( html()->endModel() )

</div>

Expand All @@ -357,7 +357,7 @@
<div class="row">
<div class="col-sm-6 offset-sm-3 margin-bottom-3 text-center">

{{ html()->model($user) }}
@php( html()->model($user) )
{{ html()->form('POST', action([App\Http\Controllers\ProfilesController::class, 'deleteUserAccount'], $user->id))
->open() }}

Expand All @@ -374,19 +374,19 @@
</div>

{{ html()->button('<i class="fa fa-trash-o fa-fw" aria-hidden="true"></i>' . trans('profile.deleteAccountBtn'))
->class('btn btn-block btn-danger')
->id('delete_account_trigger')
->disabled()
->type('button')
->attribute('data-toggle', 'modal')
->attribute('data-submit', trans('profile.deleteAccountBtnConfirm'))
->attribute('data-target', '#confirmForm')
->attribute('data-modalClass', 'modal-danger')
->attribute('data-title', trans('profile.deleteAccountConfirmTitle'))
->attribute('data-message', trans('profile.deleteAccountConfirmMsg')) }}
->class('btn btn-block btn-danger')
->id('delete_account_trigger')
->disabled()
->type('button')
->attribute('data-toggle', 'modal')
->attribute('data-submit', trans('profile.deleteAccountBtnConfirm'))
->attribute('data-target', '#confirmForm')
->attribute('data-modalClass', 'modal-danger')
->attribute('data-title', trans('profile.deleteAccountConfirmTitle'))
->attribute('data-message', trans('profile.deleteAccountConfirmMsg')) }}

{{ html()->form()->close() }}
{{ html()->endModel() }}
@php( html()->endModel() )

</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions resources/views/profiles/show.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@
{{ trans('profile.showProfileTwitterUsername') }}
</dt>
<dd>
{!! html()->link('https://twitter.com/'.$user->profile->twitter_username, $user->profile->twitter_username, array('class' => 'twitter-link', 'target' => '_blank')) !!}
{!! html()->a('https://twitter.com/'.$user->profile->twitter_username, $user->profile->twitter_username, array('class' => 'twitter-link', 'target' => '_blank')) !!}
</dd>
@endif

Expand All @@ -109,7 +109,7 @@
{{ trans('profile.showProfileGitHubUsername') }}
</dt>
<dd>
{!! html()->link('https://github.com/'.$user->profile->github_username, $user->profile->github_username, array('class' => 'github-link', 'target' => '_blank')) !!}
{!! html()->a('https://github.com/'.$user->profile->github_username, $user->profile->github_username, array('class' => 'github-link', 'target' => '_blank')) !!}
</dd>
@endif
@endif
Expand Down
4 changes: 2 additions & 2 deletions resources/views/scripts/form-modal-script.blade.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script type="text/javascript">

$(function () {
var modalId = $('#confirmForm');

modalId.on('show.bs.modal', function (e) {
Expand All @@ -23,5 +23,5 @@
modalId.find('.modal-footer #confirm').on('click', function(){
$(this).data('form').submit();
});

});
</script>
36 changes: 36 additions & 0 deletions resources/views/vendor/pagination/bootstrap-4.blade.php
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
@if ($paginator->hasPages())
<ul class="pagination">
{{-- Previous Page Link --}}
@if ($paginator->onFirstPage())
<li class="page-item disabled"><span class="page-link">&laquo;</span></li>
@else
<li class="page-item"><a class="page-link" href="{{ $paginator->previousPageUrl() }}" rel="prev">&laquo;</a></li>
@endif

{{-- Pagination Elements --}}
@foreach ($elements as $element)
{{-- "Three Dots" Separator --}}
@if (is_string($element))
<li class="page-item disabled"><span class="page-link">{{ $element }}</span></li>
@endif

{{-- Array Of Links --}}
@if (is_array($element))
@foreach ($element as $page => $url)
@if ($page == $paginator->currentPage())
<li class="page-item active"><span class="page-link">{{ $page }}</span></li>
@else
<li class="page-item"><a class="page-link" href="{{ $url }}">{{ $page }}</a></li>
@endif
@endforeach
@endif
@endforeach

{{-- Next Page Link --}}
@if ($paginator->hasMorePages())
<li class="page-item"><a class="page-link" href="{{ $paginator->nextPageUrl() }}" rel="next">&raquo;</a></li>
@else
<li class="page-item disabled"><span class="page-link">&raquo;</span></li>
@endif
</ul>
@endif
Loading