skip to Main Content

how to redirect properly using a global middleware in Laravel?

I created a custom middleware to redirect short urls to other urls, I have a Url model that has this information: { "id":1, "original_url":"http://www.google.com", "short_url":"http://127.0.0.1:8000/wGjxw", "updated_at":"2023-02-08T21:05:39.000000Z", "created_at":"2023-02-08T21:05:39.000000Z" } so I have created a middleware: <?php namespace AppHttpMiddleware; use AppModelsUrl; use…

VIEW QUESTION
Back To Top
Search