Add (scraper)
Update (ai): integrate scraper
This commit is contained in:
@@ -25,6 +25,21 @@ public static function readJson($storage_driver, $relative_directory, $filename)
|
||||
return null;
|
||||
}
|
||||
|
||||
public static function readFile($storage_driver, $relative_directory, $filename)
|
||||
{
|
||||
$filepath = rtrim($relative_directory, '/').'/'.$filename;
|
||||
|
||||
try {
|
||||
return Storage::disk($storage_driver)->get($filepath);
|
||||
|
||||
} catch (\Exception $e) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
public static function uploadJson($storage_driver, $relative_directory, $filename, $jsonData)
|
||||
{
|
||||
$jsonString = json_encode($jsonData, JSON_PRETTY_PRINT);
|
||||
|
||||
Reference in New Issue
Block a user