dimanche 17 janvier 2016

Link of anchor tag is also printing in Laravel Blade

I have a table of employee's salary list. I wrap the employee id with an anchor tag to show salary history of each individual employees. The problem is when I print the table the link for individual salary history is also printed under the employee id.

Here is a screen shot print preview:

enter image description here

Blade

<div class="d-section col-md-12">
    <table class="table table-striped table-condensed table-bordered">
        <thead>
        <tr>
            <th>ID</th>
            <th>Name</th>
            <th>Position</th>
            <th>Start Date</th>
            <th>End Date</th>
            <th>Worked</th>
            <th>Basic</th>
            <th>OT Rate</th>
            <th>OT Hour</th>
            <th>OT Amount</th>
            <th>Basic Amount</th>
            <th>Total</th>
            <th>Signature</th>
            <th>Finger</th>
        </tr>
        </thead>
        <tbody>
        @foreach($employees as $employee)
            <tr>
                <td><a href="{{ action('SalaryController@show',[$employee->id]) }}">{{ $employee->eid }}</a></td>
                <td>{{ $employee->name }}</td>
                <td>{{ $employee->designation }}</td>
                <td>{{ $employee->start }}</td>
                <td>{{ $employee->end }}</td>
                <td>{{ $employee->worked }}</td>
                <td>{{ $employee->basic }}</td>
                <td>{{ $employee->ot_rate }}</td>
                <td>{{ $employee->ot_hour }}</td>
                <td>{{ $employee->ot_amount }}</td>
                <td>{{ $employee->basic_amount }}</td>
                <td>{{ $employee->ot_amount + $employee->basic_amount }}</td>
                <td></td>
                <td>
                    {!! Form::open(['action'=>['SalaryController@destroy',$employee->id],'class'=>'no-print','method'=>'delete','onsubmit'=>'return deleteConfirm()']) !!}
                    {!! Form::submit('X',['class'=>'element btnn btn-danger']) !!}
                    <br/>
                    <a href="{{ action('SalaryController@edit',[$employee->id]) }}" class="element btnn btn-warning" role="button"><span class="glyphicon glyphicon-edit"></span></a>
                    <br/>
                    <a href="{{ action('SalaryController@payment',[$employee->id]) }}" class="element btnn btn-success" role="button"><span class="glyphicon glyphicon-usd"></span></a>
                    {!! Form::close() !!}
                </td>
            </tr>
        @endforeach
        </tbody>
    </table>
</div>



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire