alexeymezenin / laravel-best-practices

Laravel best practices
11.25k stars 2.37k forks source link

add another shorter syntax example, auth()->id #131

Open farhad2161 opened 2 years ago

farhad2161 commented 2 years ago

Add a shorter syntax for auth()->user()->id

alexeymezenin commented 2 years ago

As far as I remember, there are a few problems with auth()->id, so it's a good idea to use auth()->id() instead. Could you change that and add the line to all translations?