Skip to content

Tag: laravel-4

Return multiple array to Response::json laravel?

How we can return multiple array in json. Suppose we get the following response in Laravel eloquent: Now I want to return response in json which include these data: Using the above method empty value is returned. Any help would be appreciated Sorry guys. I found the solution. The data that I was passing was a…

Laravel pagination pretty URL

Is there a way to get a pagination pretty URL in Laravel 4? For example, by default: http://example.com/something/?page=3 And what I would like to get: http://example.com/something/page/3 Also, …

Laravel templates/controllers not updating on save

I’m running a Laravel 4 for a simple app on OS X. Basically, changes to controllers and templates don’t take effect for a long time after I save changes to those files. For example, I add a word to /app/views/index.blade.php, and don’t see any change when constantly refreshing my browser for…

Escape raw SQL queries in Laravel 4

How does one go about escaping parameters passed to a raw query in Laravel 4? I expected something like DB::escape() (which rings a bell from Laravel 3) and also attempted DB::quote() (which I thought could be available through the PDO object) We can’t use the select method with placeholders as the abov…