1 year ago

softdeletes not working

Posted 1 year ago by muazzamazaz

use Illuminate\Database\Eloquent\SoftDeletes;
class UserController extends Controller
use SoftDeletes;

   public function delete_user(Request $request)

        if ($user = User::find($request->id)) {

            $user = User::destroy($request->id);


deletes row from table instead of updating delete_at column that exists there.

Please sign in or create an account to participate in this conversation.