Menu
Forums
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Trending
What's new
New posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Search profile posts
Upgrades
Log in
Register
What's new
Search
Search
Search titles only
By:
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
Server Development
Habbo Retros
Habbo Development
BrainCMS V2 [Arcturus EMU / Laravel 5.7 / Boostrap 4.3]
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="LeChris" data-source="post: 445872" data-attributes="member: 37998"><p>Your code is also redundant a bit and there is also no need to directly access the DB from the DB facade if you use Eloquent.</p><p></p><p>Example would be your client could just simply be</p><p>Auth::user()->update([ "sso" => $sso ]);</p><p></p><p>You also are not using relationships the right way; example on your user model would be. This code probably needs adjusted a little and would assume you create an Eloquent model for users currency in the same namespace</p><p>[CODE=php]public function currency ()</p><p>{</p><p> return $this->hasMany(UserCurrency::class, 'user_id');</p><p>}</p><p>[/CODE]</p><p></p><p>If you have a Discord, feel free to add me and ask me any Laravel questions as I use it daily at work. LeChris#9188</p></blockquote><p></p>
[QUOTE="LeChris, post: 445872, member: 37998"] Your code is also redundant a bit and there is also no need to directly access the DB from the DB facade if you use Eloquent. Example would be your client could just simply be Auth::user()->update([ "sso" => $sso ]); You also are not using relationships the right way; example on your user model would be. This code probably needs adjusted a little and would assume you create an Eloquent model for users currency in the same namespace [CODE=php]public function currency () { return $this->hasMany(UserCurrency::class, 'user_id'); } [/CODE] If you have a Discord, feel free to add me and ask me any Laravel questions as I use it daily at work. LeChris#9188 [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Server Development
Habbo Retros
Habbo Development
BrainCMS V2 [Arcturus EMU / Laravel 5.7 / Boostrap 4.3]
Top