PHP/Laravel: Error: Call to a member function __call() on null
I’m currently working on a Laravel project and I’m facing an issue with setting up a factory for a pivot table. Specifically, I’m trying to create a factory for a table that serves as a pivot between Order
and Product
models. The table is named order_product
and includes fields such as order_id
, product_id
, quantity
, and price
.