Download the PHP package cmxperts/belongs-to-one without Composer
On this page you can find all versions of the php package cmxperts/belongs-to-one. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Please rate this library. Is it a good library?
Informations about the package belongs-to-one
Belongs To One Relation for Laravel 10
Based on Belongs To Many Relation. Returns one model instead of Collection of models.
Installation
Usage
BelongsToOne relation is almost identical to standard BelongsToMany except it returns one model instead of Collection of models and if there is no related model in DB (BelongsToMany returns empty Collection in this case). Include within your Model and use BelongsToOne relation.
Example:
And then use it like any other relation:
Testing
All versions of belongs-to-one with dependencies
PHP Build Version
Package Version
Requires
laravel/framework Version
^10.0
The package cmxperts/belongs-to-one contains the following files
Loading the files please wait ....