The best practice for any programmer is to make sure that his/her codes are minimized, readable and they are functioning.
But you need to use different trick to deal with that. For now I have one trick to include all files from the folder at once.
In the layout open master.blade.php and then look on the place you want to include your files and then add this codes
<!-- include the modalservice -->
<?php
$files = glob("{app/js/services/*.js}",GLOB_BRACE);
for($i = 0; $i < count($files); $i++){
?>
<% HTML::script($files[$i]) %>
<?php
}
?>
For best practice to know the format result of the variable $files, you can echo json_encode($files); to see the structure of the files then you will understand how does it functioning.
The above code will save the idea of having a lot of script to include, and even next time you add another script to the folder you don't need to include it again.
But you need to use different trick to deal with that. For now I have one trick to include all files from the folder at once.
In the layout open master.blade.php and then look on the place you want to include your files and then add this codes
<!-- include the modalservice -->
<?php
$files = glob("{app/js/services/*.js}",GLOB_BRACE);
for($i = 0; $i < count($files); $i++){
?>
<% HTML::script($files[$i]) %>
<?php
}
?>
For best practice to know the format result of the variable $files, you can echo json_encode($files); to see the structure of the files then you will understand how does it functioning.
The above code will save the idea of having a lot of script to include, and even next time you add another script to the folder you don't need to include it again.