From fd6f3cc763b2f44e9e61f52f5520f1a238d8698f Mon Sep 17 00:00:00 2001 From: Michel Bardelmeijer Date: Mon, 18 Mar 2024 13:33:24 +0100 Subject: [PATCH] Cleanup console/exceptions --- app/Console/Kernel.php | 18 - app/Exceptions/Handler.php | 26 -- app/Providers/AppServiceProvider.php | 5 +- lang/vendor/nova/en.json | 475 +++++++++++++++++++++++++++ lang/vendor/nova/en/validation.php | 19 ++ 5 files changed, 496 insertions(+), 47 deletions(-) delete mode 100644 app/Console/Kernel.php delete mode 100644 app/Exceptions/Handler.php create mode 100644 lang/vendor/nova/en.json create mode 100644 lang/vendor/nova/en/validation.php diff --git a/app/Console/Kernel.php b/app/Console/Kernel.php deleted file mode 100644 index e0fecf5..0000000 --- a/app/Console/Kernel.php +++ /dev/null @@ -1,18 +0,0 @@ -load(__DIR__.'/Commands'); - } -} diff --git a/app/Exceptions/Handler.php b/app/Exceptions/Handler.php deleted file mode 100644 index 1f30302..0000000 --- a/app/Exceptions/Handler.php +++ /dev/null @@ -1,26 +0,0 @@ -> - */ - protected $dontReport = []; - - /** - * A list of the inputs that are never flashed to the session on validation exceptions. - * - * @var array - */ - protected $dontFlash = [ - 'current_password', - 'password', - 'password_confirmation', - ]; -} diff --git a/app/Providers/AppServiceProvider.php b/app/Providers/AppServiceProvider.php index 43e0fb0..fe3b519 100644 --- a/app/Providers/AppServiceProvider.php +++ b/app/Providers/AppServiceProvider.php @@ -12,7 +12,7 @@ class AppServiceProvider extends ServiceProvider { - public const HOME = '/'; + public const string HOME = '/'; public function register(): void { @@ -29,9 +29,8 @@ public function boot(): void ]); - Validator::extend('absent', fn ($attribute, $value, $parameters, $validator) => ! Arr::has($validator->getData(), $attribute)); - Carbon::macro('userTimezone', fn () => $this->tz('Europe/Amsterdam')); /** @phpstan-ignore-line */ + Password::defaults(function () { $rule = Password::min(8) ->letters() diff --git a/lang/vendor/nova/en.json b/lang/vendor/nova/en.json new file mode 100644 index 0000000..af4bd9d --- /dev/null +++ b/lang/vendor/nova/en.json @@ -0,0 +1,475 @@ +{ + "Actions": "Actions", + "Details": "Details", + "If you did not request a password reset, no further action is required.": "If you did not request a password reset, no further action is required.", + "Reset Password": "Reset Password", + "Sorry! You are not authorized to perform this action.": "Sorry! You are not authorized to perform this action.", + "You are receiving this email because we received a password reset request for your account.": "You are receiving this email because we received a password reset request for your account.", + "Error": "Error", + "Confirm Password": "Confirm Password", + "We have emailed your password reset link!": "We have emailed your password reset link!", + "Dashboard": "Dashboard", + "Email Address": "Email Address", + "Forgot Password": "Forgot Password", + "Forgot your password?": "Forgot your password?", + "Log In": "Log In", + "Logout": "Logout", + "Password": "Password", + "Remember me": "Remember me", + "Resources": "Resources", + "Send Password Reset Link": "Send Password Reset Link", + "Welcome Back!": "Welcome Back!", + "Delete Resource": "Delete Resource", + "Delete": "Delete", + "Soft Deleted": "Soft Deleted", + "Detach Resource": "Detach Resource", + "Detach": "Detach", + "Detach Selected": "Detach Selected", + "Delete Selected": "Delete Selected", + "Force Delete Selected": "Force Delete Selected", + "Restore Selected": "Restore Selected", + "Restore Resource": "Restore Resource", + "Restore": "Restore", + "Force Delete Resource": "Force Delete Resource", + "Force Delete": "Force Delete", + "Are you sure you want to delete this resource?": "Are you sure you want to delete this resource?", + "Are you sure you want to delete the selected resources?": "Are you sure you want to delete the selected resources?", + "Are you sure you want to detach this resource?": "Are you sure you want to detach this resource?", + "Are you sure you want to detach the selected resources?": "Are you sure you want to detach the selected resources?", + "Are you sure you want to force delete this resource?": "Are you sure you want to force delete this resource?", + "Are you sure you want to force delete the selected resources?": "Are you sure you want to force delete the selected resources?", + "Are you sure you want to restore this resource?": "Are you sure you want to restore this resource?", + "Are you sure you want to restore the selected resources?": "Are you sure you want to restore the selected resources?", + "Are you sure you want to remove this item?": "Are you sure you want to remove this item?", + "No :resource matched the given criteria.": "No :resource matched the given criteria.", + "Failed to load :resource!": "Failed to load :resource!", + "Another user has updated this resource since this page was loaded. Please refresh the page and try again.": "Another user has updated this resource since this page was loaded. Please refresh the page and try again.", + "Are you sure you want to delete this file?": "Are you sure you want to delete this file?", + "Are you sure you want to run this action?": "Are you sure you want to run this action?", + "Attach": "Attach", + "Attach & Attach Another": "Attach & Attach Another", + "Close": "Close", + "Cancel": "Cancel", + "Choose": "Choose", + "Choose File": "Choose File", + "Choose Files": "Choose Files", + "Drop file or click to choose": "Drop file or click to choose", + "Drop files or click to choose": "Drop files or click to choose", + "Choose Type": "Choose Type", + "Choose an option": "Choose an option", + "Click to choose": "Click to choose", + "Reset Filters": "Reset Filters", + "Create": "Create", + "Create & Add Another": "Create & Add Another", + "Delete File": "Delete File", + "Edit": "Edit", + "Edit Attached": "Edit Attached", + "Go Home": "Go Home", + "Hold Up!": "Hold Up!", + "Lens": "Lens", + "New": "New", + "Next": "Next", + "Only Trashed": "Only Trashed", + "Per Page": "Per Page", + "Preview": "Preview", + "Previous": "Previous", + "No Data": "No Data", + "No Current Data": "No Current Data", + "No Prior Data": "No Prior Data", + "No Increase": "No Increase", + "No Results Found.": "No Results Found.", + "Standalone Actions": "Standalone Actions", + "Run Action": "Run Action", + "Select Action": "Select Action", + "Search": "Search", + "Press / to search": "Press / to search", + "Select All Dropdown": "Select All Dropdown", + "Select all": "Select all", + "Select this page": "Select this page", + "Something went wrong.": "Something went wrong.", + "The action was executed successfully.": "The action was executed successfully.", + "The government won't let us show you what's behind these doors": "The government won't let us show you what's behind these doors", + "Update": "Update", + "Update & Continue Editing": "Update & Continue Editing", + "View": "View", + "We're lost in space. The page you were trying to view does not exist.": "We're lost in space. The page you were trying to view does not exist.", + "Show Content": "Show Content", + "Hide Content": "Hide Content", + "Whoops": "Whoops", + "Whoops!": "Whoops!", + "With Trashed": "With Trashed", + "Trashed": "Trashed", + "Write": "Write", + "total": "total", + "January": "January", + "February": "February", + "March": "March", + "April": "April", + "May": "May", + "June": "June", + "July": "July", + "August": "August", + "September": "September", + "October": "October", + "November": "November", + "December": "December", + "Afghanistan": "Afghanistan", + "Aland Islands": "Åland Islands", + "Albania": "Albania", + "Algeria": "Algeria", + "American Samoa": "American Samoa", + "Andorra": "Andorra", + "Angola": "Angola", + "Anguilla": "Anguilla", + "Antarctica": "Antarctica", + "Antigua And Barbuda": "Antigua and Barbuda", + "Argentina": "Argentina", + "Armenia": "Armenia", + "Aruba": "Aruba", + "Australia": "Australia", + "Austria": "Austria", + "Azerbaijan": "Azerbaijan", + "Bahamas": "Bahamas", + "Bahrain": "Bahrain", + "Bangladesh": "Bangladesh", + "Barbados": "Barbados", + "Belarus": "Belarus", + "Belgium": "Belgium", + "Belize": "Belize", + "Benin": "Benin", + "Bermuda": "Bermuda", + "Bhutan": "Bhutan", + "Bolivia": "Bolivia", + "Bonaire, Sint Eustatius and Saba": "Bonaire, Sint Eustatius and Saba", + "Bosnia And Herzegovina": "Bosnia and Herzegovina", + "Botswana": "Botswana", + "Bouvet Island": "Bouvet Island", + "Brazil": "Brazil", + "British Indian Ocean Territory": "British Indian Ocean Territory", + "Brunei Darussalam": "Brunei", + "Bulgaria": "Bulgaria", + "Burkina Faso": "Burkina Faso", + "Burundi": "Burundi", + "Cambodia": "Cambodia", + "Cameroon": "Cameroon", + "Canada": "Canada", + "Cape Verde": "Cape Verde", + "Cayman Islands": "Cayman Islands", + "Central African Republic": "Central African Republic", + "Chad": "Chad", + "Chile": "Chile", + "China": "China", + "Christmas Island": "Christmas Island", + "Cocos (Keeling) Islands": "Cocos (Keeling) Islands", + "Colombia": "Colombia", + "Comoros": "Comoros", + "Congo": "Congo", + "Congo, Democratic Republic": "Congo, Democratic Republic", + "Cook Islands": "Cook Islands", + "Costa Rica": "Costa Rica", + "Cote D'Ivoire": "Côte d'Ivoire", + "Croatia": "Croatia", + "Cuba": "Cuba", + "Curaçao": "Curaçao", + "Cyprus": "Cyprus", + "Czech Republic": "Czechia", + "Denmark": "Denmark", + "Djibouti": "Djibouti", + "Dominica": "Dominica", + "Dominican Republic": "Dominican Republic", + "Ecuador": "Ecuador", + "Egypt": "Egypt", + "El Salvador": "El Salvador", + "Equatorial Guinea": "Equatorial Guinea", + "Eritrea": "Eritrea", + "Estonia": "Estonia", + "Ethiopia": "Ethiopia", + "Falkland Islands (Malvinas)": "Falkland Islands (Malvinas)", + "Faroe Islands": "Faroe Islands", + "Fiji": "Fiji", + "Finland": "Finland", + "France": "France", + "French Guiana": "French Guiana", + "French Polynesia": "French Polynesia", + "French Southern Territories": "French Southern Territories", + "Gabon": "Gabon", + "Gambia": "Gambia", + "Georgia": "Georgia", + "Germany": "Germany", + "Ghana": "Ghana", + "Gibraltar": "Gibraltar", + "Greece": "Greece", + "Greenland": "Greenland", + "Grenada": "Grenada", + "Guadeloupe": "Guadeloupe", + "Guam": "Guam", + "Guatemala": "Guatemala", + "Guernsey": "Guernsey", + "Guinea": "Guinea", + "Guinea-Bissau": "Guinea-Bissau", + "Guyana": "Guyana", + "Haiti": "Haiti", + "Heard Island & Mcdonald Islands": "Heard Island and McDonald Islands", + "Holy See (Vatican City State)": "Vatican City", + "Honduras": "Honduras", + "Hong Kong": "Hong Kong", + "Hungary": "Hungary", + "Iceland": "Iceland", + "India": "India", + "Indonesia": "Indonesia", + "Iran, Islamic Republic Of": "Iran", + "Iraq": "Iraq", + "Ireland": "Ireland", + "Isle Of Man": "Isle of Man", + "Israel": "Israel", + "Italy": "Italy", + "Jamaica": "Jamaica", + "Japan": "Japan", + "Jersey": "Jersey", + "Jordan": "Jordan", + "Kazakhstan": "Kazakhstan", + "Kenya": "Kenya", + "Kiribati": "Kiribati", + "Korea, Democratic People's Republic of": "North Korea", + "Korea": "South Korea", + "Kosovo": "Kosovo", + "Kuwait": "Kuwait", + "Kyrgyzstan": "Kyrgyzstan", + "Lao People's Democratic Republic": "Laos", + "Latvia": "Latvia", + "Lebanon": "Lebanon", + "Lesotho": "Lesotho", + "Liberia": "Liberia", + "Libyan Arab Jamahiriya": "Libya", + "Liechtenstein": "Liechtenstein", + "Lithuania": "Lithuania", + "Luxembourg": "Luxembourg", + "Macao": "Macao", + "Macedonia": "North Macedonia", + "Madagascar": "Madagascar", + "Malawi": "Malawi", + "Malaysia": "Malaysia", + "Maldives": "Maldives", + "Mali": "Mali", + "Malta": "Malta", + "Marshall Islands": "Marshall Islands", + "Martinique": "Martinique", + "Mauritania": "Mauritania", + "Mauritius": "Mauritius", + "Mayotte": "Mayotte", + "Mexico": "Mexico", + "Micronesia, Federated States Of": "Micronesia", + "Moldova": "Moldova", + "Monaco": "Monaco", + "Mongolia": "Mongolia", + "Montenegro": "Montenegro", + "Montserrat": "Montserrat", + "Morocco": "Morocco", + "Mozambique": "Mozambique", + "Myanmar": "Myanmar", + "Namibia": "Namibia", + "Nauru": "Nauru", + "Nepal": "Nepal", + "Netherlands": "Netherlands", + "New Caledonia": "New Caledonia", + "New Zealand": "New Zealand", + "Nicaragua": "Nicaragua", + "Niger": "Niger", + "Nigeria": "Nigeria", + "Niue": "Niue", + "Norfolk Island": "Norfolk Island", + "Northern Mariana Islands": "Northern Mariana Islands", + "Norway": "Norway", + "Oman": "Oman", + "Pakistan": "Pakistan", + "Palau": "Palau", + "Palestinian Territory, Occupied": "Palestinian Territories", + "Panama": "Panama", + "Papua New Guinea": "Papua New Guinea", + "Paraguay": "Paraguay", + "Peru": "Peru", + "Philippines": "Philippines", + "Pitcairn": "Pitcairn Islands", + "Poland": "Poland", + "Portugal": "Portugal", + "Puerto Rico": "Puerto Rico", + "Qatar": "Qatar", + "Reunion": "Réunion", + "Romania": "Romania", + "Russian Federation": "Russia", + "Rwanda": "Rwanda", + "Saint Barthelemy": "St. Barthélemy", + "Saint Helena": "St. Helena", + "Saint Kitts And Nevis": "St. Kitts and Nevis", + "Saint Lucia": "St. Lucia", + "Saint Martin": "St. Martin", + "Saint Pierre And Miquelon": "St. Pierre and Miquelon", + "Saint Vincent And Grenadines": "St. Vincent and Grenadines", + "Samoa": "Samoa", + "San Marino": "San Marino", + "Sao Tome And Principe": "São Tomé and Príncipe", + "Saudi Arabia": "Saudi Arabia", + "Senegal": "Senegal", + "Serbia": "Serbia", + "Seychelles": "Seychelles", + "Sierra Leone": "Sierra Leone", + "Singapore": "Singapore", + "Sint Maarten (Dutch part)": "Sint Maarten", + "Slovakia": "Slovakia", + "Slovenia": "Slovenia", + "Solomon Islands": "Solomon Islands", + "Somalia": "Somalia", + "South Africa": "South Africa", + "South Georgia And Sandwich Isl.": "South Georgia and South Sandwich Islands", + "South Sudan": "South Sudan", + "Spain": "Spain", + "Sri Lanka": "Sri Lanka", + "Sudan": "Sudan", + "Suriname": "Suriname", + "Svalbard And Jan Mayen": "Svalbard and Jan Mayen", + "Swaziland": "Eswatini", + "Sweden": "Sweden", + "Switzerland": "Switzerland", + "Syrian Arab Republic": "Syria", + "Taiwan": "Taiwan", + "Tajikistan": "Tajikistan", + "Tanzania": "Tanzania", + "Thailand": "Thailand", + "Timor-Leste": "Timor-Leste", + "Togo": "Togo", + "Tokelau": "Tokelau", + "Tonga": "Tonga", + "Trinidad And Tobago": "Trinidad and Tobago", + "Tunisia": "Tunisia", + "Turkey": "Türkiye", + "Turkmenistan": "Turkmenistan", + "Turks And Caicos Islands": "Turks and Caicos Islands", + "Tuvalu": "Tuvalu", + "Uganda": "Uganda", + "Ukraine": "Ukraine", + "United Arab Emirates": "United Arab Emirates", + "United Kingdom": "United Kingdom", + "United States": "United States", + "United States Outlying Islands": "U.S. Outlying Islands", + "Uruguay": "Uruguay", + "Uzbekistan": "Uzbekistan", + "Vanuatu": "Vanuatu", + "Venezuela": "Venezuela", + "Viet Nam": "Vietnam", + "Virgin Islands, British": "British Virgin Islands", + "Virgin Islands, U.S.": "U.S. Virgin Islands", + "Wallis And Futuna": "Wallis and Futuna", + "Western Sahara": "Western Sahara", + "Yemen": "Yemen", + "Zambia": "Zambia", + "Zimbabwe": "Zimbabwe", + "Yes": "Yes", + "No": "No", + "Action Name": "Name", + "Action Initiated By": "Initiated By", + "Action Target": "Target", + "Action Status": "Status", + "Action Happened At": "Happened At", + "resource": "resource", + "resources": "resources", + "Choose date": "Choose date", + "The :resource was created!": "The :resource was created!", + "The resource was attached!": "The resource was attached!", + "The :resource was updated!": "The :resource was updated!", + "The resource was updated!": "The resource was updated!", + "The :resource was deleted!": "The :resource was deleted!", + "The :resource was restored!": "The :resource was restored!", + "Increase": "Increase", + "Constant": "Constant", + "Decrease": "Decrease", + "Reset Password Notification": "Reset Password Notification", + "Nova User": "Nova User", + "of": "of", + "no file selected": "no file selected", + "Sorry, your session has expired.": "Sorry, your session has expired.", + "Reload": "Reload", + "Key": "Key", + "Value": "Value", + "Add row": "Add row", + "Attach :resource": "Attach :resource", + "Create :resource": "Create :resource", + "Choose :resource": "Choose :resource", + "New :resource": "New :resource", + "Edit :resource": "Edit :resource", + "Update :resource": "Update :resource", + "Add :resource": "Add :resource", + "Start Polling": "Start Polling", + "Stop Polling": "Stop Polling", + "Choose :field": "Choose :field", + "Download": "Download", + "Action": "Action", + "Changes": "Changes", + "Original": "Original", + "This resource no longer exists": "This resource no longer exists", + "The resource was prevented from being saved!": "The resource was prevented from being saved!", + ":resource Details": ":resource Details", + "There are no available options for this resource.": "There are no available options for this resource.", + "All resources loaded.": "All resources loaded.", + "Load :perPage More": "Load :perPage More", + ":amount selected": ":amount selected", + ":amount Total": ":amount Total", + "Show All Fields": "Show All Fields", + "There was a problem submitting the form.": "There was a problem submitting the form.", + "There was a problem executing the action.": "There was a problem executing the action.", + "There was a problem fetching the resource.": "There was a problem fetching the resource.", + "Do you really want to leave? You have unsaved changes.": "Do you really want to leave? You have unsaved changes.", + "*": "*", + "—": "—", + "The file was deleted!": "The file was deleted!", + "This file field is read-only.": "This file field is read-only.", + "No additional information...": "No additional information...", + "ID": "ID", + "30 Days": "30 Days", + "60 Days": "60 Days", + "90 Days": "90 Days", + "Today": "Today", + "Month To Date": "Month To Date", + "Quarter To Date": "Quarter To Date", + "Year To Date": "Year To Date", + "Customize": "Customize", + "Update :resource: :title": "Update :resource: :title", + "Update attached :resource: :title": "Update attached :resource: :title", + ":resource Details: :title": ":resource Details: :title", + "The HasOne relationship has already been filled.": "The HasOne relationship has already been filled.", + "An error occurred while uploading the file.": "An error occurred while uploading the file.", + "An error occurred while uploading the file: :error": "An error occurred while uploading the file: :error", + "Previewing": "Previewing", + "Replicate": "Replicate", + "Are you sure you want to log out?": "Are you sure you want to log out?", + "There are no new notifications.": "There are no new notifications.", + "Resource Row Dropdown": "Resource Row Dropdown", + "This copy of Nova is unlicensed.": "This copy of Nova is unlicensed.", + "Impersonate": "Impersonate", + "Stop Impersonating": "Stop Impersonating", + "Are you sure you want to stop impersonating?": "Are you sure you want to stop impersonating?", + "Light": "Light", + "Dark": "Dark", + "System": "System", + "From": "From", + "To": "To", + "There are no fields to display.": "There are no fields to display.", + "Notifications": "Notifications", + "Mark all as Read": "Mark all as read", + "Delete all notifications": "Delete all notifications", + "Are you sure you want to delete all the notifications?" : "Are you sure you want to delete all the notifications?", + "Mark Read": "Mark Read", + "Mark Unread": "Mark Unread", + "Copy to clipboard": "Copy to clipboard", + "Are you sure you want to delete this notification?": "Are you sure you want to delete this notification?", + "The image could not be loaded": "The image could not be loaded", + "Filename": "Filename", + "Type": "Type", + "CSV (.csv)": "CSV (.csv)", + "Excel (.xlsx)": "Excel (.xlsx)", + "Attach files by dragging & dropping, selecting or pasting them.": "Attach files by dragging & dropping, selecting or pasting them.", + "Uploading files... (:current/:total)": "Uploading files... (:current/:total)", + "Remove": "Remove", + "Uploading": "Uploading", + "The image could not be loaded.": "The image could not be loaded.", + "User Actions": "User Actions" +} diff --git a/lang/vendor/nova/en/validation.php b/lang/vendor/nova/en/validation.php new file mode 100644 index 0000000..1d987d4 --- /dev/null +++ b/lang/vendor/nova/en/validation.php @@ -0,0 +1,19 @@ + 'This :attribute is already attached.', + 'relatable' => 'This :attribute may not be associated with this resource.', + +];