alexeymezenin / laravel-best-practices

Laravel best practices
11.44k stars 2.38k forks source link

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

Closed farhad2161 closed 4 days 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?