"TypeError
CyrildeWit\EloquentViewable\Views::forViewable(): Argument #1 ($viewable) must be of type CyrildeWit\EloquentViewable\Contracts\Viewable, Illuminate\Database\Eloquent\Collection given, called in C:\xampp\htdocs\witneer\vendor\cyrildewit\eloquent-viewable\src\helpers.php on line 26,"
pls do needful,
Steps To Reproduce:
[First Step]
[Second Step]
[and so on...]
Expected behavior:
[What you expected to happen]
Actual behavior:
"TypeError
CyrildeWit\EloquentViewable\Views::forViewable(): Argument #1 ($viewable) must be of type CyrildeWit\EloquentViewable\Contracts\Viewable, Illuminate\Database\Eloquent\Collection given, called in C:\xampp\htdocs\witneer\vendor\cyrildewit\eloquent-viewable\src\helpers.php on line 26"
You din't paste your code, so how would I or anyone else be able to see what's going on? I think you forgot to add the Viewable interface to your model. See the docs on how to do this.
Description:
When I use add record(); it shows,
"TypeError CyrildeWit\EloquentViewable\Views::forViewable(): Argument #1 ($viewable) must be of type CyrildeWit\EloquentViewable\Contracts\Viewable, Illuminate\Database\Eloquent\Collection given, called in C:\xampp\htdocs\witneer\vendor\cyrildewit\eloquent-viewable\src\helpers.php on line 26,"
pls do needful,
Steps To Reproduce:
Expected behavior:
[What you expected to happen]
Actual behavior:
"TypeError CyrildeWit\EloquentViewable\Views::forViewable(): Argument #1 ($viewable) must be of type CyrildeWit\EloquentViewable\Contracts\Viewable, Illuminate\Database\Eloquent\Collection given, called in C:\xampp\htdocs\witneer\vendor\cyrildewit\eloquent-viewable\src\helpers.php on line 26"![Screenshot 2023-05-05 220440](https://user-images.githubusercontent.com/85144481/236515906-b0de665b-cb7c-4c59-960e-729bc88e750f.jpg)