find(); if($docClickCount) { $result = ClickCount::where('md5', $md5)->update( [ 'click_count' => $docClickCount->click_count + 1 ] ); } else { $result = ClickCount::create( [ 'md5' => $md5 , ] ); } if( ! $result) { return false; } return true; } }