public function store($feed)
{
switch($feed)
{
case 'full':
$coupons = json_decode(file_get_contents('path-to-json-feed'), true);
break;
case 'incremental':
$coupons = json_decode(file_get_contents('path-to-different-json-feed'), true);
break;
}
var_dump($coupons);die();
$this->Deal_model->updateAllDeals($coupons);
echo 'Coupons Updated';
}
I am trying to assign a value to $coupons
but var_dump($coupons)
returns an empty array.