4 weeks ago

attaching a json file to url string

Posted 4 weeks ago by AlexSteele

I need to generate a url string that can feed a json file to another service that consumes it, and to generate something like this:

what is happening is an error: View [streamtickets.index?sendOut=1600628175320354347.json] not found.

this file does indeed exists and is created on a function that returns a view

if (!is_dir($destinationPath)) { mkdir($destinationPath,0777,true); } File::put($destinationPath.$file,$data); return view('streamtickets.index?sendOut='. $file);

and my routing is something that looks like this

Route::get('/lstreams', function () {
    return view('{streams}');

so can anyone tell me how to format the route so it sees the name of the new file as it should? maybe I need to concatenate the return view better, it seems like that is the problem area.

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