Skip to main content
add missing closing brace
Source Link
//could be moved to the model or another namespace
const FIELDS = ['username', 'wallet_address', 'about', 'password', 'website', 'location'];
public function update(Request $request){
    $user = Auth::user();
    foreach (self::FIELDS as $field) {
        if ($request->$field) {
            $user->$field = $request->$field;
            $user->save();
        }
    }
    //handle avatar image update
}
//could be moved to the model or another namespace
const FIELDS = ['username', 'wallet_address', 'about', 'password', 'website', 'location'];
public function update(Request $request){
    $user = Auth::user();
    foreach (self::FIELDS as $field) {
        if ($request->$field) {
            $user->$field = $request->$field;
            $user->save();
        }
    }
    //handle avatar image update
//could be moved to the model or another namespace
const FIELDS = ['username', 'wallet_address', 'about', 'password', 'website', 'location'];
public function update(Request $request){
    $user = Auth::user();
    foreach (self::FIELDS as $field) {
        if ($request->$field) {
            $user->$field = $request->$field;
            $user->save();
        }
    }
    //handle avatar image update
}
added 38 characters in body
Source Link
//could be moved to the model or another namespace
const FIELDS = ['username', 'wallet_address', 'about', 'password', 'website', 'location'];
public function update(Request $request){
    $user = Auth::user();
    foreach (self::FIELDS as $field) {
        if ($request->$field) {
            $user->$field = $request->$field;
            $user->save();
        }
    }
    //handle avatar image update
//could be moved to the model or another namespace
const FIELDS = ['username', 'wallet_address', 'about', 'password', 'website', 'location'];
public function update(Request $request){
    $user = Auth::user();
    foreach (self::FIELDS as $field) {
        if ($request->$field) {
            $user->$field = $request->$field;
            $user->save();
        }
    }
//could be moved to the model or another namespace
const FIELDS = ['username', 'wallet_address', 'about', 'password', 'website', 'location'];
public function update(Request $request){
    $user = Auth::user();
    foreach (self::FIELDS as $field) {
        if ($request->$field) {
            $user->$field = $request->$field;
            $user->save();
        }
    }
    //handle avatar image update
added 102 characters in body
Source Link
//could be moved to the model or another namespace
const FIELDS = ['username', 'wallet_address', 'about', 'password', 'website', 'location'];
public function update(Request $request){
    $user = Auth::user();
    foreach (self::FIELDS as $field) {
        if ($request->$field) {
            $user->$field = $request->$field;
            $user->save();
        }
    }
//could be moved to the model or another namespace
const FIELDS = ['username', 'wallet_address', 'about', 'password', 'website', 'location'];
foreach (self::FIELDS as $field) {
    if ($request->$field) {
        $user->$field = $request->$field;
        $user->save();
    }
}
//could be moved to the model or another namespace
const FIELDS = ['username', 'wallet_address', 'about', 'password', 'website', 'location'];
public function update(Request $request){
    $user = Auth::user();
    foreach (self::FIELDS as $field) {
        if ($request->$field) {
            $user->$field = $request->$field;
            $user->save();
        }
    }
Source Link
Loading