Notice: include(): Read of 1797 bytes failed with errno=12 Cannot allocate memory in /home/mazadatland/public_html/vendor/composer/ClassLoader.php on line 571
Notice: include(): Read of 1797 bytes failed with errno=12 Cannot allocate memory in /home/mazadatland/public_html/vendor/composer/ClassLoader.php on line 571
$classList = static::wrap($array);
$classes = [];
foreach ($classList as $class => $constraint) {
if (is_numeric($class)) {
$classes[] = $constraint;
} elseif ($constraint) {
$classes[] = $class;
}
}
return implode(' ', $classes);
}
/**
* Conditionally compile styles from an array into a style list.
*
* @param array $array
* @return string
*/
public static function toCssStyles($array)
{
$styleList = static::wrap($array);
$styles = [];
foreach ($styleList as $class => $constraint) {
if (is_numeric($class)) {
$styles[] = Str::finish($constraint, ';');
} elseif ($constraint) {
$styles[] = Str::finish($class, ';');
}
}
return implode(' ', $styles);
}
/**
* Filter the array using the given callback.
*
* @param array $array
* @param callable $callback
* @return array
*/
public static function where($array, callable $callback)
{
return array_filter($array, $callback, ARRAY_FILTER_USE_BOTH);
}
/**
* Filter items where the value is not null.
*
* @param array $array
* @return array
*/
public static function whereNotNull($array)
{
return static::where($array, fn ($value) => ! is_null($value));
}
/**
* If the given value is not an array and not null, wrap it in one.
*
* @param mixed $value
* @return array
*/
public static function wrap($value)
{
if (is_null($value)) {
return [];
}
return is_array($value) ? $value : [$value];
}
}
Fatal error: Uncaught Error: Class "Illuminate\Support\Arr" not found in /home/mazadatland/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:838
Stack trace:
#0 /home/mazadatland/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(825): Illuminate\Foundation\Application->getProviders(Object(Illuminate\Events\EventServiceProvider))
#1 /home/mazadatland/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(775): Illuminate\Foundation\Application->getProvider(Object(Illuminate\Events\EventServiceProvider))
#2 /home/mazadatland/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(243): Illuminate\Foundation\Application->register(Object(Illuminate\Events\EventServiceProvider))
#3 /home/mazadatland/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(203): Illuminate\Foundation\Application->registerBaseServiceProviders()
#4 /home/mazadatland/public_html/bootstrap/app.php(15): Illuminate\Foundation\Application->__construct('/home/mazadatla...')
#5 /home/mazadatland/public_html/public/main.php(47): require_once('/home/mazadatla...')
#6 /home/mazadatland/public_html/public/index.php(64): require('/home/mazadatla...')
#7 {main}
thrown in /home/mazadatland/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Application.php on line 838