added announcement
This commit is contained in:
@@ -19,6 +19,8 @@ class TeamStoreController extends Controller {
|
||||
{
|
||||
// var_dump($teamStoreURL);
|
||||
$m = new TeamStoreModel;
|
||||
$UserModel = new UserModel;
|
||||
|
||||
$store_array = $m->selectTeamStore('StoreUrl', $teamStoreURL);
|
||||
$product_array = $m->selectTeamStoreProducts('TeamStoreId', $store_array[0]->Id);
|
||||
$user_role = '';
|
||||
@@ -44,7 +46,6 @@ class TeamStoreController extends Controller {
|
||||
return redirect()->back();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -81,11 +82,24 @@ class TeamStoreController extends Controller {
|
||||
);
|
||||
}
|
||||
}
|
||||
$getAnnouncement = $UserModel->getAnnouncement($store_array[0]->Id);
|
||||
|
||||
if(count($getAnnouncement) > 0){
|
||||
$data = $getAnnouncement[0];
|
||||
}else{
|
||||
$data = (object) array(
|
||||
'Id' => 0,
|
||||
'StoreId' => "",
|
||||
'Announcement' => "",
|
||||
'IsActive' => 0,
|
||||
'DateCreated' => ""
|
||||
);
|
||||
}
|
||||
|
||||
// var_dump($thumbnails);
|
||||
return view('teamstore-sublayouts.index')
|
||||
->with('store_array', $store_array)
|
||||
->with('product_array', $product_array)
|
||||
->with('announcement', $data)
|
||||
->with('thumbnails', $thumbnails);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user