删除用户在数据库和文件laravel 8框架使用 AJAX

pgvzfuti  于 2023-01-03  发布在  其他
关注(0)|答案(1)|浏览(75)

我对Laravel和JSON都是新手。我必须给用户一个删除帐户的选项,但是我不知道怎么做。这是我尝试使用类似更新表单的方法的代码,但是我失败了。
编辑:我找到了一些解决方案,但它没有删除用户,表名是"users"。
第二次编辑:我尝试了更多的东西,不知何故,它确实删除了用户几次,但后来我想,由于laravel cookie文件,我仍然能够登录,但没有注册说,我的帐户存在,然后我再次检查数据库,我的电子邮件在那里与一个随机用户名,没有图像,和不同的id。我尝试删除cookie,但没有一个工作。我甚至不知道什么是文件的名称或做什么来删除它。更新也使用firebase-auth。
public\assets\js\common.js

$(".delteuserbtn").on('click', function (e1){
  e1.preventDefault();
    $('.deltetemodal').modal('show');

    $(".delteuserbtnyes").on('click', function (e2){
        e2.preventDefault();
        var theuser = localStorage.getItem('userObject');
        if(theuser != null){
          theuser = JSON.parse(theuser);
          userid=theuser.id;
        }
        console.log(userid);

        $.ajaxSetup({
          headers: {
              'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
          }
        });

        $.ajax({
          type: "DELETE",
          url: "deleteAccount/"+userid,
          dataType: "JSON",
          success: function (response){
            console.log('response it worked');
            
            $(".deltetemodal").modal('hide');
            $(".updateProfileModal").modal('hide');
            localStorage.removeItem("userObject");
    
            $('.userName').text("")
            $('.useremail').text("")
            $(".usersideImage").attr('src',"")
            $('.signInRemove').removeClass('d-none');
            $(".userLoginDiv").css("display", "none");
            iziToast.success({timeout: 2000, title: localAccDeletedSuccess,position: "topRight"})
            window.location.href = `${appUrl}`;
          },
          error: function(xhr) {
            console.log(xhr.responseText); // this line will save you tons of hours while debugging
           // do something here because of error
          }

        });
    });
    

    $(".delteuserno").on('click', function (e){
      $(".deltetemodal").modal('hide');
      $(".updateProfileModal").modal('hide');
    });

});



$("#updateform").on('submit',function(event) {
event.preventDefault();
        $(".loader").show();
        var updatedata = localStorage.getItem('userObject');
        updatedata = JSON.parse(updatedata);

        var formdata = new FormData($("#updateform")[0]);
    
        formdata.append('id',updatedata.id);
        console.log(formdata);
        $.ajax({
            url: `${baseUrl}updateProfile`,
            type: 'POST',
            beforeSend: function(xhr) {
                xhr.setRequestHeader('apikey',apikey);
                xhr.setRequestHeader('userId',updatedata.id);
            },
            data: formdata,
            dataType: "json",
            contentType: false,
            cache: false,
            processData: false,
            success: function(response) {
                console.log(response)
                $(".loader").hide();
                iziToast.success({timeout: 2000, title: `${localUpdateSuccessfull}`,position: "topRight"})

                localStorage.setItem('userObject',JSON.stringify(response.data));
                $image = `${fimageUrl}${response.data.image}` ;
                $(".usersideImage").attr('src',$image)
                    
                $('.userName').text(response.data.firstname)
                $('.useremail').text(response.data.email)
                $('.updateProfileModal').modal('hide');
            },
            error: function(err) {   console.log(JSON.stringify(err));    }

        });
});

这是我的blade.php资源\视图\包含\应用程序. blade.php

<div class="modal fade updateProfileModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalCenterTitle"
            aria-hidden="true" dir="{{__('app.ltr')}}">
            <div class="modal-dialog modal-dialog-centered modalSm" role="document">
                <div class="modal-content darkthemejs {{ $theme . '-theme' }}">

                    <h1 class="upTitle darkthemejs {{ $theme . '-theme' }}">{{__('app.EditProfile')}}</h1>
                    <form action=" " class="updateForm" id="updateform">
                        <div class="d-flex justify-content-center align-items-center flex-column">
                            <div class="updateProdiv">
                                
                                <img src="https://images.unsplash.com/photo-1531427186611-ecfd6d936c79?ixid=MnwxMjA3fDB8MHxzZWFyY2h8MTF8fHByb2ZpbGV8ZW58MHx8MHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=60"
                                    class=" updateProfileImage" alt="">

                            </div>
                            <label for="userPicfile" class="upUpdateIconBtn"><i class="fas fa-pencil-alt"></i></label>
                            <input type="file" class="d-none" name="image" id="userPicfile"  accept="image/x-png,image/gif,image/jpeg">
                        </div>
                        <div class="d-flex justify-content-center align-items-center flex-column mt-3">
                            <div class="form-group upInputMain ">
                                <label class="UPlabel darkthemejs {{ $theme . '-theme' }}">{{__('FullName')}}</label>
                                <input type="text" name="firstname" class="form-control upinput upfullname darkthemejs {{ $theme . '-theme' }}" required>
                            </div>
                            <div class="form-group upInputMain">
                                <label class="UPlabel darkthemejs {{ $theme . '-theme' }}">{{__('E-mail')}}</label>
                                <input type="email" name="email" class="form-control upinput upemail darkthemejs {{ $theme . '-theme' }}" required>
                            </div>


                            <div>
                                <button type="submit" value="Update" class="updateBtn">{{__('app.UPDATE')}}</button>
                            </div>
                        </div>
                    </form>
                        <button type="submit" value="Delete" id="delteuser" class="delteuserbtn">{{__('app.Delete')}}</button> 
                    </div>
            </div>
        </div>

        <div class="modal fade deltetemodal" tabindex="-1" role="dialog" aria-labelledby="exampleModalCenterTitle"
            aria-hidden="true" dir="{{__('app.ltr')}}">
            <div class="modal-dialog modal-dialog-centered modalSm" role="document">
                <div class="modal-content darkthemejs {{ $theme . '-theme' }}">

                    <h1 class="upTitle darkthemejs {{ $theme . '-theme' }}">{{__('app.areyousure')}}</h1>

                    <p>all of your data will be delted. are you sure?</p>
                    <div class="deleteuserbtns">
                        <button id="delteuseryes" class="delteuserbtnyes deleteRecord">{{__('app.yes')}}</button>
                        <button id="delteuserno" class="delteuserbtnno">{{__('app.no')}}</button>  
                         
                    </div>

                </div>
            </div>
        </div>

routes/web.php

<?php

use App\Http\Controllers\ViewController;
use Illuminate\Support\Facades\Artisan;
use Illuminate\Support\Facades\Route;

Route::delete('deleteAccount/{id}' , [App\Http\Controllers\UserController::class, 'destroy']) ->name('destroy');

http/Controller/userController.php

<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\User;
use App\Http\Controllers\Controller;
use Illuminate\Support\Facades\DB;

class UserController extends Controller {
    public function destroy($id){
/*              $user = users::find($id);
                $user ->delete(); */
            DB::table('users')->where('id', $id)->delete();
            return response()->json([
                'status' =>200,
                'message'=>'Account Deleted Successfully',
            ]);

/*             $directory=storage_path('framework/views');  
            $files=\File::allFiles($directory);
            \File::delete($files); */
        } 
    }
llycmphe

llycmphe1#

这是我在控制台中得到的,现在它实际上正在更新电子邮件名称,这很奇怪,我使用相同的代码,因为我liturly复制它。
我还注意到我的控制器里没有这一行。

use Illuminate\Support\Facades\DB;

所以我加了
这是我在控制台中得到的“错误”。

{
"message": "SQLSTATE[HY000] [2002] No connection could be made because the target machine actively refused it (SQL: delete from `users` where `id` = 246)",
"exception": "Illuminate\\Database\\QueryException",
"file": "C:\\xampp\\htdocs\\RDL work\\rozi-bazar\\vendor\\laravel\\framework\\src\\Illuminate\\Database\\Connection.php",
"line": 712,
"trace": [
    {
        "file": "C:\\xampp\\htdocs\\RDL work\\rozi-bazar\\vendor\\laravel\\framework\\src\\Illuminate\\Database\\Connection.php",
        "line": 672,
        "function": "runQueryCallback",
        "class": "Illuminate\\Database\\Connection",
        "type": "->"
    },
    {
        "file": "C:\\xampp\\htdocs\\RDL work\\rozi-bazar\\vendor\\laravel\\framework\\src\\Illuminate\\Database\\Connection.php",
        "line": 533,
        "function": "run",
        "class": "Illuminate\\Database\\Connection",
        "type": "->"
    },
    {
        "file": "C:\\xampp\\htdocs\\RDL work\\rozi-bazar\\vendor\\laravel\\framework\\src\\Illuminate\\Database\\Connection.php",
        "line": 478,
        "function": "affectingStatement",
        "class": "Illuminate\\Database\\Connection",
        "type": "->"
    },
    {
        "file": "C:\\xampp\\htdocs\\RDL work\\rozi-bazar\\vendor\\laravel\\framework\\src\\Illuminate\\Database\\Query\\Builder.php",
        "line": 3218,
        "function": "delete",
        "class": "Illuminate\\Database\\Connection",
        "type": "->"
    },
    {
        "file": "C:\\xampp\\htdocs\\RDL work\\rozi-bazar\\app\\Http\\Controllers\\UserController.php",
        "line": 11,
        "function": "delete",
        "class": "Illuminate\\Database\\Query\\Builder",
        "type": "->"
    },
    {
        "file": "C:\\xampp\\htdocs\\RDL work\\rozi-bazar\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Controller.php",
        "line": 54,
        "function": "destroy",
        "class": "App\\Http\\Controllers\\UserController",
        "type": "->"
    },
    {
        "file": "C:\\xampp\\htdocs\\RDL work\\rozi-bazar\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\ControllerDispatcher.php",
        "line": 45,
        "function": "callAction",
        "class": "Illuminate\\Routing\\Controller",
        "type": "->"
    },
    {
        "file": "C:\\xampp\\htdocs\\RDL work\\rozi-bazar\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Route.php",
        "line": 262,
        "function": "dispatch",
        "class": "Illuminate\\Routing\\ControllerDispatcher",
        "type": "->"
    },
    {
        "file": "C:\\xampp\\htdocs\\RDL work\\rozi-bazar\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Route.php",
        "line": 205,
        "function": "runController",
        "class": "Illuminate\\Routing\\Route",
        "type": "->"
    },
    {
        "file": "C:\\xampp\\htdocs\\RDL work\\rozi-bazar\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php",
        "line": 721,
        "function": "run",
        "class": "Illuminate\\Routing\\Route",
        "type": "->"
    },
    {
        "file": "C:\\xampp\\htdocs\\RDL work\\rozi-bazar\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
        "line": 128,
        "function": "Illuminate\\Routing\\{closure}",
        "class": "Illuminate\\Routing\\Router",
        "type": "->"
    },
    {
        "file": "C:\\xampp\\htdocs\\RDL work\\rozi-bazar\\app\\Http\\Middleware\\Language.php",
        "line": 26,
        "function": "Illuminate\\Pipeline\\{closure}",
        "class": "Illuminate\\Pipeline\\Pipeline",
        "type": "->"
    },
    {
        "file": "C:\\xampp\\htdocs\\RDL work\\rozi-bazar\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
        "line": 167,
        "function": "handle",
        "class": "App\\Http\\Middleware\\Language",
        "type": "->"
    },
    {
        "file": "C:\\xampp\\htdocs\\RDL work\\rozi-bazar\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Middleware\\SubstituteBindings.php",
        "line": 50,
        "function": "Illuminate\\Pipeline\\{closure}",
        "class": "Illuminate\\Pipeline\\Pipeline",
        "type": "->"
    },
    {
        "file": "C:\\xampp\\htdocs\\RDL work\\rozi-bazar\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
        "line": 167,
        "function": "handle",
        "class": "Illuminate\\Routing\\Middleware\\SubstituteBindings",
        "type": "->"
    },
    {
        "file": "C:\\xampp\\htdocs\\RDL work\\rozi-bazar\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\VerifyCsrfToken.php",
        "line": 78,
        "function": "Illuminate\\Pipeline\\{closure}",
        "class": "Illuminate\\Pipeline\\Pipeline",
        "type": "->"
    },
    {
        "file": "C:\\xampp\\htdocs\\RDL work\\rozi-bazar\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
        "line": 167,
        "function": "handle",
        "class": "Illuminate\\Foundation\\Http\\Middleware\\VerifyCsrfToken",
        "type": "->"
    },
    {
        "file": "C:\\xampp\\htdocs\\RDL work\\rozi-bazar\\vendor\\laravel\\framework\\src\\Illuminate\\View\\Middleware\\ShareErrorsFromSession.php",
        "line": 49,
        "function": "Illuminate\\Pipeline\\{closure}",
        "class": "Illuminate\\Pipeline\\Pipeline",
        "type": "->"
    },
    {
        "file": "C:\\xampp\\htdocs\\RDL work\\rozi-bazar\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
        "line": 167,
        "function": "handle",
        "class": "Illuminate\\View\\Middleware\\ShareErrorsFromSession",
        "type": "->"
    },
    {
        "file": "C:\\xampp\\htdocs\\RDL work\\rozi-bazar\\vendor\\laravel\\framework\\src\\Illuminate\\Session\\Middleware\\StartSession.php",
        "line": 121,
        "function": "Illuminate\\Pipeline\\{closure}",
        "class": "Illuminate\\Pipeline\\Pipeline",
        "type": "->"
    },
    {
        "file": "C:\\xampp\\htdocs\\RDL work\\rozi-bazar\\vendor\\laravel\\framework\\src\\Illuminate\\Session\\Middleware\\StartSession.php",
        "line": 64,
        "function": "handleStatefulRequest",
        "class": "Illuminate\\Session\\Middleware\\StartSession",
        "type": "->"
    },
    {
        "file": "C:\\xampp\\htdocs\\RDL work\\rozi-bazar\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
        "line": 167,
        "function": "handle",
        "class": "Illuminate\\Session\\Middleware\\StartSession",
        "type": "->"
    },
    {
        "file": "C:\\xampp\\htdocs\\RDL work\\rozi-bazar\\vendor\\laravel\\framework\\src\\Illuminate\\Cookie\\Middleware\\AddQueuedCookiesToResponse.php",
        "line": 37,
        "function": "Illuminate\\Pipeline\\{closure}",
        "class": "Illuminate\\Pipeline\\Pipeline",
        "type": "->"
    },
    {
        "file": "C:\\xampp\\htdocs\\RDL work\\rozi-bazar\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
        "line": 167,
        "function": "handle",
        "class": "Illuminate\\Cookie\\Middleware\\AddQueuedCookiesToResponse",
        "type": "->"
    },
    {
        "file": "C:\\xampp\\htdocs\\RDL work\\rozi-bazar\\vendor\\laravel\\framework\\src\\Illuminate\\Cookie\\Middleware\\EncryptCookies.php",
        "line": 67,
        "function": "Illuminate\\Pipeline\\{closure}",
        "class": "Illuminate\\Pipeline\\Pipeline",
        "type": "->"
    },
    {
        "file": "C:\\xampp\\htdocs\\RDL work\\rozi-bazar\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
        "line": 167,
        "function": "handle",
        "class": "Illuminate\\Cookie\\Middleware\\EncryptCookies",
        "type": "->"
    },
    {
        "file": "C:\\xampp\\htdocs\\RDL work\\rozi-bazar\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
        "line": 103,
        "function": "Illuminate\\Pipeline\\{closure}",
        "class": "Illuminate\\Pipeline\\Pipeline",
        "type": "->"
    },
    {
        "file": "C:\\xampp\\htdocs\\RDL work\\rozi-bazar\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php",
        "line": 723,
        "function": "then",
        "class": "Illuminate\\Pipeline\\Pipeline",
        "type": "->"
    },
    {
        "file": "C:\\xampp\\htdocs\\RDL work\\rozi-bazar\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php",
        "line": 698,
        "function": "runRouteWithinStack",
        "class": "Illuminate\\Routing\\Router",
        "type": "->"
    },
    {
        "file": "C:\\xampp\\htdocs\\RDL work\\rozi-bazar\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php",
        "line": 662,
        "function": "runRoute",
        "class": "Illuminate\\Routing\\Router",
        "type": "->"
    },
    {
        "file": "C:\\xampp\\htdocs\\RDL work\\rozi-bazar\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php",
        "line": 651,
        "function": "dispatchToRoute",
        "class": "Illuminate\\Routing\\Router",
        "type": "->"
    },
    {
        "file": "C:\\xampp\\htdocs\\RDL work\\rozi-bazar\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php",
        "line": 167,
        "function": "dispatch",
        "class": "Illuminate\\Routing\\Router",
        "type": "->"
    },
    {
        "file": "C:\\xampp\\htdocs\\RDL work\\rozi-bazar\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
        "line": 128,
        "function": "Illuminate\\Foundation\\Http\\{closure}",
        "class": "Illuminate\\Foundation\\Http\\Kernel",
        "type": "->"
    },
    {
        "file": "C:\\xampp\\htdocs\\RDL work\\rozi-bazar\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest.php",
        "line": 21,
        "function": "Illuminate\\Pipeline\\{closure}",
        "class": "Illuminate\\Pipeline\\Pipeline",
        "type": "->"
    },
    {
        "file": "C:\\xampp\\htdocs\\RDL work\\rozi-bazar\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\ConvertEmptyStringsToNull.php",
        "line": 31,
        "function": "handle",
        "class": "Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest",
        "type": "->"
    },
    {
        "file": "C:\\xampp\\htdocs\\RDL work\\rozi-bazar\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
        "line": 167,
        "function": "handle",
        "class": "Illuminate\\Foundation\\Http\\Middleware\\ConvertEmptyStringsToNull",
        "type": "->"
    },
    {
        "file": "C:\\xampp\\htdocs\\RDL work\\rozi-bazar\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest.php",
        "line": 21,
        "function": "Illuminate\\Pipeline\\{closure}",
        "class": "Illuminate\\Pipeline\\Pipeline",
        "type": "->"
    },
    {
        "file": "C:\\xampp\\htdocs\\RDL work\\rozi-bazar\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\TrimStrings.php",
        "line": 40,
        "function": "handle",
        "class": "Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest",
        "type": "->"
    },
    {
        "file": "C:\\xampp\\htdocs\\RDL work\\rozi-bazar\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
        "line": 167,
        "function": "handle",
        "class": "Illuminate\\Foundation\\Http\\Middleware\\TrimStrings",
        "type": "->"
    },
    {
        "file": "C:\\xampp\\htdocs\\RDL work\\rozi-bazar\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\ValidatePostSize.php",
        "line": 27,
        "function": "Illuminate\\Pipeline\\{closure}",
        "class": "Illuminate\\Pipeline\\Pipeline",
        "type": "->"
    },
    {
        "file": "C:\\xampp\\htdocs\\RDL work\\rozi-bazar\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
        "line": 167,
        "function": "handle",
        "class": "Illuminate\\Foundation\\Http\\Middleware\\ValidatePostSize",
        "type": "->"
    },
    {
        "file": "C:\\xampp\\htdocs\\RDL work\\rozi-bazar\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\PreventRequestsDuringMaintenance.php",
        "line": 86,
        "function": "Illuminate\\Pipeline\\{closure}",
        "class": "Illuminate\\Pipeline\\Pipeline",
        "type": "->"
    },
    {
        "file": "C:\\xampp\\htdocs\\RDL work\\rozi-bazar\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
        "line": 167,
        "function": "handle",
        "class": "Illuminate\\Foundation\\Http\\Middleware\\PreventRequestsDuringMaintenance",
        "type": "->"
    },
    {
        "file": "C:\\xampp\\htdocs\\RDL work\\rozi-bazar\\vendor\\fruitcake\\laravel-cors\\src\\HandleCors.php",
        "line": 38,
        "function": "Illuminate\\Pipeline\\{closure}",
        "class": "Illuminate\\Pipeline\\Pipeline",
        "type": "->"
    },
    {
        "file": "C:\\xampp\\htdocs\\RDL work\\rozi-bazar\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
        "line": 167,
        "function": "handle",
        "class": "Fruitcake\\Cors\\HandleCors",
        "type": "->"
    },
    {
        "file": "C:\\xampp\\htdocs\\RDL work\\rozi-bazar\\vendor\\fideloper\\proxy\\src\\TrustProxies.php",
        "line": 57,
        "function": "Illuminate\\Pipeline\\{closure}",
        "class": "Illuminate\\Pipeline\\Pipeline",
        "type": "->"
    },
    {
        "file": "C:\\xampp\\htdocs\\RDL work\\rozi-bazar\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
        "line": 167,
        "function": "handle",
        "class": "Fideloper\\Proxy\\TrustProxies",
        "type": "->"
    },
    {
        "file": "C:\\xampp\\htdocs\\RDL work\\rozi-bazar\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
        "line": 103,
        "function": "Illuminate\\Pipeline\\{closure}",
        "class": "Illuminate\\Pipeline\\Pipeline",
        "type": "->"
    },
    {
        "file": "C:\\xampp\\htdocs\\RDL work\\rozi-bazar\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php",
        "line": 142,
        "function": "then",
        "class": "Illuminate\\Pipeline\\Pipeline",
        "type": "->"
    },
    {
        "file": "C:\\xampp\\htdocs\\RDL work\\rozi-bazar\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php",
        "line": 111,
        "function": "sendRequestThroughRouter",
        "class": "Illuminate\\Foundation\\Http\\Kernel",
        "type": "->"
    },
    {
        "file": "C:\\xampp\\htdocs\\RDL work\\rozi-bazar\\public\\index.php",
        "line": 52,
        "function": "handle",
        "class": "Illuminate\\Foundation\\Http\\Kernel",
        "type": "->"
    },
    {
        "file": "C:\\xampp\\htdocs\\RDL work\\rozi-bazar\\server.php",
        "line": 21,
        "function": "require_once"
    }
]
}

我还注意到更新用户名和电子邮件在 AJAX url中使用firebase-auth。

url: `${baseUrl}updateProfile`,

我尝试的事情,从互联网上我尝试了不同的方法或路线,并改变了删除用户的方式。没有工作不幸的是,

相关问题