cyberfly
12/26/2017 - 9:11 AM

Laravel polymorphic relationship with uuid

<?php

namespace App\Traits;

use App\VendorApikey;

trait HasApikey
{
    public function apikeys()
    {
        return $this->morphMany(VendorApikey::class, 'apiable', null, 'apiable_id','uuid');
    }
}