Timeline for Laravel controller method to update user
Current License: CC BY-SA 4.0
10 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Aug 28, 2021 at 21:17 | comment | added | Sᴀᴍ Onᴇᴌᴀ♦ |
@Gass that is used to specify where the constant is define- self:: is used because it is in the same class. In your code it also references static methods in the same manner: Auth::user() , Storage::delete() , etc. Read more about scope resolution operator, Late Static Bindings as well as When to use self over $this?
|
|
Aug 22, 2021 at 8:26 | comment | added | Gass |
@Samonela could you explain me why is it necessary to use self:: I've been struggling to understand it.
|
|
Jun 22, 2021 at 22:44 | history | edited | Sᴀᴍ Onᴇᴌᴀ♦ | CC BY-SA 4.0 |
add missing closing brace
|
Apr 15, 2021 at 16:18 | history | edited | Sᴀᴍ Onᴇᴌᴀ♦ | CC BY-SA 4.0 |
added 38 characters in body
|
Apr 15, 2021 at 13:06 | vote | accept | Gass | ||
Apr 15, 2021 at 13:06 | comment | added | Gass |
Okay now it's working. Just one suggestion for edit. There is a } missing on the end of that snippet. Thanks Sam.
|
|
Apr 15, 2021 at 12:41 | comment | added | Sᴀᴍ Onᴇᴌᴀ♦ | Ah yes- the constant needs to be defined outside the method. I have updated that snippet | |
Apr 15, 2021 at 12:40 | history | edited | Sᴀᴍ Onᴇᴌᴀ♦ | CC BY-SA 4.0 |
added 102 characters in body
|
Apr 15, 2021 at 11:06 | comment | added | Gass |
Thank you Sam, this is very useful. I'm getting an error with const FIELDS and foreach error syntax error, unexpected 'const' (T_CONST) any suggestions?
|
|
Apr 14, 2021 at 20:54 | history | answered | Sᴀᴍ Onᴇᴌᴀ♦ | CC BY-SA 4.0 |