Files
YNWA Fawzy 500b716652 Features:
- add Ajio test
- add myntra test
- add nykaa test
- add snapdeal test
- add tataCliq test

Fixes:
- fix amazon poland price only getting thousands.
- fix single product store view.

Enhancements:
- add scroll to top page when page has changed.
- change layout for product page.
- preparing api for mobile application

Took 7 hours 52 minutes
2025-01-01 22:09:04 +04:00

31 lines
719 B
PHP

<?php
namespace App\Helpers;
use Illuminate\Support\Str;
class GeneralHelper
{
public static function get_numbers_only_with_dot($string): array|string|null
{
return preg_replace('/[^0-9.]/', '', $string);
}
public static function get_numbers_only($string): array|string|null
{
return preg_replace('/[^0-9]/', '', $string);
}
public static function get_value_from_meta_tag(array $meta_items, string $key , string $attribute): string
{
foreach ($meta_items as $meta)
foreach ($meta->attributes() as $value)
if ($value == $key)
return $meta->attributes()[$attribute]->__toString();
return "";
}
}