From 2f839afe6b763d1d20612834f02549d67e01955e Mon Sep 17 00:00:00 2001 From: Dharma Date: Thu, 4 Apr 2024 13:31:19 +0545 Subject: [PATCH] toastr added --- app/Http/Controllers/Usercontroller.php | 44 +++ app/Http/Kernel.php | 3 + composer.json | 3 +- composer.lock | 296 ++++++++++++++++++- config/flasher_toastr.php | 19 ++ config/toastr.php | 27 ++ public/vendor/flasher/flasher-toastr.min.js | 1 + public/vendor/flasher/jquery.min.js | 2 + resources/views/permissions/create.blade.php | 5 +- resources/views/permissions/edit.blade.php | 9 +- resources/views/permissions/index.blade.php | 5 +- resources/views/roles/create.blade.php | 5 +- resources/views/roles/edit.blade.php | 5 +- resources/views/roles/index.blade.php | 9 +- routes/web.php | 5 + 15 files changed, 420 insertions(+), 18 deletions(-) create mode 100644 app/Http/Controllers/Usercontroller.php create mode 100644 config/flasher_toastr.php create mode 100644 config/toastr.php create mode 100644 public/vendor/flasher/flasher-toastr.min.js create mode 100644 public/vendor/flasher/jquery.min.js diff --git a/app/Http/Controllers/Usercontroller.php b/app/Http/Controllers/Usercontroller.php new file mode 100644 index 0000000..6d35cde --- /dev/null +++ b/app/Http/Controllers/Usercontroller.php @@ -0,0 +1,44 @@ +validate([ + 'name' => 'required|min:5', + 'email' => 'required', + 'password' => 'required', + 'role' => 'required', + ]); + $user = User::create($validatedData); + $user->roles()->attach($request->role); + toastr()->success('User has been created!'); + return redirect()->route('users.index'); + } + + public function index(UsersDataTable $dataTables) + { + return $dataTables->render('users.index'); + } + + public function destroy(string $id) + { + $user = User::findOrFail($id); + $user->delete(); + toastr()->success('Data has been deleted successfully!'); + return redirect()->back(); + } +} diff --git a/app/Http/Kernel.php b/app/Http/Kernel.php index c34cdcf..e37051f 100644 --- a/app/Http/Kernel.php +++ b/app/Http/Kernel.php @@ -63,5 +63,8 @@ class Kernel extends HttpKernel 'signed' => \App\Http\Middleware\ValidateSignature::class, 'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class, 'verified' => \Illuminate\Auth\Middleware\EnsureEmailIsVerified::class, + 'role_or_permission' => \Spatie\Permission\Middleware\RoleOrPermissionMiddleware::class, + 'role' => \Spatie\Permission\Middleware\RoleMiddleware::class, + 'permission' => \Spatie\Permission\Middleware\PermissionMiddleware::class, ]; } diff --git a/composer.json b/composer.json index bb5e7e0..95be31f 100644 --- a/composer.json +++ b/composer.json @@ -11,7 +11,8 @@ "laravel/sanctum": "^3.2", "laravel/tinker": "^2.8", "laravel/ui": "^4.5", - "spatie/laravel-permission": "^6.4" + "spatie/laravel-permission": "^6.4", + "yoeunes/toastr": "^2.3" }, "require-dev": { "fakerphp/faker": "^1.9.1", diff --git a/composer.lock b/composer.lock index 018f4e2..ba94b94 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "9dfe840e3949f0554256147101c42a8e", + "content-hash": "e3947aa2fb682a8822517d180dd8cc15", "packages": [ { "name": "brick/math", @@ -2457,6 +2457,195 @@ ], "time": "2023-02-08T01:06:31+00:00" }, + { + "name": "php-flasher/flasher", + "version": "v1.15.14", + "source": { + "type": "git", + "url": "https://github.com/php-flasher/flasher.git", + "reference": "33ae74e73f62814fff4e78e78f912d9b6ddf82d0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-flasher/flasher/zipball/33ae74e73f62814fff4e78e78f912d9b6ddf82d0", + "reference": "33ae74e73f62814fff4e78e78f912d9b6ddf82d0", + "shasum": "" + }, + "require": { + "php": ">=5.3" + }, + "type": "library", + "autoload": { + "files": [ + "helpers.php" + ], + "psr-4": { + "Flasher\\Prime\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Younes KHOUBZA", + "email": "younes.khoubza@gmail.com", + "homepage": "https://www.linkedin.com/in/younes-khoubza", + "role": "Developer" + } + ], + "description": "PHPFlasher - A powerful & easy-to-use package for adding flash messages to Laravel or Symfony projects. Provides feedback to users, improves engagement & enhances user experience. Intuitive design for beginners & experienced developers. A reliable, flexible solution.", + "homepage": "https://php-flasher.io", + "keywords": [ + "custom-adapter", + "dark-mode", + "desktop-notifications", + "flash-messages", + "framework-agnostic", + "javascript", + "laravel", + "notification-system", + "noty", + "notyf", + "php", + "php-flasher", + "phpstorm-auto-complete", + "pnotify", + "rtl", + "sweetalert", + "symfony", + "toastr", + "user-experience", + "user-feedback", + "yoeunes" + ], + "support": { + "source": "https://github.com/php-flasher/flasher/tree/v1.15.14" + }, + "funding": [ + { + "url": "https://www.paypal.com/paypalme/yoeunes", + "type": "custom" + }, + { + "url": "https://github.com/yoeunes", + "type": "github" + }, + { + "url": "https://ko-fi.com/yoeunes", + "type": "ko_fi" + }, + { + "url": "https://opencollective.com/php-flasher", + "type": "open_collective" + }, + { + "url": "https://www.patreon.com/yoeunes", + "type": "patreon" + } + ], + "time": "2023-12-16T17:11:36+00:00" + }, + { + "name": "php-flasher/flasher-laravel", + "version": "v1.15.14", + "source": { + "type": "git", + "url": "https://github.com/php-flasher/flasher-laravel.git", + "reference": "c2777483fd7074087c16f861ce2191a95088e7c6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-flasher/flasher-laravel/zipball/c2777483fd7074087c16f861ce2191a95088e7c6", + "reference": "c2777483fd7074087c16f861ce2191a95088e7c6", + "shasum": "" + }, + "require": { + "illuminate/support": "^4.0 || ^5.0 || ^6.0 || ^7.0 || ^8.0 || ^9.0 || ^10.0 || ^11.0", + "php": ">=5.3", + "php-flasher/flasher": "^1.15.14" + }, + "type": "library", + "extra": { + "laravel": { + "aliases": { + "Flasher": "Flasher\\Laravel\\Facade\\Flasher" + }, + "providers": [ + "Flasher\\Laravel\\FlasherServiceProvider" + ] + } + }, + "autoload": { + "psr-4": { + "Flasher\\Laravel\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Younes KHOUBZA", + "email": "younes.khoubza@gmail.com", + "homepage": "https://www.linkedin.com/in/younes-khoubza", + "role": "Developer" + } + ], + "description": "PHPFlasher - A powerful & easy-to-use package for adding flash messages to Laravel or Symfony projects. Provides feedback to users, improves engagement & enhances user experience. Intuitive design for beginners & experienced developers. A reliable, flexible solution.", + "homepage": "https://php-flasher.io", + "keywords": [ + "custom-adapter", + "dark-mode", + "desktop-notifications", + "flash-messages", + "framework-agnostic", + "javascript", + "laravel", + "notification-system", + "noty", + "notyf", + "php", + "php-flasher", + "phpstorm-auto-complete", + "pnotify", + "rtl", + "sweetalert", + "symfony", + "toastr", + "user-experience", + "user-feedback", + "yoeunes" + ], + "support": { + "source": "https://github.com/php-flasher/flasher-laravel/tree/v1.15.14" + }, + "funding": [ + { + "url": "https://www.paypal.com/paypalme/yoeunes", + "type": "custom" + }, + { + "url": "https://github.com/yoeunes", + "type": "github" + }, + { + "url": "https://ko-fi.com/yoeunes", + "type": "ko_fi" + }, + { + "url": "https://opencollective.com/php-flasher", + "type": "open_collective" + }, + { + "url": "https://www.patreon.com/yoeunes", + "type": "patreon" + } + ], + "time": "2024-03-16T15:25:14+00:00" + }, { "name": "phpoption/phpoption", "version": "1.9.2", @@ -5829,6 +6018,111 @@ "source": "https://github.com/webmozarts/assert/tree/1.11.0" }, "time": "2022-06-03T18:03:27+00:00" + }, + { + "name": "yoeunes/toastr", + "version": "v2.3.5", + "source": { + "type": "git", + "url": "https://github.com/yoeunes/toastr.git", + "reference": "5c39d42b4c7b110572b7643bba1cd51b8af89b74" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/yoeunes/toastr/zipball/5c39d42b4c7b110572b7643bba1cd51b8af89b74", + "reference": "5c39d42b4c7b110572b7643bba1cd51b8af89b74", + "shasum": "" + }, + "require": { + "php": ">=5.3", + "php-flasher/flasher-laravel": "^1.15.14" + }, + "type": "library", + "extra": { + "laravel": { + "aliases": { + "Toastr": "Yoeunes\\Toastr\\Facades\\Toastr" + }, + "providers": [ + "Yoeunes\\Toastr\\ToastrServiceProvider" + ] + } + }, + "autoload": { + "files": [ + "src/helpers.php" + ], + "psr-4": { + "Yoeunes\\Toastr\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Younes KHOUBZA", + "email": "younes.khoubza@gmail.com", + "homepage": "https://www.linkedin.com/in/younes-khoubza", + "role": "Developer" + } + ], + "description": "toastr.js flush notifications for Laravel", + "homepage": "https://github.com/yoeunes/toastr", + "keywords": [ + "custom-adapter", + "dark-mode", + "desktop-notifications", + "flash-messages", + "framework-agnostic", + "javascript", + "laravel", + "notification-system", + "noty", + "notyf", + "php", + "php-flasher", + "phpstorm-auto-complete", + "pnotify", + "rtl", + "sweetalert", + "symfony", + "toastr", + "toastr js", + "user-experience", + "user-feedback", + "yoeunes" + ], + "support": { + "docs": "https://github.com/yoeunes/toastr/README.md", + "email": "younes.khoubza@gmail.com", + "issues": "https://github.com/yoeunes/toastr/issues", + "source": "https://github.com/yoeunes/toastr" + }, + "funding": [ + { + "url": "https://www.paypal.com/paypalme/yoeunes", + "type": "custom" + }, + { + "url": "https://github.com/yoeunes", + "type": "github" + }, + { + "url": "https://ko-fi.com/yoeunes", + "type": "ko_fi" + }, + { + "url": "https://opencollective.com/php-flasher", + "type": "open_collective" + }, + { + "url": "https://www.patreon.com/yoeunes", + "type": "patreon" + } + ], + "time": "2024-03-16T15:29:23+00:00" } ], "packages-dev": [ diff --git a/config/flasher_toastr.php b/config/flasher_toastr.php new file mode 100644 index 0000000..6a0cfdf --- /dev/null +++ b/config/flasher_toastr.php @@ -0,0 +1,19 @@ + + */ + +return array( + 'scripts' => array( + 'cdn' => array( + 'https://cdn.jsdelivr.net/npm/jquery@3.6.3/dist/jquery.min.js', + 'https://cdn.jsdelivr.net/npm/@flasher/flasher-toastr@1.2.4/dist/flasher-toastr.min.js', + ), + 'local' => array( + '/vendor/flasher/jquery.min.js', + '/vendor/flasher/flasher-toastr.min.js', + ), + ), +); diff --git a/config/toastr.php b/config/toastr.php new file mode 100644 index 0000000..ef227a8 --- /dev/null +++ b/config/toastr.php @@ -0,0 +1,27 @@ + + */ + +return array( + /* + |-------------------------------------------------------------------------- + | Toastr options + |-------------------------------------------------------------------------- + | + | Here you can specify the options that will be passed to the toastr.js + | library. For a full list of options, visit the documentation. + | + | Example: + | 'options' => [ + | 'closeButton' => true, + | 'debug' => false, + | 'newestOnTop' => false, + | 'progressBar' => true, + | ], + */ + + 'options' => array(), +); diff --git a/public/vendor/flasher/flasher-toastr.min.js b/public/vendor/flasher/flasher-toastr.min.js new file mode 100644 index 0000000..5f181ec --- /dev/null +++ b/public/vendor/flasher/flasher-toastr.min.js @@ -0,0 +1 @@ +!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("@flasher/flasher"),require("jquery")):"function"==typeof define&&define.amd?define(["@flasher/flasher","jquery"],e):((t="undefined"!=typeof globalThis?globalThis:t||self).flasher=t.flasher||{},t.flasher.toastr=e(t.flasher,t.jQuery))}(this,(function(t,e){"use strict";var o=function(){return o=Object.assign||function(t){for(var e,o=1,i=arguments.length;o=0;n--)l(t(i[n]),o)}(n)},remove:function(o){var i=u();e||p(i),o&&0===t(":focus",o).length?f(o):e.children().length&&e.remove()},error:function(t,e,o){return g({type:a,iconClass:u().iconClasses.error,message:t,optionsOverride:o,title:e})},getContainer:p,info:function(t,e,o){return g({type:s,iconClass:u().iconClasses.info,message:t,optionsOverride:o,title:e})},options:{},subscribe:function(t){o=t},success:function(t,e,o){return g({type:r,iconClass:u().iconClasses.success,message:t,optionsOverride:o,title:e})},version:"2.1.4",warning:function(t,e,o){return g({type:c,iconClass:u().iconClasses.warning,message:t,optionsOverride:o,title:e})}};return d;function p(o,i){return o||(o=u()),(e=t("#"+o.containerId)).length||i&&(e=function(o){return(e=t("
").attr("id",o.containerId).addClass(o.positionClass)).appendTo(t(o.target)),e}(o)),e}function l(e,o,i){var n=!(!i||!i.force)&&i.force;return!(!e||!n&&0!==t(":focus",e).length||(e[o.hideMethod]({duration:o.hideDuration,easing:o.hideEasing,complete:function(){f(e)}}),0))}function A(t){o&&o(t)}function g(o){var a=u(),s=o.iconClass||a.iconClass;if(void 0!==o.optionsOverride&&(a=t.extend(a,o.optionsOverride),s=o.optionsOverride.iconClass||s),!function(t,e){if(t.preventDuplicates){if(e.message===i)return!0;i=e.message}return!1}(a,o)){n++,e=p(a,!0);var r=null,c=t("
"),d=t("
"),l=t("
"),g=t("
"),h=t(a.closeHtml),m={intervalId:null,hideEta:null,maxHideTime:null},b={toastId:n,state:"visible",startTime:new Date,options:a,map:o};return o.iconClass&&c.addClass(a.toastClass).addClass(s),function(){if(o.title){var t=o.title;a.escapeHtml&&(t=x(o.title)),d.append(t).addClass(a.titleClass),c.append(d)}}(),function(){if(o.message){var t=o.message;a.escapeHtml&&(t=x(o.message)),l.append(t).addClass(a.messageClass),c.append(l)}}(),a.closeButton&&(h.addClass(a.closeClass).attr("role","button"),c.prepend(h)),a.progressBar&&(g.addClass(a.progressClass),c.prepend(g)),a.rtl&&c.addClass("rtl"),a.newestOnTop?e.prepend(c):e.append(c),function(){var t="";switch(o.iconClass){case"toast-success":case"toast-info":t="polite";break;default:t="assertive"}c.attr("aria-live",t)}(),c.hide(),c[a.showMethod]({duration:a.showDuration,easing:a.showEasing,complete:a.onShown}),a.timeOut>0&&(r=setTimeout(w,a.timeOut),m.maxHideTime=parseFloat(a.timeOut),m.hideEta=(new Date).getTime()+m.maxHideTime,a.progressBar&&(m.intervalId=setInterval(y,10))),a.closeOnHover&&c.hover(C,v),!a.onclick&&a.tapToDismiss&&c.click(w),a.closeButton&&h&&h.click((function(t){t.stopPropagation?t.stopPropagation():void 0!==t.cancelBubble&&!0!==t.cancelBubble&&(t.cancelBubble=!0),a.onCloseClick&&a.onCloseClick(t),w(!0)})),a.onclick&&c.click((function(t){a.onclick(t),w()})),A(b),a.debug&&console&&console.log(b),c}function x(t){return null==t&&(t=""),t.replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(//g,">")}function w(e){var o=e&&!1!==a.closeMethod?a.closeMethod:a.hideMethod,i=e&&!1!==a.closeDuration?a.closeDuration:a.hideDuration,n=e&&!1!==a.closeEasing?a.closeEasing:a.hideEasing;if(!t(":focus",c).length||e)return clearTimeout(m.intervalId),c[o]({duration:i,easing:n,complete:function(){f(c),clearTimeout(r),a.onHidden&&"hidden"!==b.state&&a.onHidden(),b.state="hidden",b.endTime=new Date,A(b)}})}function v(){(a.timeOut>0||a.extendedTimeOut>0)&&(r=setTimeout(w,a.extendedTimeOut),m.maxHideTime=parseFloat(a.extendedTimeOut),m.hideEta=(new Date).getTime()+m.maxHideTime)}function C(){clearTimeout(r),m.hideEta=0,c.stop(!0,!0)[a.showMethod]({duration:a.showDuration,easing:a.showEasing})}function y(){var t=(m.hideEta-(new Date).getTime())/m.maxHideTime*100;g.width(t+"%")}}function u(){return t.extend({},{tapToDismiss:!0,toastClass:"toast",containerId:"toast-container",debug:!1,showMethod:"fadeIn",showDuration:300,showEasing:"swing",onShown:void 0,hideMethod:"fadeOut",hideDuration:1e3,hideEasing:"swing",onHidden:void 0,closeMethod:!1,closeDuration:!1,closeEasing:!1,closeOnHover:!0,extendedTimeOut:1e3,iconClasses:{error:"toast-error",info:"toast-info",success:"toast-success",warning:"toast-warning"},iconClass:"toast-info",positionClass:"toast-top-right",timeOut:5e3,titleClass:"toast-title",messageClass:"toast-message",escapeHtml:!1,target:"body",closeHtml:'',closeClass:"toast-close-button",newestOnTop:!0,preventDuplicates:!1,progressBar:!1,progressClass:"toast-progress",rtl:!1},d.options)}function f(t){e||(e=p()),t.is(":visible")||(t.remove(),t=null,0===e.children().length&&(e.remove(),i=void 0))}}()},t.exports?t.exports=o(e):window.toastr=o(window.jQuery)}({get exports(){return i},set exports(t){i=t}});var n=i,a=[],s=[];!function(t,e){if(t&&"undefined"!=typeof document){var o,i=!0===e.prepend?"prepend":"append",n=!0===e.singleTag,r="string"==typeof e.container?document.querySelector(e.container):document.getElementsByTagName("head")[0];if(n){var c=a.indexOf(r);-1===c&&(c=a.push(r)-1,s[c]={}),o=s[c]&&s[c][i]?s[c][i]:s[c][i]=d()}else o=d();65279===t.charCodeAt(0)&&(t=t.substring(1)),o.styleSheet?o.styleSheet.cssText+=t:o.appendChild(document.createTextNode(t))}function d(){var t=document.createElement("style");if(t.setAttribute("type","text/css"),e.attributes)for(var o=Object.keys(e.attributes),n=0;ndiv{background-position:15px;background-repeat:no-repeat;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;-moz-box-shadow:0 0 12px #999;-webkit-box-shadow:0 0 12px #999;box-shadow:0 0 12px #999;color:#fff;-ms-filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=80);filter:alpha(opacity=80);margin:0 0 6px;opacity:.8;overflow:hidden;padding:15px 15px 15px 50px;pointer-events:auto;position:relative;width:300px}#toast-container>div.rtl{background-position:right 15px center;direction:rtl;padding:15px 50px 15px 15px}#toast-container>div:hover{-moz-box-shadow:0 0 12px #000;-webkit-box-shadow:0 0 12px #000;box-shadow:0 0 12px #000;cursor:pointer;-ms-filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=100);filter:alpha(opacity=100);opacity:1}#toast-container>.toast-info{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAGwSURBVEhLtZa9SgNBEMc9sUxxRcoUKSzSWIhXpFMhhYWFhaBg4yPYiWCXZxBLERsLRS3EQkEfwCKdjWJAwSKCgoKCcudv4O5YLrt7EzgXhiU3/4+b2ckmwVjJSpKkQ6wAi4gwhT+z3wRBcEz0yjSseUTrcRyfsHsXmD0AmbHOC9Ii8VImnuXBPglHpQ5wwSVM7sNnTG7Za4JwDdCjxyAiH3nyA2mtaTJufiDZ5dCaqlItILh1NHatfN5skvjx9Z38m69CgzuXmZgVrPIGE763Jx9qKsRozWYw6xOHdER+nn2KkO+Bb+UV5CBN6WC6QtBgbRVozrahAbmm6HtUsgtPC19tFdxXZYBOfkbmFJ1VaHA1VAHjd0pp70oTZzvR+EVrx2Ygfdsq6eu55BHYR8hlcki+n+kERUFG8BrA0BwjeAv2M8WLQBtcy+SD6fNsmnB3AlBLrgTtVW1c2QN4bVWLATaIS60J2Du5y1TiJgjSBvFVZgTmwCU+dAZFoPxGEEs8nyHC9Bwe2GvEJv2WXZb0vjdyFT4Cxk3e/kIqlOGoVLwwPevpYHT+00T+hWwXDf4AJAOUqWcDhbwAAAAASUVORK5CYII=)!important}#toast-container>.toast-error{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAHOSURBVEhLrZa/SgNBEMZzh0WKCClSCKaIYOED+AAKeQQLG8HWztLCImBrYadgIdY+gIKNYkBFSwu7CAoqCgkkoGBI/E28PdbLZmeDLgzZzcx83/zZ2SSXC1j9fr+I1Hq93g2yxH4iwM1vkoBWAdxCmpzTxfkN2RcyZNaHFIkSo10+8kgxkXIURV5HGxTmFuc75B2RfQkpxHG8aAgaAFa0tAHqYFfQ7Iwe2yhODk8+J4C7yAoRTWI3w/4klGRgR4lO7Rpn9+gvMyWp+uxFh8+H+ARlgN1nJuJuQAYvNkEnwGFck18Er4q3egEc/oO+mhLdKgRyhdNFiacC0rlOCbhNVz4H9FnAYgDBvU3QIioZlJFLJtsoHYRDfiZoUyIxqCtRpVlANq0EU4dApjrtgezPFad5S19Wgjkc0hNVnuF4HjVA6C7QrSIbylB+oZe3aHgBsqlNqKYH48jXyJKMuAbiyVJ8KzaB3eRc0pg9VwQ4niFryI68qiOi3AbjwdsfnAtk0bCjTLJKr6mrD9g8iq/S/B81hguOMlQTnVyG40wAcjnmgsCNESDrjme7wfftP4P7SP4N3CJZdvzoNyGq2c/HWOXJGsvVg+RA/k2MC/wN6I2YA2Pt8GkAAAAASUVORK5CYII=)!important}#toast-container>.toast-success{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAADsSURBVEhLY2AYBfQMgf///3P8+/evAIgvA/FsIF+BavYDDWMBGroaSMMBiE8VC7AZDrIFaMFnii3AZTjUgsUUWUDA8OdAH6iQbQEhw4HyGsPEcKBXBIC4ARhex4G4BsjmweU1soIFaGg/WtoFZRIZdEvIMhxkCCjXIVsATV6gFGACs4Rsw0EGgIIH3QJYJgHSARQZDrWAB+jawzgs+Q2UO49D7jnRSRGoEFRILcdmEMWGI0cm0JJ2QpYA1RDvcmzJEWhABhD/pqrL0S0CWuABKgnRki9lLseS7g2AlqwHWQSKH4oKLrILpRGhEQCw2LiRUIa4lwAAAABJRU5ErkJggg==)!important}#toast-container>.toast-warning{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAGYSURBVEhL5ZSvTsNQFMbXZGICMYGYmJhAQIJAICYQPAACiSDB8AiICQQJT4CqQEwgJvYASAQCiZiYmJhAIBATCARJy+9rTsldd8sKu1M0+dLb057v6/lbq/2rK0mS/TRNj9cWNAKPYIJII7gIxCcQ51cvqID+GIEX8ASG4B1bK5gIZFeQfoJdEXOfgX4QAQg7kH2A65yQ87lyxb27sggkAzAuFhbbg1K2kgCkB1bVwyIR9m2L7PRPIhDUIXgGtyKw575yz3lTNs6X4JXnjV+LKM/m3MydnTbtOKIjtz6VhCBq4vSm3ncdrD2lk0VgUXSVKjVDJXJzijW1RQdsU7F77He8u68koNZTz8Oz5yGa6J3H3lZ0xYgXBK2QymlWWA+RWnYhskLBv2vmE+hBMCtbA7KX5drWyRT/2JsqZ2IvfB9Y4bWDNMFbJRFmC9E74SoS0CqulwjkC0+5bpcV1CZ8NMej4pjy0U+doDQsGyo1hzVJttIjhQ7GnBtRFN1UarUlH8F3xict+HY07rEzoUGPlWcjRFRr4/gChZgc3ZL2d8oAAAAASUVORK5CYII=)!important}#toast-container.toast-bottom-center>div,#toast-container.toast-top-center>div{margin-left:auto;margin-right:auto;width:300px}#toast-container.toast-bottom-full-width>div,#toast-container.toast-top-full-width>div{margin-left:auto;margin-right:auto;width:96%}.toast{background-color:#030303}.toast-success{background-color:#51a351}.toast-error{background-color:#bd362f}.toast-info{background-color:#2f96b4}.toast-warning{background-color:#f89406}.toast-progress{background-color:#000;bottom:0;-ms-filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=40);filter:alpha(opacity=40);height:4px;left:0;opacity:.4;position:absolute}@media (max-width:240px){#toast-container>div{padding:8px 8px 8px 50px;width:11em}#toast-container>div.rtl{padding:8px 50px 8px 8px}#toast-container .toast-close-button{right:-.2em;top:-.2em}#toast-container .rtl .toast-close-button{left:-.2em;right:.2em}}@media (min-width:241px) and (max-width:480px){#toast-container>div{padding:8px 8px 8px 50px;width:18em}#toast-container>div.rtl{padding:8px 50px 8px 8px}#toast-container .toast-close-button{right:-.2em;top:-.2em}#toast-container .rtl .toast-close-button{left:-.2em;right:.2em}}@media (min-width:481px) and (max-width:768px){#toast-container>div{padding:15px 15px 15px 50px;width:25em}#toast-container>div.rtl{padding:15px 50px 15px 15px}}",{});var r=new(function(){function t(){}return t.prototype.success=function(t,e,o){this.flash("success",t,e,o)},t.prototype.info=function(t,e,o){this.flash("info",t,e,o)},t.prototype.warning=function(t,e,o){this.flash("warning",t,e,o)},t.prototype.error=function(t,e,o){this.flash("error",t,e,o)},t.prototype.flash=function(t,e,o,i){var n=this.createNotification(t,e,o,i);this.renderOptions({}),this.render({notification:n})},t.prototype.createNotification=function(t,e,o,i){if("object"==typeof t?(t=(i=t).type,e=i.message,o=i.title):"object"==typeof e?(e=(i=e).message,o=i.title):"object"==typeof o&&(o=(i=o).title),void 0===e)throw new Error("message option is required");return{type:t||"info",message:e,title:o,options:i}},t.prototype.render=function(t){var e=t.notification,o=e.message,i=e.title,a=e.options,s=e.type||"info";n[s](o,i,a).parent().attr("data-turbo-cache","false")},t.prototype.renderOptions=function(t){n.options=o({timeOut:t.timeOut||5e3,progressBar:t.progressBar||5e3},t)},t}());return t.addFactory("toastr",r),r})); diff --git a/public/vendor/flasher/jquery.min.js b/public/vendor/flasher/jquery.min.js new file mode 100644 index 0000000..b5329e9 --- /dev/null +++ b/public/vendor/flasher/jquery.min.js @@ -0,0 +1,2 @@ +/*! jQuery v3.6.3 | (c) OpenJS Foundation and other contributors | jquery.org/license */ +!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";var t=[],r=Object.getPrototypeOf,s=t.slice,g=t.flat?function(e){return t.flat.call(e)}:function(e){return t.concat.apply([],e)},u=t.push,i=t.indexOf,n={},o=n.toString,y=n.hasOwnProperty,a=y.toString,l=a.call(Object),v={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},x=function(e){return null!=e&&e===e.window},S=C.document,c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||S).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.6.3",E=function(e,t){return new E.fn.init(e,t)};function p(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp(F),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(p.childNodes),p.childNodes),t[p.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(T(e),e=e||C,S)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&v(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!N[t+" "]&&(!y||!y.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&(U.test(t)||z.test(t))){(f=ee.test(t)&&ve(e.parentNode)||e)===e&&d.scope||((s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=E)),o=(l=h(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+xe(l[o]);c=l.join(",")}try{if(d.cssSupportsSelector&&!CSS.supports("selector(:is("+c+"))"))throw new Error;return H.apply(n,f.querySelectorAll(c)),n}catch(e){N(t,!0)}finally{s===E&&e.removeAttribute("id")}}}return g(t.replace(B,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[E]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ye(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ve(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e&&e.namespaceURI,n=e&&(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:p;return r!=C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,S=!i(C),p!=C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.scope=ce(function(e){return a.appendChild(e).appendChild(C.createElement("div")),"undefined"!=typeof e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length}),d.cssSupportsSelector=ce(function(){return CSS.supports("selector(*)")&&C.querySelectorAll(":is(:jqfake)")&&!CSS.supports("selector(:is(*,:jqfake))")}),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=E,!C.getElementsByName||!C.getElementsByName(E).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&S){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&S){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&S)return t.getElementsByClassName(e)},s=[],y=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){var t;a.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&y.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||y.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+E+"-]").length||y.push("~="),(t=C.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||y.push("\\["+M+"*name"+M+"*="+M+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||y.push(":checked"),e.querySelectorAll("a#"+E+"+*").length||y.push(".#.+[+~]"),e.querySelectorAll("\\\f"),y.push("[\\r\\n\\f]")}),ce(function(e){e.innerHTML="";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&y.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&y.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&y.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),y.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",F)}),d.cssSupportsSelector||y.push(":has"),y=y.length&&new RegExp(y.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),v=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType&&e.documentElement||e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},j=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e==C||e.ownerDocument==p&&v(p,e)?-1:t==C||t.ownerDocument==p&&v(p,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==C?-1:t==C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]==p?-1:s[r]==p?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(T(e),d.matchesSelector&&S&&!N[t+" "]&&(!s||!s.test(t))&&(!y||!y.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){N(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=m[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&m(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function j(e,n,r){return m(n)?E.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?E.grep(e,function(e){return e===n!==r}):"string"!=typeof n?E.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(E.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||D,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:q.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof E?t[0]:t,E.merge(this,E.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:S,!0)),N.test(r[1])&&E.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=S.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(E):E.makeArray(e,this)}).prototype=E.fn,D=E(S);var L=/^(?:parents|prev(?:Until|All))/,H={children:!0,contents:!0,next:!0,prev:!0};function O(e,t){while((e=e[t])&&1!==e.nodeType);return e}E.fn.extend({has:function(e){var t=E(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i;ce=S.createDocumentFragment().appendChild(S.createElement("div")),(fe=S.createElement("input")).setAttribute("type","radio"),fe.setAttribute("checked","checked"),fe.setAttribute("name","t"),ce.appendChild(fe),v.checkClone=ce.cloneNode(!0).cloneNode(!0).lastChild.checked,ce.innerHTML="",v.noCloneChecked=!!ce.cloneNode(!0).lastChild.defaultValue,ce.innerHTML="",v.option=!!ce.lastChild;var ge={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function ye(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?E.merge([e],n):n}function ve(e,t){for(var n=0,r=e.length;n",""]);var me=/<|&#?\w+;/;function xe(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d\s*$/g;function je(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&E(e).children("tbody")[0]||e}function De(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function qe(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Le(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(Y.hasData(e)&&(s=Y.get(e).events))for(i in Y.remove(t,"handle events"),s)for(n=0,r=s[i].length;n").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),S.head.appendChild(r[0])},abort:function(){i&&i()}}});var Ut,Xt=[],Vt=/(=)\?(?=&|$)|\?\?/;E.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Xt.pop()||E.expando+"_"+Ct.guid++;return this[e]=!0,e}}),E.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Vt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Vt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Vt,"$1"+r):!1!==e.jsonp&&(e.url+=(St.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||E.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?E(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Xt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),v.createHTMLDocument=((Ut=S.implementation.createHTMLDocument("").body).innerHTML="
",2===Ut.childNodes.length),E.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(v.createHTMLDocument?((r=(t=S.implementation.createHTMLDocument("")).createElement("base")).href=S.location.href,t.head.appendChild(r)):t=S),o=!n&&[],(i=N.exec(e))?[t.createElement(i[1])]:(i=xe([e],t,o),o&&o.length&&E(o).remove(),E.merge([],i.childNodes)));var r,i,o},E.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(E.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},E.expr.pseudos.animated=function(t){return E.grep(E.timers,function(e){return t===e.elem}).length},E.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=E.css(e,"position"),c=E(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=E.css(e,"top"),u=E.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,E.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},E.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){E.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===E.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===E.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=E(e).offset()).top+=E.css(e,"borderTopWidth",!0),i.left+=E.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-E.css(r,"marginTop",!0),left:t.left-i.left-E.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===E.css(e,"position"))e=e.offsetParent;return e||re})}}),E.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;E.fn[t]=function(e){return B(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),E.each(["top","left"],function(e,n){E.cssHooks[n]=_e(v.pixelPosition,function(e,t){if(t)return t=Be(e,n),Pe.test(t)?E(e).position()[n]+"px":t})}),E.each({Height:"height",Width:"width"},function(a,s){E.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){E.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return B(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?E.css(e,t,i):E.style(e,t,n,i)},s,n?e:void 0,n)}})}),E.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){E.fn[t]=function(e){return this.on(t,e)}}),E.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),E.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){E.fn[n]=function(e,t){return 0 +@extends('layouts.app') +@section('content')

Manage Permission

@@ -36,4 +37,4 @@
- +@endsection diff --git a/resources/views/permissions/edit.blade.php b/resources/views/permissions/edit.blade.php index 9655107..0938ff0 100644 --- a/resources/views/permissions/edit.blade.php +++ b/resources/views/permissions/edit.blade.php @@ -1,4 +1,5 @@ - +@extends('layouts.app') +@section('content')

Manage Permissions

@@ -19,13 +20,13 @@
-
-
+
@@ -33,4 +34,4 @@
- +@endsection diff --git a/resources/views/permissions/index.blade.php b/resources/views/permissions/index.blade.php index 4ac2d84..d7987e2 100644 --- a/resources/views/permissions/index.blade.php +++ b/resources/views/permissions/index.blade.php @@ -1,4 +1,5 @@ - +@extends('layouts.app') +@section('content')

List Permissions

@@ -51,4 +52,4 @@
- +@endsection diff --git a/resources/views/roles/create.blade.php b/resources/views/roles/create.blade.php index 6867be7..fbab3b6 100644 --- a/resources/views/roles/create.blade.php +++ b/resources/views/roles/create.blade.php @@ -1,4 +1,5 @@ - +@extends('layouts.app') +@section('content')

Add New Role

@@ -53,4 +54,4 @@
- +@endsection diff --git a/resources/views/roles/edit.blade.php b/resources/views/roles/edit.blade.php index 2a4232b..707b012 100644 --- a/resources/views/roles/edit.blade.php +++ b/resources/views/roles/edit.blade.php @@ -1,4 +1,5 @@ - +@extends('layouts.app') +@section('content')

Manage Roles

@@ -50,4 +51,4 @@
- +@endsection diff --git a/resources/views/roles/index.blade.php b/resources/views/roles/index.blade.php index 5cde11f..0f98fb6 100644 --- a/resources/views/roles/index.blade.php +++ b/resources/views/roles/index.blade.php @@ -1,4 +1,5 @@ - +@extends('layouts.app') +@section('content')

List Roles

@@ -32,8 +33,8 @@ @endforeach @can('edit roles') - + @endcan @can('delete roles')
@@ -55,4 +56,4 @@
-
+@endsection diff --git a/routes/web.php b/routes/web.php index e6807e8..b6eb592 100644 --- a/routes/web.php +++ b/routes/web.php @@ -1,5 +1,7 @@ name('home'); + +Route::resource('roles', RoleController::class)->names('roles'); +Route::resource('permissions', PermissionController::class)->names('permissions');