php - Laravel form action parameter -


i'm trying call controller method form object, increment given item.

the problem when adding parameter, form action add question mark, instead of slash.

<form method="post" action="http://localhost/admin/pages?1"> 

how define parameter?

{!! form::open([     'action'=>['admin\\pagescontroller@increment', $item->id],     'style' => 'display:inline' ]) !!}     {!! form::submit('move up', ['class' => 'btn btn-danger btn-xs']) !!} {!! form::close() !!} 

in code sample, sending item id http parameter. can access item id in controller giving name parameter follows.

{!! form::open([     'action'=>['admin\\pagescontroller@increment','itemid='.$item->id],     'style' => 'display:inline' ]) !!} 

then access item id in controller by

input:get('itemid') 

Comments

Popular posts from this blog

android - Why am I getting the message 'Youractivity.java is not an activity subclass or alias' -

python - How do I create a list index that loops through integers in another list -

c# - “System.Security.Cryptography.CryptographicException: Keyset does not exist” when reading private key from remote machine -