You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When following the instructions in the README to change the $contentColumn property on model, I am presented with the error: App\Models\[MyModel] and VanOns\Laraberg\Traits\RendersContent define the same property ($contentColumn) in the composition of App\Models\[MyModel]. However, the definition differs and is considered incompatible. Class was composed.
To Reproduce
Steps to reproduce the behavior:
Select a Model
Add the following to said Model
use VanOns\Laraberg\Traits\RendersContent;
class MyModel extends Model {
use RendersContent;
protected $contentColumn = 'my_column';
}
See error
Expected behavior
No error and able to use $model->render() as outlined.
Environment (please complete the following information):
Laraberg Version: [e.g. 1.0.0]
OS: Windows 10
Browser: Firefox
Version:106.0.1
Temporary Fix
I have added the following constructor which seems to fix the issue but seems a bit... hacky.
public function __construct()
{
$this->contentColumn = 'my_column';
}
The text was updated successfully, but these errors were encountered:
I got the same issue with the $contentColumn property
App\Models\Blog and VanOns\Laraberg\Traits\RendersContent define the same property ($contentColumn) in the composition of App\Models\Blog. However, the definition differs and is considered incompatible. Class was composed
arman-arif
added a commit
to arman-arif/laraberg
that referenced
this issue
Jan 1, 2023
Describe the bug
When following the instructions in the README to change the $contentColumn property on model, I am presented with the error:
App\Models\[MyModel] and VanOns\Laraberg\Traits\RendersContent define the same property ($contentColumn) in the composition of App\Models\[MyModel]. However, the definition differs and is considered incompatible. Class was composed.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
No error and able to use $model->render() as outlined.
Environment (please complete the following information):
Temporary Fix
I have added the following constructor which seems to fix the issue but seems a bit... hacky.
The text was updated successfully, but these errors were encountered: