mercredi 23 mars 2016

@include inside @foreach loop is not working in Laravel blade template

I have these lines of code in my view blade of laravel 5.2, Problem is that foreach is including only for one row , means only one module has been including not for all .

  @foreach($modules as $module) 
        @include('modules.'.$module->module_name)
  @endforeach   

But when i am executing below code i am getting all modules

    @foreach($modules as $module) 
       {{$module->module_name}}
    @endforeach

Please help me where i am wrong . Thanks !!!!



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire