vendredi 23 juin 2017

how to pass dynamic value in @include as blade name in laravel5.4

This is my code in laravel blade

 @foreach($modules as $module)

 @section('content')
 @include("mod.$module['module_name']") // mod is my folder name and 
                                          $module['module_name'] value is 
                                          coming from database
 @endsection

@endforeach  

is giving me correct value but when i pass it to @include it gives me error. Please help me !!!



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

Aucun commentaire:

Enregistrer un commentaire