S
S
stdio962016-07-26 15:01:06
Sessions
stdio96, 2016-07-26 15:01:06

How to change authorized user details in Laravel?

Hello. At the moment, to change the data of an authorized user in the database, I use the following code:

Auth::user()->somedata = 123456;
Auth::user()->save();

Question: is it safe? Maybe there are better options? Or is that okay too?
Thanks

Answer the question

In order to leave comments, you need to log in

1 answer(s)
J
JhaoDa, 2016-07-26
@stdio96

Yes. There are other options, but they are not fundamentally different from this.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question