So typically if you have access to the id of a user in laravel you can run User::find($id), however say you don\'t have access to the user\'s id and only their username. Is
Yes, even better using the model. just like this
User::where('username','John') -> first(); // or use like User::where('username','like','%John%') -> first(); User::where('username','like','%John') -> first(); User::where('username','like','Jo%') -> first();