Skip to content

PHP code snippet – How return cutomize error text the firstOrFail laravel exeption?

Route::bind('administrator', function ($id) {
        return Administrator::find($id) ?? abort(404, 'Administrator does not exist.');
});

See also  PHP code snippet - used resoure route How to add another route?

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.