dimanche 22 novembre 2015

How to know if im pushing a button in Laravel

im trying to get this button

                              <button type="submit" class="btn btn-default btn-block btn-lg" name='submit'>
                                    Retrieve
                                </button>

in my Middleware and i want to verify if im pushing this button, this is my my middleware:

public function handle($request, Closure $next)
{$var = isset($_POST[$request->submit]);$other = ((bool) $var);
    if (redirect('retrieve_money')) {
        return redirect()->guest(route('home'));
    }else if ($other != true) {
        print_r('asd');
        die();
        return redirect()->guest(route('retrieve_money.index'));
    }

}

I dont know how to verify how to know if someone is pushing this button. Thanks for any help, i appreciate the answers



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire