Skip to content

admin actions and authentication for student#3

Open
minhquanghapo wants to merge 1 commit intoadminfirstfrom
adminaction
Open

admin actions and authentication for student#3
minhquanghapo wants to merge 1 commit intoadminfirstfrom
adminaction

Conversation

@minhquanghapo
Copy link
Owner

admin actions and authentication for student

}

public function addTeacher(RequestStudent $request)
public function addTeacher(RequestTeacher $request)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Anh nghĩ là tên file request nên đặt tường minh cho cái hành động đấy Vd như: UpdateTeacher, StoreTeacher..

return [
'id' =>'required|numeric',
'id' =>'required|numeric|unique:students',
'name' => 'required|max:50|min:5|max:255',

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

chưa kiểm tra trường hợp tên là số và các ký tự đặc biệt

<a href="{{url('admin/teacher/list-teacher')}}">Quản lý giáo viên</a>
<a href="{{url('admin/student/list-student')}}">Quản lý học sinh</a>
<a href="{{url('admin/subject/list-subject')}}">Quản lý môn học</a>
<a href="{{url('admin/class/list-class')}}">Quản lý lớp học</a>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

chuyển thành route hết đi em, dùng url làm gì

@endif
<form action="{{url('admin/edit-teacher')}}" method="POST" role="form" enctype="multipart/form-data">
<form action="{{url('admin/teacher/edit-teacher/'.$data->id)}}" method="POST" role="form" enctype="multipart/form-data">
{{ csrf_field() }}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

đoạn này k gửi file thì cần gì enctype="multipart/form-data" nhỉ

<h3>Thông tin học sinh</h3>

@if (isset(Auth::guard('student')->user()->name) )
<p>{!!Auth::guard('student')->user()->name!!}</p>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

anh nghĩ là k cần isset

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments