0

I have a folder named /admin/ in public which I can currently access through domain.com/admin/. How can I change the URL so I can access the folder from domain.com/very/secret/folder/ instead for example. (Without actually having to create the directories very, secret and folder) I believe this should be possible with using an Alias but I get an internal server error whenever I try.

ndiverr
  • 1
  • 1
  • that may help you .. https://stackoverflow.com/questions/30682421/how-to-protect-image-from-public-view-in-laravel-5 – Mustafa Reda Jun 13 '20 at 23:53
  • You need to provide a minimal code to reproduce the problem. See more details on how to post a question at this link: https://stackoverflow.com/help/minimal-reproducible-example – Usama Abdulrehman Jun 14 '20 at 02:54

1 Answers1

0

You would do this in routes. In routes/web.php you can enter something like:

Route::get('/very/secret/folder', function() {

    return view('secret');

});

This would return the view secret.blade.php. You can also do things like this:

Route::get('/very/secret/folder', 'SecretController@index');

This would call the index() method in SecretController where you can serve your view and do other things, like send data from your model.

22289d
  • 81
  • 1
  • 7