2
Php

Laravel – From Eloquent To JavaScript Object

Often we may need to pass variables from server side to client for using it in a JavaScript file or in a global script. It’s possible to write JavaScript code from server side script, for example, we may use something like this: echo “”; This will generate something like this: So, we can use it […]

47
Php

Laravel 4 View Composer and Master layout

In Laravel 4 there is a very nice way to bind data automatically with a view using a View Composer. View composers are callbacks or class methods that are called when a view is created. If you have data that you want bound to a given view each time that view is created throughout your […]