app/Policies/StudentPolicy.php
/**
     * Determine if the given post can be updated by the user.
     *
     * @param  \App\User  $user
     * @param  \App\Models\Student  $student
     * @return \Illuminate\Auth\Access\Response
     */
Determine if the given post can be updated by the user.
Determine if the given post can be updated by the user .
public function update(User $user, Student $student)
    {
        return $user->id === $student->created_id
                ? Response::allow()
                : Response::deny('Chỉ user thêm mới sinh viên này mới có quyền sửa');
    }
public function update ( User $ user , Student $ student ) { return $ user -> id === $ student -> created_id ? Response :: allow ( ) : Response :: deny ( 'Chỉ user thêm mới sinh viên này mới có quyền sửa'); }
Determine if the given post can be updated by the user.
Determine if the given post can be updated by the user .