Skip to content
This repository has been archived by the owner on Jan 31, 2023. It is now read-only.

Commit

Permalink
Enhancement #41: added store function in controller
Browse files Browse the repository at this point in the history
  • Loading branch information
arindamkabir committed Aug 18, 2019
1 parent 7dda49a commit da0b107
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion PROJECT CODE/app/Http/Controllers/AppointmentController.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,22 @@
namespace App\Http\Controllers;

use Illuminate\Http\Request;
use DB;

class AppointmentController extends Controller
{
//
public function store(Request $request){

$data = DB::table('appointments')->insert(
[
'user_id' => \Auth::id(),
'pay_method' => $request->pay_method,
'total' => Cart::total(),
'created_at' => date('Y-m-d H:i:s')
]);

return redirect()->route('doctor.doctors')->with('success', 'Appointment Successfully Requested. You will be notified after confirmation.');

}

}

0 comments on commit da0b107

Please sign in to comment.