D
D
Dimon3x2019-06-28 22:06:16
Laravel
Dimon3x, 2019-06-28 22:06:16

How to prevent opening a link with a specific URL?

If you do this and go to localhost/images/id1/1561408555.jpg then it works

Route::get('/images/id{id}/{image}.jpg', function($image){
        die;
    })->where('image', '[0-9]+');

And if you add /uploads at the beginning, it does not catch
localhost/uploads/images/id1/1561408555.jpg
Route::get('/uploads/images/id{id}/{image}.jpg', function($image){
        die;
    })->where('image', '[0-9]+');

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question