search

Home  >  Q&A  >  body text

laravel5.2.9 - How to add a top-level category to Laravelcollective's select?

Ask a question, Laravelcollective's Form::select('parent_id',$parentID,null,['class'=>'form-control']); how to add a ''=>' top level to parent_id Category', or '0'=>'Top Category'?
$parentID is the parent_id =0 I took out from the database and then lists('name','id'). How to add a top-level category?

迷茫迷茫2797 days ago442

reply all(1)I'll reply

  • 大家讲道理

    大家讲道理2017-05-16 16:54:15

    You can't process the data in the controller before assigning it to the template?

    reply
    0
  • Cancelreply