jonjie
551
25
Laravel

Returns a 404 error when linking into a file

Posted 1 year ago by jonjie

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:

<iframe src="{{ asset($exam->file_path) }}" frameborder="0"></iframe>

I'm basically returning $exam from my controller.

If I dd() the $exam->file_path, it returns file/1/pdf/Examination part 1.pdf

Please sign in or create an account to participate in this conversation.

Reply to

Use Markdown with GitHub-flavored code blocks.