Currently I have a project with laravel 5.5
I have some text files stored in storage/public/*
I have been thinking if there is a way to use laravel's blade and open the selected file directly instead of making a request to the backend to retrieve the content then display.
The idea is inside *.blade.php
there will be a button to click, then instead of making request to the backend, can we just open the text file then show the content?
let's say for example, I do have html code like
<input type='hidden' value='filePath' name=path>
<a href="">text file name</a>
when the anchor is clicked, usually it would be making a request to the backend open the file, get the content, pass it back to the front. But what I am thinking is, since the frontend knows where the path is, name of the file. Is it possible to do it at front end? This way no requests need to be done faster too.
But I do not have an idea how to even start it.
Does someone has any suggestions?
Thanks in advance for any help.