mirror of
https://github.com/kevin-DL/LaravelShoppingcart.git
synced 2026-01-11 18:54:33 +00:00
@@ -4,31 +4,31 @@ use Illuminate\Support\Collection;
|
||||
|
||||
class CartRowOptionsCollection extends Collection {
|
||||
|
||||
public function __construct($items)
|
||||
{
|
||||
parent::__construct($items);
|
||||
}
|
||||
public function __construct($items)
|
||||
{
|
||||
parent::__construct($items);
|
||||
}
|
||||
|
||||
public function __get($arg)
|
||||
{
|
||||
if($this->has($arg))
|
||||
{
|
||||
return $this->get($arg);
|
||||
}
|
||||
public function __get($arg)
|
||||
{
|
||||
if($this->has($arg))
|
||||
{
|
||||
return $this->get($arg);
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
public function search(Array $search)
|
||||
{
|
||||
foreach($search as $key => $value)
|
||||
{
|
||||
$found = ($this->{$key} === $value) ? true : false;
|
||||
public function search(Array $search)
|
||||
{
|
||||
foreach($search as $key => $value)
|
||||
{
|
||||
$found = ($this->{$key} === $value) ? true : false;
|
||||
|
||||
if( ! $found) return false;
|
||||
}
|
||||
if( ! $found) return false;
|
||||
}
|
||||
|
||||
return $found;
|
||||
}
|
||||
return $found;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user