Sweet Alert and Upload Profile

This commit is contained in:
Zakiaass 2024-03-14 22:06:46 +07:00
parent 13287d3bc4
commit 89ef419afe
17 changed files with 390 additions and 58 deletions

View File

@ -25,19 +25,6 @@ public function showLoginForm()
public function login(Request $request)
{
// $credentials = $request->only(['username', 'password']);
// if (Auth::attempt($credentials)) {
// $user = Auth::user();
// if ($user->role === 'wakil_kepala') {
// return redirect()->intended('/wakil_kepala/dashboard');
// } elseif ($user->role === 'siswa') {
// return redirect()->intended('/siswa/dashboard');
// }
// }
$validator = Validator::make($request->all(), [
'username' => 'required',
'password' => 'required',
@ -62,9 +49,9 @@ public function login(Request $request)
$user = Auth::user();
$request->session()->put('user_id', $user->id);
// Membuat dan menyimpan token "remember me"
$token = $user->createToken("auth-token")->plainTextToken;
$user->update(['remember_token' => $token]);
// // Membuat dan menyimpan token "remember me"
// $token = $user->createToken("auth-token")->plainTextToken;
// $user->update(['remember_token' => $token]);
return redirect('/dashboard')->with('success', 'Login berhasil!');
} else {
@ -169,14 +156,12 @@ function ($user, $password) {
public function logout(Request $request)
{
$guard = 'web'; // Sesuaikan dengan guard yang digunakan
$guard = 'web';
// Hapus seluruh cookie sesi
Session::flush();
// Logout pengguna
Auth::guard($guard)->logout();
return redirect('/home')->with('success', 'Terimakasih sudah logout! Silakan login kembali.');
return redirect('/login')->with('success', 'Terimakasih sudah logout! Silakan login kembali.');
}
}

View File

@ -21,6 +21,14 @@ public function userexport(){
public function userimport(Request $request)
{
$request->validate([
'file' => 'required|file|mimes:xlsx,xls|max:2048',
]);
if ($request->fails()) {
return redirect()->back()->withErrors($request->errors());
}
$file = $request->file('file');
$nameFile = $file->getClientOriginalName();
$file->move('DataUser', $nameFile);

View File

@ -39,7 +39,7 @@ public function calculateBobotKriteria()
$criteria->save();
}
return redirect()->route('kriteria.index')->with('success', 'Bobot kriteria berhasil dihitung dan disimpan.');
return redirect()->route('kriteria.index')->with('success', 'Bobot Kriteria Berhasil Dihitung dan Disimpan.');
}
public function calculateBobotSubKriteria()
@ -72,7 +72,7 @@ public function calculateBobotSubKriteria()
}
}
return redirect()->route('subkriteria.index')->with('success', 'Bobot sub kriteria berhasil dihitung dan disimpan.');
return redirect()->route('subkriteria.index')->with('success', 'Bobot Sub Kriteria Berhasil Dihitung dan Disimpan.');
}
public function penilaian()

View File

@ -130,7 +130,7 @@ public function update(Request $request, string $id)
$subkriteria = SubCriteria::findOrFail($id);
$subkriteria->update($validatedData);
return redirect()->route('subkriteria.index')->with('success', 'Data SUb Kriteria Berhasil Diperbarui!');
return redirect()->route('subkriteria.index')->with('success', 'Data Sub Kriteria Berhasil Diperbarui!');
}
/**

View File

@ -95,7 +95,7 @@ public function updateProfilePicture(Request $request)
}
// Redirect back or return a response
return redirect()->route('user-profile')->with('success', 'Profile picture updated successfully.');
return redirect()->route('user-profile')->with('success', 'Foto Profile Berhasil Diperbarui!');
}
}

View File

@ -36,6 +36,7 @@ class Kernel extends HttpKernel
\Illuminate\View\Middleware\ShareErrorsFromSession::class,
\App\Http\Middleware\VerifyCsrfToken::class,
\Illuminate\Routing\Middleware\SubstituteBindings::class,
\RealRashid\SweetAlert\ToSweetAlert::class,
// \App\Http\Middleware\PreventBackHistory::class,
],

12
composer.lock generated
View File

@ -3701,20 +3701,20 @@
},
{
"name": "realrashid/sweet-alert",
"version": "v7.1.0",
"version": "v7.1.1",
"source": {
"type": "git",
"url": "https://github.com/realrashid/sweet-alert.git",
"reference": "769f951053cd3363fd7fb7a1dd30f9828b619b44"
"reference": "2d38720644fb30ff6db4e2a5ee013c09057b1f3b"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/realrashid/sweet-alert/zipball/769f951053cd3363fd7fb7a1dd30f9828b619b44",
"reference": "769f951053cd3363fd7fb7a1dd30f9828b619b44",
"url": "https://api.github.com/repos/realrashid/sweet-alert/zipball/2d38720644fb30ff6db4e2a5ee013c09057b1f3b",
"reference": "2d38720644fb30ff6db4e2a5ee013c09057b1f3b",
"shasum": ""
},
"require": {
"laravel/framework": "^5.6|^6.0|^7.0|^8.0|^9.0|^9.11|9.14.*|^10.0",
"laravel/framework": "^5.6|^6.0|^7.0|^8.0|^9.0|^9.11|9.14.*|^10.0|^11.0",
"php": "^7.2|^8.0|^8.1"
},
"require-dev": {
@ -3787,7 +3787,7 @@
"type": "tidelift"
}
],
"time": "2023-08-07T19:23:17+00:00"
"time": "2024-03-02T08:59:25+00:00"
},
{
"name": "symfony/console",

269
config/sweetalert.php Normal file
View File

@ -0,0 +1,269 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Theme
|--------------------------------------------------------------------------
| The theme to use for SweetAlert2 popups.
| Available themes: dark, minimal, borderless, bootstrap-4, material-ui, wordpress-admin, bulma.
|
*/
'theme' => env('SWEET_ALERT_THEME', 'default'),
/*
|--------------------------------------------------------------------------
| CDN LINK
|--------------------------------------------------------------------------
| By default SweetAlert2 use its local sweetalert.all.js
| file.
| However, you can use its cdn if you want.
|
*/
'cdn' => env('SWEET_ALERT_CDN'),
/*
|--------------------------------------------------------------------------
| Always load the sweetalert.all.js
|--------------------------------------------------------------------------
| There might be situations where you will always want the sweet alert
| js package to be there for you. (for eg. you might use it heavily to
| show notifications or you might want to use the native js) then this
| might be handy.
|
*/
'alwaysLoadJS' => env('SWEET_ALERT_ALWAYS_LOAD_JS', false),
/*
|--------------------------------------------------------------------------
| Never load the sweetalert.all.js
|--------------------------------------------------------------------------
| If you want to handle the sweet alert js package by yourself
| (for eg. you might want to use laravel mix) then this can be
| handy.
| If you set always load js to true & never load js to false,
| it's going to prioritize the never load js.
|
| alwaysLoadJs = true & neverLoadJs = true => js will not be loaded
| alwaysLoadJs = true & neverLoadJs = false => js will be loaded
| alwaysLoadJs = false & neverLoadJs = false => js will be loaded when
| you set alert/toast by using the facade/helper functions.
*/
'neverLoadJS' => env('SWEET_ALERT_NEVER_LOAD_JS', false),
/*
|--------------------------------------------------------------------------
| AutoClose Timer
|--------------------------------------------------------------------------
|
| This is for the all Modal windows.
| For specific modal just use the autoClose() helper method.
|
*/
'timer' => env('SWEET_ALERT_TIMER', 5000),
/*
|--------------------------------------------------------------------------
| Width
|--------------------------------------------------------------------------
|
| Modal window width, including paddings (box-sizing: border-box).
| Can be in px or %.
| The default width is 32rem.
| This is for the all Modal windows.
| for particular modal just use the width() helper method.
*/
'width' => env('SWEET_ALERT_WIDTH', '32rem'),
/*
|--------------------------------------------------------------------------
| Height Auto
|--------------------------------------------------------------------------
| By default, SweetAlert2 sets html's and body's CSS height to auto !important.
| If this behavior isn't compatible with your project's layout,
| set heightAuto to false.
|
*/
'height_auto' => env('SWEET_ALERT_HEIGHT_AUTO', true),
/*
|--------------------------------------------------------------------------
| Padding
|--------------------------------------------------------------------------
|
| Modal window padding.
| Can be in px or %.
| The default padding is 1.25rem.
| This is for the all Modal windows.
| for particular modal just use the padding() helper method.
*/
'padding' => env('SWEET_ALERT_PADDING', '1.25rem'),
/*
|--------------------------------------------------------------------------
| Background
|--------------------------------------------------------------------------
|
| Modal window background
| (CSS background property).
| The default background is '#fff'.
*/
'background' => env('SWEET_ALERT_BACKGROUND', '#fff'),
/*
|--------------------------------------------------------------------------
| Animation
|--------------------------------------------------------------------------
| Custom animation with [Animate.css](https://daneden.github.io/animate.css/)
| If set to false, modal CSS animation will be use default ones.
| For specific modal just use the animation() helper method.
|
*/
'animation' => [
'enable' => env('SWEET_ALERT_ANIMATION_ENABLE', false),
],
'animatecss' => env('SWEET_ALERT_ANIMATECSS', 'https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css'),
/*
|--------------------------------------------------------------------------
| ShowConfirmButton
|--------------------------------------------------------------------------
| If set to false, a "Confirm"-button will not be shown.
| It can be useful when you're using custom HTML description.
| This is for the all Modal windows.
| For specific modal just use the showConfirmButton() helper method.
|
*/
'show_confirm_button' => env('SWEET_ALERT_CONFIRM_BUTTON', true),
/*
|--------------------------------------------------------------------------
| ShowCloseButton
|--------------------------------------------------------------------------
| If set to true, a "Close"-button will be shown,
| which the user can click on to dismiss the modal.
| This is for the all Modal windows.
| For specific modal just use the showCloseButton() helper method.
|
*/
'show_close_button' => env('SWEET_ALERT_CLOSE_BUTTON', false),
/*
|-----------------------------------------------------------------------
| Confirm/Cancel Button Text
|-----------------------------------------------------------------------
| Change the default text of the modal buttons.
| The texts translations will be handled by Laravel at runtime.
| This is for the all Modal windows.
| For specific modal just use the confirmButtonText() and
| cancelButtonText() helper methods.
*/
'button_text' => [
'confirm' => env('SWEET_ALERT_CONFIRM_BUTTON_TEXT', 'OK'),
'cancel' => env('SWEET_ALERT_CANCEL_BUTTON_TEXT', 'Cancel'),
],
/*
|--------------------------------------------------------------------------
| Toast position
|--------------------------------------------------------------------------
| Modal window or toast position, can be 'top',
| 'top-start', 'top-end', 'center', 'center-start',
| 'center-end', 'bottom', 'bottom-start', or 'bottom-end'.
| For specific modal just use the position() helper method.
|
*/
'toast_position' => env('SWEET_ALERT_TOAST_POSITION', 'top-end'),
/*
|--------------------------------------------------------------------------
| Progress Bar
|--------------------------------------------------------------------------
| If set to true, a progress bar at the bottom of a popup will be shown.
| It can be useful with toasts.
|
*/
'timer_progress_bar' => env('SWEET_ALERT_TIMER_PROGRESS_BAR', false),
/*
|--------------------------------------------------------------------------
| Middleware
|--------------------------------------------------------------------------
| Modal window or toast, config for the Middleware
|
*/
'middleware' => [
'autoClose' => env('SWEET_ALERT_MIDDLEWARE_AUTO_CLOSE', false),
'toast_position' => env('SWEET_ALERT_MIDDLEWARE_TOAST_POSITION', 'top-end'),
'toast_close_button' => env('SWEET_ALERT_MIDDLEWARE_TOAST_CLOSE_BUTTON', true),
'timer' => env('SWEET_ALERT_MIDDLEWARE_ALERT_CLOSE_TIME', 6000),
'auto_display_error_messages' => env('SWEET_ALERT_AUTO_DISPLAY_ERROR_MESSAGES', true),
],
/*
|--------------------------------------------------------------------------
| Custom Class
|--------------------------------------------------------------------------
| A custom CSS class for the modal:
|
*/
'customClass' => [
'container' => env('SWEET_ALERT_CONTAINER_CLASS'),
'popup' => env('SWEET_ALERT_POPUP_CLASS'),
'header' => env('SWEET_ALERT_HEADER_CLASS'),
'title' => env('SWEET_ALERT_TITLE_CLASS'),
'closeButton' => env('SWEET_ALERT_CLOSE_BUTTON_CLASS'),
'icon' => env('SWEET_ALERT_ICON_CLASS'),
'image' => env('SWEET_ALERT_IMAGE_CLASS'),
'content' => env('SWEET_ALERT_CONTENT_CLASS'),
'input' => env('SWEET_ALERT_INPUT_CLASS'),
'actions' => env('SWEET_ALERT_ACTIONS_CLASS'),
'confirmButton' => env('SWEET_ALERT_CONFIRM_BUTTON_CLASS'),
'cancelButton' => env('SWEET_ALERT_CANCEL_BUTTON_CLASS'),
'footer' => env('SWEET_ALERT_FOOTER_CLASS'),
],
/*
|--------------------------------------------------------------------------
| confirmDelete
|--------------------------------------------------------------------------
| customize the configuration options of the confirmation popup.
|
*/
'confirm_delete_confirm_button_text' => env('SWEET_ALERT_CONFIRM_DELETE_CONFIRM_BUTTON_TEXT', 'Yes, delete it!'),
'confirm_delete_confirm_button_color' => env('SWEET_ALERT_CONFIRM_DELETE_CONFIRM_BUTTON_COLOR'),
'confirm_delete_cancel_button_color' => env('SWEET_ALERT_CONFIRM_DELETE_CANCEL_BUTTON_COLOR', '#d33'),
'confirm_delete_cancel_button_text' => env('SWEET_ALERT_CONFIRM_DELETE_CANCEL_BUTTON_TEXT', 'Cancel'),
'confirm_delete_show_cancel_button' => env('SWEET_ALERT_CONFIRM_DELETE_SHOW_CANCEL_BUTTON', true),
'confirm_delete_show_close_button' => env('SWEET_ALERT_CONFIRM_DELETE_SHOW_CLOSE_BUTTON', false),
'confirm_delete_icon' => env('SWEET_ALERT_CONFIRM_DELETE_ICON', 'warning'),
'confirm_delete_show_loader_on_confirm' => env('SWEET_ALERT_CONFIRM_DELETE_SHOW_LOADER_ON_CONFIRM', true),
];

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -38,7 +38,7 @@
<div class="card-header d-flex align-items-center">
<!-- Button trigger modal -->
<button type="button" class="btn btn-primary mx-2" data-toggle="modal" data-target="#add-extracuricullar">
<i class="icon dw dw-add"></i> Tambah Ekstrakurikuler</button>
<i class="icon dw dw-file"></i> Tambah Ekstrakurikuler</button>
<form class="form-inline ml-auto" action="/ekstrakurikuler" method="GET">
<div class="input-group">
<input type="search" class="form-control" name="search" placeholder="Search">

View File

@ -38,7 +38,7 @@
<div class="card-header d-flex align-items-center">
<!-- Button trigger modal -->
<button type="button" class="btn btn-primary mx-2" data-toggle="modal" data-target="#add-criteria">
<i class="icon dw dw-add"></i> Tambah Kriteria</button>
<i class="icon dw dw-file"></i> Tambah Kriteria</button>
<button type="button" class="btn btn-primary mx-2" id="calculate-bobot">
<i class="icon dw dw-calculator"></i> Hitung Bobot
</button>

View File

@ -7,8 +7,6 @@
<div class="header-search">
<form>
<div class="form-group mb-0">
{{-- <i class="dw dw-search2 search-icon"></i> --}}
{{-- <input type="text" class="form-control search-input" placeholder="Search Here" /> --}}
<div class="dropdown">
<div class="dropdown-menu dropdown-menu-right">
<div class="form-group row">
@ -54,6 +52,15 @@
<div class="dropdown-menu dropdown-menu-right dropdown-menu-icon-list">
<a href="/user-profile" class="dropdown-item"><i class="dw dw-user1"></i> Profile</a>
@auth
<a href="{{ route('logout') }}" class="dropdown-item has-icon text-danger"
onclick="event.preventDefault(); document.getElementById('logout-form').submit();">
<i class="dw dw-logout"></i> Logout
</a>
<form id="logout-form" action="{{ route('logout') }}" method="POST" style="display: none;">
@csrf
</form>
@endauth
{{-- @auth
<a href="{{ route('logout') }}" class="dropdown-item has-icon text-danger"
onclick="event.preventDefault(); document.getElementById('logout-form').submit();">
<i class="dw dw-logout"></i> Logout
@ -61,7 +68,7 @@
<form id="logout-form" action="{{ route('logout') }}" method="POST" style="display: none;">
@csrf
</form>
@endauth
@endauth --}}
</div>
</div>
</div>

View File

@ -38,7 +38,7 @@
<div class="card-header d-flex align-items-center">
<!-- Button trigger modal -->
<button type="button" class="btn btn-primary mx-2" data-toggle="modal" data-target="#add-subcriteria">
<i class="icon dw dw-add"></i> Tambah Sub Kriteria</button>
<i class="icon dw dw-file"></i> Tambah Sub Kriteria</button>
<button type="button" class="btn btn-primary mx-2" id="calculate-bobot">
<i class="icon dw dw-calculator"></i> Hitung Bobot
</button>

View File

@ -39,21 +39,25 @@
<i class="fa fa-pencil"></i>
</a>
@if (Auth::user()->profile_picture)
<img src="{{ asset('storage/' . Auth::user()->profile_picture) }}">
<img src="{{ asset('storage/' . Auth::user()->profile_picture) }}" class="rounded-profile-picture">
@else
<img src="{{ asset('vendors/images/user.png') }}">
@endif
<div class="modal fade" id="modal" tabindex="-1" role="dialog"
<div class="modal fade center-modal" id="modal" tabindex="-1" role="dialog"
aria-labelledby="modalLabel" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-body pd-5">
<div class="modal-header">
<h4 class="modal-title" id="myLargeModalLabel">Upload Profile</h4>
<button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>
</div>
<div class="modal-body">
<form action="{{ '/update-profile-picture' }}" method="post" enctype="multipart/form-data">
@csrf
<div class="img-container text-center">
@if (Auth::user()->profile_picture)
<img
src="{{ asset('storage/' . Auth::user()->profile_picture) }}" class="img-fluid mx-auto mt-2 rounded-profile-picture" style="max-width: 100%; max-height: 200px;">
src="{{ asset('storage/' . Auth::user()->profile_picture) }}" class="img-fluid mx-auto mt-2" style="max-width: 100%; max-height: 200px;">
@else
<img src="{{ asset('vendors/images/user.png') }}" class="img-fluid mx-auto mt-2" style="max-width: 100%; max-height: 200px;">
@endif
@ -63,10 +67,9 @@
<input type="file" class="form-control-file" id="profile_picture" name="profile_picture" accept="image/*">
</div>
<div class="modal-footer">
<button type="submit" class="btn btn-primary">Update</button>
<button type="button" class="btn btn-secondary" data-dismiss="modal">Batal</button>
<button type="submit" class="btn btn-primary">Simpan</button>
</form>
<button type="button" class="btn btn-secondary"
data-dismiss="modal">Close</button>
</div>
</div>
</div>
@ -99,12 +102,12 @@
<form method="POST" action="{{ route('user-profile') }}"
class="needs-validation" novalidate="">
@csrf
<h4 class=" text-center text-blue h5 mt-3 mb-0">Edit Your Personal Data
<h4 class=" text-center text-blue h5 mt-3 mb-0">Data Diri
</h4>
<ul class="profile-edit-list row">
<li class="col-md-4">
<div class="form-group">
<label for="name">Name</label>
<label for="name">Nama</label>
<input id="name" type="text" class="form-control"
name="name" value="{{ Auth::user()->name }}">
<div class="invalid-feedback">Please fill in your name
@ -146,7 +149,7 @@ class="needs-validation" novalidate="">
<div class="col-sm-12">
<div class="input-group mb-3 mx-auto">
<button class="btn btn-primary btn-lg btn-block"
type="submit">Save Changes</button>
type="submit">Simpan</button>
</div>
</div>
</form>
@ -158,12 +161,11 @@ class="needs-validation" novalidate="">
<div class="profile-setting">
<form method="POST" action="{{ route('update-password') }}">
@csrf
<h4 class=" text-center text-blue h5 mt-3 mb-0">Edit Your Personal
Password</h4>
<h4 class=" text-center text-blue h5 mt-3 mb-0">Data Password</h4>
<ul class="profile-edit-list row">
<li class="col-md-6">
<div class="form-group">
<label for="password">Current Password</label>
<label for="password">Password Lama</label>
<input id="password" type="text" class="form-control"
name="password">
<div class="invalid-feedback">Please fill in your current
@ -176,7 +178,7 @@ class="needs-validation" novalidate="">
</li>
<li class="col-md-6">
<div class="form-group">
<label for="new_password">New Password</label>
<label for="new_password">Password Baru</label>
<input id="new_password" type="text"
class="form-control" name="new_password">
<div class="invalid-feedback">Please fill in your new
@ -191,7 +193,7 @@ class="form-control" name="new_password">
<div class="col-sm-12">
<div class="input-group mb-3 mx-auto">
<button class="btn btn-primary btn-lg btn-block"
type="submit">Save Changes</button>
type="submit">Simpan</button>
</div>
</div>
</form>

View File

@ -38,7 +38,7 @@
<div class="card-header d-flex align-items-center">
<!-- Button trigger modal -->
<button type="button" class="btn btn-primary mx-2" data-toggle="modal" data-target="#add-user">
<i class="icon dw dw-add"></i> Tambah User</button>
<i class="icon dw dw-user"></i> Tambah User</button>
<button type="button" class="btn btn-primary mx-2" data-toggle="modal" data-target="#import-user">
<i class="icon dw dw-download"></i> Import User</button>
<a href="/export-user"><button type="button" class="btn btn-primary mx-2">
@ -294,9 +294,8 @@ class="badge btn-primary" data-toggle="modal"
</div>
<!-- Modal Import-->
<div class="modal fade center-modal" id="import-user" tabindex="-1" aria-labelledby="exampleModalLabel"
aria-hidden="true">
<div class="modal-dialog modal-dialog-centered">
<div class="modal fade center-modal" id="import-user" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel" style="display: none;" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title" id="myLargeModalLabel">Import User</h4>
@ -321,13 +320,14 @@ class="badge btn-primary" data-toggle="modal"
</div>
</div>
<div class="modal-footer">
<a href="{{ route('download-user-template') }}" class="btn btn-info mb-2">Unduh Template</a>
<a href="{{ route('download-user-template') }}" class="btn btn-info">Unduh Template</a>
<button type="button" class="btn btn-secondary" data-dismiss="modal">Batal</button>
<button type="submit" class="btn btn-primary">Simpan</button>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
@endforeach

View File

@ -0,0 +1,39 @@
@if (Session::has('alert.config') || Session::has('alert.delete'))
@if (config('sweetalert.animation.enable'))
<link rel="stylesheet" href="{{ config('sweetalert.animatecss') }}">
@endif
@if (config('sweetalert.theme') != 'default')
<link href="https://cdn.jsdelivr.net/npm/@sweetalert2/theme-{{ config('sweetalert.theme') }}" rel="stylesheet">
@endif
@if (config('sweetalert.alwaysLoadJS') === false && config('sweetalert.neverLoadJS') === false)
<script src="{{ $cdn ?? asset('vendor/sweetalert/sweetalert.all.js') }}"></script>
@endif
<script>
@if (Session::has('alert.delete'))
document.addEventListener('click', function(event) {
if (event.target.matches('[data-confirm-delete]')) {
event.preventDefault();
Swal.fire({!! Session::pull('alert.delete') !!}).then(function(result) {
if (result.isConfirmed) {
var form = document.createElement('form');
form.action = event.target.href;
form.method = 'POST';
form.innerHTML = `
@csrf
@method('DELETE')
`;
document.body.appendChild(form);
form.submit();
}
});
}
});
@endif
@if (Session::has('alert.config'))
Swal.fire({!! Session::pull('alert.config') !!});
@endif
</script>
@endif