Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- namespace App\Http\Controllers;
- use App\Http\Resources\WorkshopBookingResource;
- use App\Models\WorkshopBooking;
- use App\Models\WorkshopParticipant;
- use Illuminate\Http\Request;
- class WorkshopParticipantController extends Controller
- {
- public function store(Request $request)
- {
- $p = new WorkshopParticipant();
- $p->participant_name = $request->get('participant_name');
- $p->participant_fullname = $request->get('participant_fullname');
- $p->participant_dob = $request->get('participant_dob');
- $p->participant_gender = $request->get('participant_gender');
- $p->participant_profession = $request->get('participant_profession');
- $p->participant_mobilenumber = $request->get('participant_mobilenumber');
- $p->participant_email = $request->get('participant_email');
- $p->save();
- $p = new WorkshopBookingResource($p->load('workshopBookings'));
- return response($p);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement