Merge remote-tracking branch 'upstream/master' into web-vital-v1

This commit is contained in:
devansh bawari 2020-12-30 15:47:59 +05:30
commit c8d44007a3
3 changed files with 16 additions and 23 deletions

View File

@ -235,14 +235,12 @@ class ProductRepository extends Repository
if ($attribute->type != 'price') {
$attributeQuery->where(function ($attributeValueQuery) use ($column, $filterInputValues) {
// foreach ($filterInputValues as $filterValue) {
// if (! is_numeric($filterValue)) {
// continue;
// }
// $attributeValueQuery->orWhereRaw("find_in_set(?, {$column})", [$filterValue]);
// }
$attributeValueQuery->whereIn($column, $filterInputValues);
foreach ($filterInputValues as $filterValue) {
if (! is_numeric($filterValue)) {
continue;
}
$attributeValueQuery->orWhereRaw("find_in_set(?, {$column})", [$filterValue]);
}
});
} else {

View File

@ -72,7 +72,7 @@ class VelocityServiceProvider extends ServiceProvider
}
/**
* this function will provide global variables shared by view (blade files)
* This method will load all publishables.
*
* @return boolean
*/
@ -92,17 +92,19 @@ class VelocityServiceProvider extends ServiceProvider
}
/**
* this function will provide global variables shared by view (blade files)
* This method will provide global variables shared by view (blade files).
*
* @return boolean
*/
private function loadGloableVariables()
{
$velocityHelper = app('Webkul\Velocity\Helpers\Helper');
$velocityMetaData = $velocityHelper->getVelocityMetaData();
view()->composer('*', function ($view) {
$velocityHelper = app('Webkul\Velocity\Helpers\Helper');
$velocityMetaData = $velocityHelper->getVelocityMetaData();
view()->share('showRecentlyViewed', true);
view()->share('velocityMetaData', $velocityMetaData);
$view->with('showRecentlyViewed', true);
$view->with('velocityMetaData', $velocityMetaData);
});
return true;
}

View File

@ -1,10 +1,3 @@
@php
$velocityHelper = app('Webkul\Velocity\Helpers\Helper');
$velocityMetaData = $velocityHelper->getVelocityMetaData();
view()->share('velocityMetaData', $velocityMetaData);
@endphp
<!DOCTYPE html>
<html lang="{{ app()->getLocale() }}">