mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/izyim-api.git
synced 2026-08-19 04:24:01 +00:00
fixed database issue
This commit is contained in:
@@ -24,18 +24,6 @@ class ContactController extends Controller
|
||||
return response()->json($contact, 200);
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for creating a new resource.
|
||||
*
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function create()
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Store a newly created resource in storage.
|
||||
*
|
||||
@@ -67,51 +55,6 @@ class ContactController extends Controller
|
||||
return response()->json($contact, 201);
|
||||
}
|
||||
|
||||
/**
|
||||
* Display the specified resource.
|
||||
*
|
||||
* @param int $id
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function show($id)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for editing the specified resource.
|
||||
*
|
||||
* @param int $id
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function edit($id)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the specified resource in storage.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param int $id
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function update(Request $request, $id)
|
||||
{
|
||||
// $contact = Contact::find($id);
|
||||
// if (!$contact)
|
||||
// {
|
||||
// return response()->json(['message'=>'ID not found'],200);
|
||||
//
|
||||
// }
|
||||
//
|
||||
// $contact->ff_id=$request->input('ff_id');
|
||||
//
|
||||
//
|
||||
// $contact->save();
|
||||
// return response()->json(['contact'=>$contact],200);
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the specified resource from storage.
|
||||
*
|
||||
@@ -120,7 +63,8 @@ class ContactController extends Controller
|
||||
*/
|
||||
public function destroy($id)
|
||||
{
|
||||
$contact=Contact::find($id);
|
||||
$contact = Contact::where("user_id", Auth::user()->id)->where('id', $id)->first();
|
||||
//$contact=Contact::find($id);
|
||||
$contact->delete();
|
||||
|
||||
return response()->json($contact, 204);
|
||||
|
||||
Generated
+278
-265
File diff suppressed because it is too large
Load Diff
+3
-3
@@ -43,9 +43,9 @@ return [
|
||||
'driver' => 'mysql',
|
||||
'host' => env('DB_HOST', '127.0.0.1'),
|
||||
'port' => env('DB_PORT', '3306'),
|
||||
'database' => env('DB_DATABASE', 'forgzze'),
|
||||
'username' => env('DB_USERNAME', 'forge'),
|
||||
'password' => env('DB_PASSWORD', ''),
|
||||
'database' => env('DB_DATABASE', 'izyim1'),
|
||||
'username' => env('DB_USERNAME', 'izyim1'),
|
||||
'password' => env('DB_PASSWORD', 'izyim1'),
|
||||
'unix_socket' => env('DB_SOCKET', ''),
|
||||
'charset' => 'utf8mb4',
|
||||
'collation' => 'utf8mb4_unicode_ci',
|
||||
|
||||
Reference in New Issue
Block a user