Top "Laravel-4" questions

Laravel 4.2 is the previous version of the open-source PHP web development MVC framework created by Taylor Otwell.

Laravel Redirect All Requests To HTTPS

Our entire site is to be served over https. I have 'https' in each route. However, how do I redirect …

laravel-4
How can I know the size of an array in Blade template?

I need something like this: @if ($array.length > 0) {{-- expr --}} @endif is this possible? Solution! @if (count($array) &…

laravel laravel-4 laravel-blade
Avoid public folder of laravel and open directly the root in web server

I was going through all possible sample on internet to solve this. Still it is an headache. I just want …

php .htaccess laravel webserver laravel-4
Laravel Eloquent - Attach vs Sync

What is the difference between attach() and sync() in Laravel 4's Eloquent ORM? I've tried to look around but couldn't …

php laravel laravel-4 eloquent relationship
Laravel named route for resource controller

Using Laravel 4.2, is it possible to assign a name to a resource controller route? My route is defined as follows: …

php laravel laravel-4
How to bind parameters to a raw DB query in Laravel that's used on a model?

Re, I have the following query: $property = Property::select( DB::raw("title, lat, lng, ( 3959 * acos( cos( radians(:lat) ) * cos( radians( …

php mysql pdo laravel laravel-4
Blade view: if statement with OR/AND condition

Is it possible in Laravel 4.0 -blade-view to do an if statment like so? @if ($var1 === '1' OR $var2 === '1…

php if-statement view laravel-4 blade
schema builder laravel migrations unique on two columns

How can I set a unique constraints on two columns? class MyModel extends Migration { public function up() { Schema::create('storage_…

laravel-4 database-schema
Filtering Eloquent collection data with $collection->filter()

I'm trying to filter the following collection using the collection filter() method: $collection = Word::all(); where the JSON output looks …

laravel laravel-4 eloquent
How to manually create a new empty Eloquent Collection in Laravel 4

How do we create a new Eloquent Collection in Laravel 4, without using Query Builder? There is a newCollection() method which …

php laravel laravel-4 eloquent