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

Commit

Permalink
Enhancement #41: minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
arindamkabir committed Aug 18, 2019
1 parent da0b107 commit d0763a2
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 5 deletions.
6 changes: 3 additions & 3 deletions PROJECT CODE/app/Http/Controllers/AppointmentController.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ public function store(Request $request){
$data = DB::table('appointments')->insert(
[
'user_id' => \Auth::id(),
'pay_method' => $request->pay_method,
'total' => Cart::total(),
'doctor_id' => $request->doctor_id,
'app_date' => NULL,
'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.');
return redirect()->route('doctor.index')->with('success', 'Appointment Successfully Requested. You will be notified after confirmation.');

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public function up()
$table->bigIncrements('app_id');
$table->integer('user_id');
$table->integer('doctor_id');
$table->date('app_date');
$table->date('app_date')->nullable();
$table->timestamps();
});
}
Expand Down
20 changes: 19 additions & 1 deletion PROJECT CODE/resources/views/doctor/doctors.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,24 @@

@section('content')
<div class="container">
<!-- Toast -->
@if (session('success'))

<div class="toast" role="alert" aria-live="assertive" aria-atomic="true">
<div class="toast-header">
<img src="..." class="rounded mr-2" alt="...">
<strong class="mr-auto">Bootstrap</strong>
<small class="text-muted">11 mins ago</small>
<button type="button" class="ml-2 mb-1 close" data-dismiss="toast" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="toast-body">
Hello, world! This is a toast message.
</div>
</div>

@endif

<div class="list-group">
<a href="#" class="list-group-item list-group-item-action">Doctors</a>
Expand All @@ -13,7 +31,7 @@
<p>{{$doctor->doc_name}}</p>
<form action="{{route('appointment.store')}}" method="POST">
@csrf
<input type="text" name="doctor_id" class="form-control" placeholder="{{$doctor->doc_id}}">
<input type="hidden" name="doctor_id" class="form-control" value="{{$doctor->doc_id}}">

<div class="text-right mt-5">
<button type="submit" class="crt-btn">Make Appointment</button>
Expand Down

0 comments on commit d0763a2

Please sign in to comment.