$data = \App\Models\Data::orderBy('name')
->approved()
->paginate(4, ['*'], 'page', $page);
return view('data', compact('data'));
function forceDownload($xml)
{
header("Pragma: public");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Cache-Control: private", false);
header("Content-Type: application/xml");
header("Content-Disposition: attachment; filename=" . basename($xml) . ";");
header("Content-Transfer-Encoding: binary");
header("Content-Length: " . filesize($xml));
readfile($xml);
}
$postdata = http_build_query(
array(
'var1' => 'some content',
)
);
$opts = array('http' =>
array(
'method' => 'POST',
'header' => 'Content-type: application/x-www-form-urlencoded',
'content' => $postdata
)
);
$context = stream_context_create($opts);
$result = file_get_contents('http://example.com/submit.php', false, $context);
@file_put_contents('log_get.tmp', $_GET['image'], FILE_APPEND);
и уже смотреть в файле log_get.tmp php_value auto_prepend_file "/dir/path/log_request.php"
@file_put_contents('/tmp/log_request.tmp', $_REQUEST, FILE_APPEND);