mercredi 26 octobre 2016

Method [where] does not exist

I have encountered a problem while working in Laravel project.

Method [where] does not exist.i know the 'Where'clause is causing it .

I have studied it but not solution is found.finally i had to ask here.

$data = Track::where(
                [
                    ['generated_by', '=', Input::get('user_id')],
                    ['id', '=',Input::get('track_id') ],
                ])->get();


            $finalResult = array('code' => 100,
                'msg' => 'Your Account is found.',
                'data' => $data
                );

My controller name is Track . i have also made a Model named Track .the corresponding table name is tracks as laravel requires it to be plural of your model.

Can anybody please help me in this situation ?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire