Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update 03-creating-records.md #11947

Merged

Conversation

thethunderturner
Copy link
Contributor

It should be $this->data not $this->getRecord(). It doesn't make sense to check a record that hasn't been created yet.

Description

Fix in the docs. Should use $this->data in the beforeCreate. It doesnt make sense to check a record that hasnt been created yet.

  • Visual changes (if any) are shown using screenshots/recordings of before and after.

Code style

  • composer cs command has been run.

Testing

  • Changes have been tested.

Documentation

  • Documentation is up-to-date.

It should be $this->data not $this->getRecord(). It doesn't make sense to check a record that hasn't been created yet.
@zepfietje zepfietje added the documentation Improvements or additions to documentation label Mar 19, 2024
@zepfietje zepfietje added this to the v3 milestone Mar 19, 2024
@danharrin
Copy link
Member

data is not an object its an array so that would never really work, how about we replace it with auth()->user()->team

@danharrin danharrin merged commit 1f1d340 into filamentphp:3.x Mar 20, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

3 participants