I am trying to change or update user details while custom login. i have a table named student_table. there has some student details. With mail address and password i can login in dashboard. but in dashboard there is a page named setting page. with setting page i want to update phone, address and password number. but while trying or i click that page, the page is showing with blank page. the image is below, anything error or suggestion for updating controller code?
My controller code
public function student_settings()
{
$student_id = Session::get('student_id');
$viewData = saveStudent::select('*')
-> where('student_id', $student_id)
-> first();
return view('student_settings', compact('viewData'));
}
View page Code
@extends('student_layout')
@section('content')
<div class="content-wrapper">
<div class="row">
<div class="col-12 col-lg-6 grid-margin">
<div class="card">
<div class="card-body">
<h2 class="card-title">Update Your Details
@if(count($errors) > 0)
@foreach($errors ->all() as $error)
<div class="alert alert-danger"> </div>
@endforeach
@endif
@if(count($viewData)> 0)
@foreach($viewData -> all() as $singleData)
<form class="forms-sample" method="post" action="">
<div class="form-group">
<label for="exampleInputEmail6">Student Phone</label>
<input type="text" id="exampleInputEmail6" class="form-control p-input" name="student_phone" placeholder="Enter PhoneNumber" value="">
</div>
<div class="form-group">
<label for="exampleInputEmail7">Student Address</label>
<input type="text" id="exampleInputEmail7" class="form-control p-input" name="student_address" placeholder="Enter Address" value="">
</div>
<div class="form-group">
<label for="exampleInputEmail7">Student Password</label>
<input type="password" id="exampleInputEmail7" class="form-control p-input" name="student_address" placeholder="Enter Address" value="">
</div>
<button type="submit" class="btn btn-success">Update</button>
</form>
@endforeach
@endif
</div>
</div>
</div>
</div>
</div>
@endsection
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire