Home >Backend Development >PHP Tutorial >How to get the ID in SELECT when deleting?

How to get the ID in SELECT when deleting?

WBOY
WBOYOriginal
2016-07-06 13:51:56834browse

<code>{!! Form::open(array('route'=>array('groupdel',**?????**),'method'=>"delete")) !!} 

 {!! Form::label('group_name','GroupName:') !!}

 {!! Form::select('group_name',$group_name_lists,null) !!}       

 {!! Form::submit('Submit') !!}

 {!! Form::close() !!}
</code>

Excuse me, when deleting, how should I write the question mark? In order to get the ID at the time of deletion

Thank you very much~

Reply content:

<code>{!! Form::open(array('route'=>array('groupdel',**?????**),'method'=>"delete")) !!} 

 {!! Form::label('group_name','GroupName:') !!}

 {!! Form::select('group_name',$group_name_lists,null) !!}       

 {!! Form::submit('Submit') !!}

 {!! Form::close() !!}
</code>

Excuse me, when deleting, how should I write the question mark? In order to get the ID at the time of deletion

Thank you very much~

<code>{!! Form::model($foo, ['route' => ['groupdel', $foo->id], 'method' => 'DELETE']) !!}
试试这个</code>
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn