update
This commit is contained in:
parent
ecf62a45e9
commit
15ef505c00
2 changed files with 2 additions and 42 deletions
|
@ -35,46 +35,4 @@ class HostingPlansController extends ApiController
|
|||
]);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @OA\Post(
|
||||
* path="/api/customers",
|
||||
*
|
||||
* @OA\Response(
|
||||
* response=200,
|
||||
* description="Successful operation",
|
||||
* ),
|
||||
*
|
||||
* @OA\PathItem (
|
||||
* ),
|
||||
*
|
||||
* @OA\RequestBody(
|
||||
* required=true,
|
||||
*
|
||||
* @OA\JsonContent(
|
||||
* required={"name","email","phone"},
|
||||
*
|
||||
* @OA\Property(property="name", type="string", example="John Doe", description="Name of the customer"),
|
||||
* @OA\Property(property="email", type="string", example="jhon@gmail.com", description="Email of the customer"),
|
||||
* @OA\Property(property="phone", type="string", example="1234567890", description="Phone of the customer")
|
||||
* )
|
||||
* )
|
||||
* )
|
||||
*/
|
||||
public function store(CustomerCreateRequest $request)
|
||||
{
|
||||
$customer = new Customer();
|
||||
$customer->name = $request->name;
|
||||
$customer->email = $request->email;
|
||||
$customer->phone = $request->phone;
|
||||
$customer->save();
|
||||
|
||||
return response()->json([
|
||||
'status' => 'ok',
|
||||
'message' => 'Customer created',
|
||||
'data' => [
|
||||
'customer' => $customer,
|
||||
],
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -79,6 +79,8 @@ class PhyreServer extends Model
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// // Sync Hosting Plans
|
||||
// $getHostingPlans = HostingPlan::all();
|
||||
// if ($getHostingPlans->count() > 0) {
|
||||
|
|
Loading…
Reference in a new issue