mercredi 16 novembre 2016

Why Not working Delete Button in Laravel 5.2

I am going to delete files in My laravel app. but delete button not working. (not deleted) No any Error blade.php

//delete button here
                            <button class="btn btn-danger delete pull-right"
                            data-action="/projects//files/"
                            data-token="">
                            <i class="fa fa-trash-o"></i>Delete
                            </button>

Controller

public function deleteOneProjectFile($fileUrl, $id)
    {
        DB::table('files')
            ->where('file_url', $fileUrl)
            ->where('project_id', $id)
            ->delete();

        return redirect()->route('projects.show')->with('info', 'File deleted successfully');
    }

routes

Route::delete('projects/{projects}/files/{files}',[
'uses' => 'FilesController@deleteOneProjectFile',
    ]);

how can solve this problem?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire