ImageToGallery::relations PHP Méthode

relations() public méthode

public relations ( ) : array
Résultat array relational rules.
    public function relations()
    {
        // NOTE: you may need to adjust the relation name and the related
        // class name for the relations automatically generated below.
        return ['gallery' => [self::BELONGS_TO, 'Gallery', 'gallery_id'], 'image' => [self::BELONGS_TO, 'Image', 'image_id']];
    }