mardi 16 avril 2019

how to assign variable into if statment in blade.php

        @foreach ($modules as $module)

                @if ($module->name === "h_car_positions")   $module_name == "history_car_positions";    @endif


            <tr>
                <td></td>
                <td><a href=""></a></td>
                <td></td>

                <td></td>
                <td>
                    <a href="#fields" class="btn btn-primary btn-xs" style="display:inline;padding:2px 5px 3px 5px;"><i class="fa fa-edit"></i></a>
                    <a href="#access" class="btn btn-warning btn-xs" style="display:inline;padding:2px 5px 3px 5px;"><i class="fa fa-key"></i></a>
                    <a href="#sort" class="btn btn-success btn-xs" style="display:inline;padding:2px 5px 3px 5px;"><i class="fa fa-sort"></i></a>
                    <a module_name="" module_id="" class="btn btn-danger btn-xs delete_module" style="display:inline;padding:2px 5px 3px 5px;"><i class="fa fa-trash"></i></a>
                </td>
            </tr>
        @endforeach

i want to assign history_car_positions to $module name when the if statment is true how to do that in blade



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire