mercredi 20 janvier 2021

"message":" ", "Symfony\Component\HttpKernel\Exception\NotFoundHttpException" getting error

Laravel Getting Error when ajax requesting Im sending files along with lots of form content with added dynamaticlly

Route::group(['as'=>'employee.', 'prefix' => 'employee', 'namespace'=>'Employee', 'middleware' => ['auth', 'employee']], function(){
Route::post('profile/updateProfile', [App\Http\Controllers\Employee\ProfileController::class, 'updateProfile'])->name('updateProfile'); });

Ajax Request look like

 $.ajax({
            type:'POST',
            url: '',
            headers: {'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')},
            type: 'POST',   
            contentType: false,
            processData: false,   
            cache: false,        
            data: fm,
            success: function(responce) {
                console.log(responce);            
            },
            error: function(err) {                    
                console.log(err);
            
            },
    });

**Controller For **

public function updateProfile(Request $request)
        {
            dd('IN Profile Controller');
            // return response()->json("Profile Controller");
        }


via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire