mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/izyim-api.git
synced 2026-08-19 04:24:01 +00:00
contact migration
This commit is contained in:
@@ -32,16 +32,9 @@ class ContactController extends Controller
|
||||
{
|
||||
//
|
||||
}
|
||||
public function searchContact($id)
|
||||
{
|
||||
|
||||
|
||||
|
||||
$matchedTerm = Breed::where('ff_id', 'LIKE', $id . '%')->get();
|
||||
return response()->json($matchedTerm);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Store a newly created resource in storage.
|
||||
*
|
||||
@@ -50,8 +43,21 @@ class ContactController extends Controller
|
||||
*/
|
||||
public function store(Request $request)
|
||||
{
|
||||
$contact = Contact::create($request->all());
|
||||
// $contact->created=true;
|
||||
// get company id from request ex: $request->input('company_id')
|
||||
// $company_id = $request->input('company_id'))
|
||||
|
||||
// query to find company asisng to $company
|
||||
// $company = Comapny::find($company_id)
|
||||
|
||||
// get user from session $request->user();
|
||||
// $user = $request->user();
|
||||
|
||||
// prepare query
|
||||
|
||||
|
||||
// insert into database
|
||||
|
||||
|
||||
return response()->json($contact, 201);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user