Remove constructor from member and memberships
This commit is contained in:
parent
f5223c79fe
commit
99486140bf
|
@ -105,10 +105,6 @@ class Member extends Model {
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
public function __construct($member) {
|
|
||||||
parent::__construct($member);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getBirthdayAttribute() {
|
public function getBirthdayAttribute() {
|
||||||
return Carbon::parse($this->attributes['birthday'])->format('Y-m-d');
|
return Carbon::parse($this->attributes['birthday'])->format('Y-m-d');
|
||||||
}
|
}
|
||||||
|
|
|
@ -40,10 +40,6 @@ class Membership extends Model {
|
||||||
return (new self($item));
|
return (new self($item));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function __construct($membership) {
|
|
||||||
parent::__construct($membership);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function setAttribute($key, $value) {
|
public function setAttribute($key, $value) {
|
||||||
if (in_array($key, $this->nullable) && $value === '') {
|
if (in_array($key, $this->nullable) && $value === '') {
|
||||||
return parent::setAttribute($key, null);
|
return parent::setAttribute($key, null);
|
||||||
|
|
|
@ -2,10 +2,10 @@
|
||||||
|
|
||||||
namespace Zoomyboy\LaravelNami\Tests\Unit;
|
namespace Zoomyboy\LaravelNami\Tests\Unit;
|
||||||
|
|
||||||
use Zoomyboy\LaravelNami\Nami;
|
|
||||||
use Zoomyboy\LaravelNami\Tests\TestCase;
|
|
||||||
use Illuminate\Support\Facades\Http;
|
use Illuminate\Support\Facades\Http;
|
||||||
use Zoomyboy\LaravelNami\LoginException;
|
use Zoomyboy\LaravelNami\LoginException;
|
||||||
|
use Zoomyboy\LaravelNami\Nami;
|
||||||
|
use Zoomyboy\LaravelNami\Tests\TestCase;
|
||||||
|
|
||||||
class LoginTest extends TestCase
|
class LoginTest extends TestCase
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue