cybercog/laravel-ownership

The Model Owner Wont Link Up With The Owned Model

BenQoder opened this issue · 4 comments

I Get Error Saying

{ "message": "Type error: Argument 1 passed to App\\Brand::changeOwnerTo() must be an instance of Cog\\Contracts\\Ownership\\CanBeOwner, instance of App\\User given, called in C:\\xampp\\htdocs\\real\\haayaa\\app\\Http\\Controllers\\Auth\\RegisterController.php on line 142", "exception": "Symfony\\Component\\Debug\\Exception\\FatalThrowableError", "file": "C:\\xampp\\htdocs\\real\\haayaa\\vendor\\cybercog\\laravel-ownership\\src\\Traits\\HasMorphOwner.php", "line": 139, "trace": }

Hi! Seems like CanBeOwner contract is necessary to be implemented in strict ownership too. That has to be documented as well.

You are right, @dionysiosarvanitis. We are open for Pull Requests.

It looks like issue was solved. Feel free to continue conversation or reopen an issue.