20 lines
337 B
PHP
20 lines
337 B
PHP
|
<?php
|
||
|
|
||
|
namespace Zoomyboy\LaravelNami;
|
||
|
|
||
|
use Illuminate\Support\Arr;
|
||
|
use Illuminate\Database\Eloquent\Model;
|
||
|
|
||
|
class Country extends Model {
|
||
|
|
||
|
protected $guarded = [];
|
||
|
|
||
|
public static function fromNami($item) {
|
||
|
return new self([
|
||
|
'id' => $item['id'],
|
||
|
'name' => $item['descriptor']
|
||
|
]);
|
||
|
}
|
||
|
|
||
|
}
|