Support the ongoing development of Laravel.io →
marekmurawski

marekmurawski

Joined 31 Jan 2014

Statistics

Threads 1
Replies 30
Solutions 10
Articles 0

[macro] Form::select() with optgroups based on model's field

Suppose you have a simple products table: id | name | category ....................... 1 | prod1 |...

0 Likes
1 Replies
replied 11 years ago

Call to undefined method error while getting the data

Try this: $templatedata = $user->posts()->with('replies')->get(); The $templatedata will b...

0 Likes
replied 11 years ago

Assigning Variable to URL

route('viewItem', array('id' => 1,'name' => 'Name-Of-The-Item')); Yes that would give th...

0 Likes
replied 11 years ago

Default value for all Eloquent attributes

Maybe you could try implementing model events restoring and saving (perhaps in your BaseModel) which...

0 Likes
replied 11 years ago

Preventing overwriting changes in database.

In this case you should make some custom locking mechanism. An idea would be to set article.locked_a...

0 Likes
replied 11 years ago

Preventing overwriting changes in database.

Transactions should be helpful here: http://laravel.com/docs/database#database-transactions So if ev...

0 Likes

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2026 Laravel.io - All rights reserved.