Hi guys, I'm trying to visit a specific pdf file in my laravel app. but it returns an error that's telling me to create a route. I think it's because of the path I'm giving. Do you have any idea to solve this? Please see my code below for your reference:
@deansatch No I haven't. I just want to access the exact pdf file without any route. Because sometimes I'm having a problem when viewing pdf file if I use <object> or <iframe>. Sometimes it returns a blank page, that's why I'm decided to use the exact file instead.
have you tried renaming the file so it has no spaces? Ensured the path is correct? In the address bar it would not include '/public/'. What does the full url look like?
Remove public from the url and try again. If this is a laravel project public would be your public root i.e. if http://localhost/ loads your laravel home page then it is actually pointing to your public folder.
My pdf file contains hash sign (#) that treats the file as id not the exact file name. Example, if you have a file name like Examination #1.pdf, just remove the # sign so it will not be treated as an ID in the url.