mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-18 12:31:27 +00:00
Merge pull request #529 from pixelfed/frontend-ui-refactor
Frontend ui refactor
This commit is contained in:
commit
40cc14fa2a
2 changed files with 7 additions and 4 deletions
|
@ -6,6 +6,7 @@ use App\Jobs\AvatarPipeline\CreateAvatar;
|
||||||
use App\Profile;
|
use App\Profile;
|
||||||
use App\User;
|
use App\User;
|
||||||
use App\UserSetting;
|
use App\UserSetting;
|
||||||
|
use DB;
|
||||||
|
|
||||||
class UserObserver
|
class UserObserver
|
||||||
{
|
{
|
||||||
|
@ -41,9 +42,11 @@ class UserObserver
|
||||||
}
|
}
|
||||||
|
|
||||||
if (empty($user->settings)) {
|
if (empty($user->settings)) {
|
||||||
$settings = new UserSetting();
|
DB::transaction(function() use($user) {
|
||||||
$settings->user_id = $user->id;
|
UserSetting::firstOrCreate([
|
||||||
$settings->save();
|
'user_id' => $user->id
|
||||||
|
]);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,5 +6,5 @@ use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
class UserSetting extends Model
|
class UserSetting extends Model
|
||||||
{
|
{
|
||||||
//
|
protected $fillable = ['user_id'];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue