bug fixing

This commit is contained in:
Zain Fauzan Rofie Azizi
2018-06-26 13:15:42 +08:00
parent 3eb17d397b
commit f6222c6253
3 changed files with 65 additions and 104 deletions
+2 -2
View File
@@ -9,14 +9,14 @@ use Illuminate\Http\Request;
class ContactController extends Controller
{
/**
* list the company that belongs to user's company only
*
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function index()
{
$contacts = Contact::where('user_id', Auth::user()->id)->where('id', $id)->first();
$contacts = Contact::where('user_id', Auth::user()->id)->where('id', $id)->get();
if (!$contacts)
{
@@ -40,7 +40,6 @@ class WarehouseController extends Controller
public function show($id)
{
$warehouses = DB::table('warehouses')
//->join('id', 'address', 'city', 'zip')
->select('id', 'address', 'city', 'zip', 'state', 'contact_person', 'contact_person_no', 'branch', 'country', 'com_id')
->where('com_id', Auth::user()->company())
->get();