mercredi 30 novembre 2016

how to add permission model to another model in Laravel

I need add permission model id $permission->id to the this form

<form class="form-vertical" role="form" method="post" action="">

but I have this form in collaborator model

@if($collaborators) // collaborator
           @foreach( $collaborators as $collaborator)
                <div>
                    <div>
                        <span>
                            <img src="" />
                             
                             

                        </span>
                    </div>
                    <button class="btn btn-sm btn-danger delete" style="margin-top:5px;padding:4px;width:35px;"
                      data-action="/projects//collaborators/"
                      data-token="">
                    <i class="fa fa-trash-o"></i>
                    </button>

                    <!-- permission start -->

                    <form class="form-vertical" role="form" method="post" action="">
                        <!--<div id="cid" name="cid"></div>-->
                    <input type="hidden" id="cid" name="cid" value="" />
                    <div class="form-group">
                    <label for="status" class="control-label">Choose Permission</label>
                    <select name="status" id="status">
                    <option value="">Choose a status</option>
                    <option value="3">View Only</option>
                    <option value="2">Edit Tasks</option>
                    <option value="1">Admin</option>
                    </select>
                    @if ($errors->has('status'))
                    <span class="help-block"></span>
                    @endif
                    </div>
                      <div class="form-group">
                        <button type="submit" class="btn btn-default">Create</button>
                      </div>
                      <input type="hidden" name="_token" value=""> 

I need form action this form with $permission->id

how can do it?



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2gIAzB4
via IFTTT

Aucun commentaire:

Enregistrer un commentaire