contact migration

This commit is contained in:
Asif
2018-05-14 16:23:56 +08:00
19 changed files with 933 additions and 24 deletions
+15 -9
View File
@@ -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);
}