-
Notifications
You must be signed in to change notification settings - Fork 372
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This PR looks to build on the current work done for model extending and includes but not limited to the following changes: - Filament resources use the model contract for DI - Change to use Laravel's `morphMap` instead of having concrete classes in the database for polymorphic relationships - There was an issue with custom models when they extended Lunar ones, the `newFactory` method didn't like having the return type. - Added a `addDir` - Tweaked `guessContractClass` to take namespace into account as not all Lunar models (from addons) will have the same namespace - Added `addDirectory` method to prevent excessive calls to `replace` or `add` methods. - Updated relationships to use `modelClass()` - Static functions should forward to the custom class when called. - If a custom class name is different to the one it extends i.e. `App\Models\MyProduct` instead of `App\Models\Product` it will still use the correct table name. - Tweaked `observe` method on models that use `HasModelExtending` to forward to the custom class even if observe is called on the Lunar model. - Removed redundant tests and updated docs. Set as draft for the moment as there is a fair amount of changes so just want to double check before hitting the button. --------- Co-authored-by: Glenn Jacobs <[email protected]> Co-authored-by: glennjacobs <[email protected]> Co-authored-by: wychoong <[email protected]> Co-authored-by: alecritson <[email protected]> Co-authored-by: mattdfloyd <[email protected]>
- Loading branch information
1 parent
fc792b0
commit 3696422
Showing
265 changed files
with
2,612 additions
and
1,654 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.