samedi 30 décembre 2017

Call to undefined method Illuminate\Database\Query\Builder::method() error in laravel 5

I am getting an error when i click the delete button which calls Controller@delete method on a controller.

Call to undefined method Illuminate\Database\Query\Builder::destroy()

throw new BadMethodCallException("Call to undefined method {$className}::{$method}()");

destroy method

    public function destroy($id)
    {
        User::destroy($id);
        return redirect('/home')->with('message', 'Deleted!');
    }



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2pWUqop
via IFTTT

Aucun commentaire:

Enregistrer un commentaire