mardi 29 octobre 2019

How to call out the "description" to replace the "parent_id" in laravel?

so here is my question, i have done everything and my senior request me to replace the parent_id now into description as the coder know what is the integer number represent but the users doesn't know. Here is the picture My current view looks like !

As you can see inside the red column, there are two id : 1.( 999162, Testing3, Test3, 999161, active ) and 2.( 999163, testing4, test, 999162, active )

My desired output is the 1.( 999161 calls the 999161 description instead of id ). Lets take 999163 as example : the desired output should be like 999163, testing4, test, test3, active.

I don't know how to call the description to replace the parent_id,can someone help ?

 <div class="row">
    <div class="col-md-12">
        <br />
        <h3 align="center">Category Data</h3>
        <br />
        @if($message = Session::get('success'))
            <div class="alert alert-success">
                <p></p>
            </div>
        @endif
        <div align="right">
            <a href="" class="btn btn-primary">Add</a>
            <br />
            <br />
        </div>
        <table class="table table-bordered table-striped">
            <tr>
                <th>Id</th>
                <th>Code</th>
                <th>Description</th>
                <th>Parent</th>
                <th>Status</th>
                <th>Action</th>
                <th>Action</th>
            </tr>
            @foreach($category as $row)
                <tr>
                    <td></td>
                    <td></td>
                    <td></td>
                    <td></td>
                    <td></td>

                    <td><a href="" class="btn btn-warning">Edit</a></td>
                    <td>
                        <form method="post" class="delete_form" action="">
                            
                            

                            <input type="hidden" name="_method" value="DELETE"  />
                            <button type="submit" class="btn btn-danger">Delete</button>
                        </form>
                    </td>
                </tr>
            @endforeach
        </table>
    </div>
</div>


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

Aucun commentaire:

Enregistrer un commentaire