Skip to content

Conversation

@DanielBoettner
Copy link

@DanielBoettner DanielBoettner commented Oct 12, 2017

Added $attributes array

It seems there is an compatibility issue with Laravel 5.4 (maybe other versions as well).

The addresses where created with empty values.

I suspected that it is the same problem as this.

I tested the solution and it worked for me. The change as seen in the link is simply changing
this:

    public function __construct()
    {
        parent::__construct();
        $this->table = config('lecturize.addresses.table', 'addresses');
    }

to this:

    public function __construct(array $attributes = array())
    {
        parent::__construct($attributes);
        $this->table = config('lecturize.addresses.table', 'addresses');
    }

A colleague mentioned ( I do not have any link so far to support this claim) that things like this should be handled in boot and not constuct anymore.

So maybe there even is a more up to date method to pass the attributes.

Added $attributes array
@AlexanderPoellmann
Copy link
Member

Thanks for the fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants