laravel-nami-api/src/Fee.php

22 lines
437 B
PHP
Raw Normal View History

2021-04-10 00:28:19 +02:00
<?php
namespace Zoomyboy\LaravelNami;
use Illuminate\Support\Arr;
use Illuminate\Database\Eloquent\Model;
class Fee extends Model {
protected $guarded = [];
public static function fromNami($item) {
$name = preg_replace('/DPSG Bundesverband 000000 \((.*?) - VERBANDSBEITRAG\)/', '\\1', $item['descriptor']);
return new self([
'name' => $name,
'id' => $item['id']
]);
}
}