Search
 
SCRIPT & CODE EXAMPLE
 

PHP

Laravel log reader

composer require haruncpi/laravel-log-reader
Comment

laravel reading log file

use IlluminateSupportFacadesFile;
use CarbonCarbon;

$date = new Carbon($request->get('date', today()));
$filePath = storage_path("logs/laravel-{$date->format('Y-m-d')}.log");
$data = [];
if (File::exists($filePath)) {
	$data = [
		'lastModified' => new Carbon(File::lastModified($filePath)),
		'size' => File::size($filePath),
		'file' => File::get($filePath),
	];
}
return $data;
Comment

PREVIOUS NEXT
Code Example
Php :: get min value from array php 
Php :: laravel activity log 
Php :: wp php get product item attributes name 
Php :: how to use seeders in laravel 
Php :: wp_list_pluck 
Php :: how laravel return the old value 
Php :: wp php go back 
Php :: query relationships laravel and select some columns 
Php :: special characters in php 
Php :: laravel check if email is verified 
Php :: php http errorcode 
Php :: wordpress display menu by name 
Php :: how to return chunk data laravel 
Php :: php sprintf 
Php :: laravel routes not working on production server 
Php :: update image in database using php 
Php :: Allowed memory size of 1610612736 bytes exhausted (tried to allocate 4096 bytes) laravel 
Php :: composer create new laravel project 
Php :: laravel echo html 
Php :: how to make a comment in php 
Php :: if function not exists php 
Php :: laravel mysql specified key was too long 
Php :: excerpt with Laravel 
Php :: php exec get pid 
Php :: rawbetween in laravel 
Php :: why we use .htaccess file in php 
Php :: read xml file in php wordpress 
Php :: php string random 
Php :: laravel backup 
Php :: laravel on cascade set null 
ADD CONTENT
Topic
Content
Source link
Name
8+8 =