over 5 years ago
Laravel 4.x provide n number of services to solve basic issues. By using Laravel 4.x we will easily set a default attribute for a Laravel/Eloquent model.
To achieve this we have to define value like below example:
protected $defaults = array(
public function __construct(array $attributes = array())
I will suggest this as a PR so we don't need to declare this constructor at every Model, and can easily apply by simply declaring the $defaults array in our models...
By this way we can set default default attribute value for a laravel.
Starting with Chrome version 45, NPAPI is no longer supported for Google Chrome. For more information, see Chrome and NPAPI (blog.chromium.org).
Firefox and Microsoft Internet Explorer are recommended browsers for websites using java applets.
Chrome Version Support
Are you sure, you want to delete this comment?
Terms of Service
| © copyright 2021 FindNerd.com. All rights reserved.
Sign up using