how to build page login laravel

Posted 3 weeks ago by cq522138

i want build login page in laravel but i have problem.when a user login they can see the information of others as well,how can i fix it. code in controller

public function registration($tutor_id){

        $this->TutorAuthCheck();
        $tutor = Tutor::findOrFail($tutor_id);
        return view('pages.registration',compact('tutor'));
    }
public function TutorAuthCheck(){
        $tutor_id = Session::get('tutor_id');
        if($tutor_id){
            return;
        }else{
            return redirect()->route('pages.login')->send()->with('message','bạn cần đăng nhập để thực hiện thao tác này');
        }
    }

Please sign in or create an account to participate in this conversation.