PHP code example of r-quintin / extended-relations
1. Go to this page and download the library: Download r-quintin/extended-relations library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
r-quintin / extended-relations example snippets
use RQuintin\ExtendedRelations\ExtendedModel;
class Driver extends ExtendedModel
{
/**
* Relations on this model
*
* @var string|string[]|null
*/
protected string|array|null $relationships = ['vehicles'];
/**
* Loaded relations in serialization
*
* @var string|array|null
*/
protected string|array|null $loads = ['vehicles'];
}