Laravel Custom Error Pages & Error Handling - laravel

I need to show suggestions related to its model if the model is not found. Let say User is accessing Job ABC21, but this job is no longer exist, and therefore Laravel displays an 404 Error page. Laravel by default only shows 404 Error Title and Message, however I want to change them by displaying list of Jobs suggestions.
Same scenario goes to other models.
I know that we can modify the view of 404 Error page by creating 404.blade.php inside resources/views/errors. But it only change the view.
How can I work around on this?
Thank You

Related

How to make create form on Laravel Nova shown as modal

I'am recenly used laravel nova as my CMS. but I still confuse to create modal when create resource button clicked. I was tried to use Resource tool but I got error the resource not found.
my goal, just want to displaying create user form as a modal. so, when user click create user button in this following image. popup will shown instead of redirecting to another page
anyone can help me, please.
Thanks in advance
This old Nova plugin still works, (Nova 3.29), though it's hardcoded for a primaryKey of id and has a few minor bugs.
https://github.com/ahmed-m-hussain/nova-Hasmany-To-Modal-Popup

Laravel Status in German

I want to know if its possible to set some Laravel status in another language.
Sometimes I got this status:
The page has expired due to inactivity.Please refresh and try again.
The website looks like this:
How is it possible to say to Laravel I want all these pages in German?
I searched so many things and I changed these error messages in German but I cant find anything to change websites like this?
You can create new HTTP errors views.
resources/views/errors
This one is 419 error, I think.
Laravel DOC here

Laravel Showing Database details when having an error

I am using Laravel for my new application, but whenever any error comes while doing the code its shows me the reason for that error but also list all the details of the database as well.
Is there any way I can hide those details
Thanks

My Magento store Warnings and Error messages for users are displaying on wrong pages

Good Day I've got a magento store that is working perfectly fine. But the only issue is that Error messages are not displaying where they suppose to be displayed.
For example the message displayed on the screenshot was supposed to be displayed on the onestepcheckout. But instead it is displayed on the homepage.
hi #mthetheleli beseti
go to onestepcheckout controller and add this in indexAction near
$this->loadLayout()
->_initLayoutMessages('checkout/session')
->_initLayoutMessages('catalog/session')
$this->renderLayout();
add only $this->_initLayoutMessages('checkout/session');
between $this->loadLayout() and $this->renderLayout();
Hope this will help you
Error messages are stored in sessions, so
If you have modified the redirects, removed the message blocks from templates or are using ->getGroupedHtml() in enterprise instead of ->toHtml() you will find these issues.
Once the message gets called it is cleared.
There are many different type of sessions models, but to me this to me looks like it is using either core/session or checkout/session

Error Messages are not displayed on my custom registration form phtml page in magento

I am currently working on managing three types(normal user, Author, Editor) of users in magento.
I need to create a separate registration forms for Author and editor. But all the users are saved using the single createpost action in Accountcontroller.php .
The registration form for author is in authorregister.phtml every thing is working fine except the error messages.
Form error messages are not diplayed on the authorregister.phtml file.
Then i plced the block $this->getMessagesBlock()->getGroupedHtml(); even after that also the error messages are not displyed.
To My Surprise these error messages are going and displaying on persistent/customer/form/register.phtml page.
i am unable to find the issue why this form error messages are getting displayed on that page load.
can any one help me out.
Hello following tips may be help you.....
In authorregister.phtml add first line
< div id="messages_product_view"><?php echo $this->getMessagesBlock()->getGroupedHtml() ?>< /div>
In Accountcontroller.php before redirect
Mage::getSingleton('core/session')->addSuccess(Mage::helper('modulename')->__('Thank you .'));

Resources