lundi 6 août 2018

If condition with model in laravel

Regist Controller:

$check = Regist::whereMob($mob)->get();
    if($check == emptyArray()){
        return back()->with('status', 'input error!!');
    }

Here i want to return back if $check gets no input.

It produces (E_ERROR) Call to undefined function App\Http\Controllers\emptyArray()

How to check this.

Aucun commentaire:

Enregistrer un commentaire