NG
Natnael Getachew

Login - Copy this React, Mui Component to your project

public function login(Request $request) { $request >validate([ 'email' => 'required|email', 'password' => 'required', ]); $artist = Artist::where('email', $request >email) >first(); if ($artist >password==$request >password) { $request >session() >put('id', $artist >id); return redirect() >route('artist.home', ['id' => $artist >id]); } return redirect() >route('artist.login') >with('error', 'Invalid email or password.'); }

Prompt

About

Login - Securely authenticate users with email and password validation, session management, and error handling. Built with React and MU. Copy template now!

Share

Last updated 1 month ago