alidi
136
1
Laravel

get the value of submit button

Posted 4 months ago by alidi

Hi

I'm trying to get the value of submit button to know which button that user click on

that is my code

    <   button class="btn btn-primary" type="submit" name="action" value="send">send<   /button>

    <   button class="btn btn-success" type="submit" name="action" value="save_for_later">save<    /button>

and in controller

dd($request->action);

it's return null, is there any other way to do it?

thank you

Please sign in or create an account to participate in this conversation.