for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Distilleries\Contentful\Models;
/**
* @property string $lon
* @property string $lat
*/
class Location
{
* {@inheritdoc}
protected $fillable = [
'lon',
'lat',
];
* Location constructor.
*
* @param array $attributes
* @return void
public function __construct(array $attributes = [])
$this->fill($attributes);
}
* Fill the model with an array of attributes.
* @return $this
public function fill(array $attributes)
foreach ($this->fillable as $key => $value) {
if (isset($attributes[$value])) {
$this->{$value} = $attributes[$value];
} else {
$this->{$value} = null;
return $this;