Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何使用 Slim/Illuminate 执行操作以更新 mysql 数据库行并添加 +1 或 -1
$user->update(['points' => +1]);
尝试这个:
$user->increment( 'points' ); $user->decrement( 'points' );