If your using \Request::file then the file should come along with the request params, But here seems like you want to access a stored file in file system using laravel
to do that
ini_set('memory_limit','256M');
$logs = \File::get('apache.log');
return view('logs' , [
'all_logs' => $logs
]);
UPDATE
if you file is in root same like composer.json then you need to change the path to match with it like
ini_set('memory_limit','256M');
$path = base_path()."/apache.log"; //get the apache.log file in root
$logs = \File::get($path);
return view('logs' , [
'all_logs' => $logs
]);
wrap this in a try catch block for best practice, because in some case if apache.log not exists or not accessible laravel trow a exception, we need to handle it
try {
ini_set('memory_limit','256M');
$path = base_path()."/apache.log"; //get the apache.log file in root
$logs = \File::get($path);
return view('logs' , [
'all_logs' => $logs
]);
} catch (Illuminate\Filesystem\FileNotFoundException $exception) {
// handle the exception
}
apache.login laravel?