laravel use username as login code example
Example 1: how to find the name of login user in laravel
Auth::user()->name
Example 2: laravel add user
php artisan tinker
DB::table('users')->insert(['name'=>'MyUsername','email'=>'[email protected]','password'=>Hash::make('123456')])