When the user logs in successfully, we fire this event.
useTomatoPHP\TomatoCrm\Events\AccountLogged;publicfunctionregister(){Event::listen([AccountLogged::class ],function ($data) { $user = $data->model::find($data->modelId);if($user->meta('is_admin_approve')!=='yes'){returnresponse()->json(["status"=>false,"message"=>__('your Account is activated. but you cannot login till admin approve.'), ],400)->send(); } });}
Account Registered Event
When the user registers successfully, we fire this event.