I am using the basic authentication system included in laravel package and have a user schema which contains the following:
Schema::create('users', function (Blueprint $table) {
$table->increments('id');
$table->string('name');
$table->string('email')->unique();
$table->string('password');
$table->rememberToken();
$table->timestamps();
});
I am using Auth::user()->name to return the name of current user.
Is there a pre-defined function to return the name of user with a specific id?
If not, how can I do it?