function pastAppointment() { if (isset($_SESSION['authorization'])) { if ($_SESSION['authorization'] == 1) { $clients = Client::pastAppointment(); } else { $clients = Client::pastDoctorAppointment($_SESSION['user_id']); } return view('clients.pastAppointment', ['clients' => $clients]); } else { //$_SESSION['mesaj'] = '<div class="form-signin" style="background-color:pink;"><center><p style="color:red;">Bu Sayfaya Girme Yetkiniz Yok .</p></center></div>'; return Redirect::to('./sayfa-bulunamadi'); } }