Skip to content

Conversation

@ADmad
Copy link
Member

@ADmad ADmad commented Jan 18, 2024

No description provided.

@ADmad ADmad added this to the 5.x milestone Jan 18, 2024
)
->all();

.. php:method:: fetchModel(string $alias, array $config = [])
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't seem to be the signature used in the examples.

.. php:method:: fetchModel(string $alias, array $config = [])
The ``fetchModel()`` method is useful to load non ORM models or ORM tables that
are not the controller's default::
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or ORM tables that are not the controller's default

This is the same definition as fetchTable() which is confusing. We should describe fetchModel() for just one use case.

Copy link
Member Author

@ADmad ADmad Jan 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well "non ORM models" is the different bit here. This method can fetch any type of model including tables, which is what you get if you don't specify the 2nd argument.

.. php:method:: fetchModel(string $alias, array $config = [])
The ``fetchModel()`` method is useful to load non ORM models or ORM tables that
are not the controller's default::
Copy link
Member Author

@ADmad ADmad Jan 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well "non ORM models" is the different bit here. This method can fetch any type of model including tables, which is what you get if you don't specify the 2nd argument.

@othercorey othercorey merged commit cd66a58 into 5.x Jan 18, 2024
@othercorey othercorey deleted the ADmad-patch-1 branch January 18, 2024 21:35
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.

3 participants