I have two models in my Laravel project (in the 'app' folder) - Product and Seller.
In my Product.php I have (simplified):
class ProductMiniature{
public $name;
public $price;
}
class Product extends ProductMiniature{
public $description;
public $images;
public $manufacturer;
}
Then my Seller.php (simplified):
class Seller{
$name;
$products = [];
public function __construct(){
array_push($this->products, new ProductMiniature();
}
}
However, Laravel throws an error: Class 'App\ProductMiniature' not found
When I tried to push new Product() into $this->products, it works.
What can I do to use ProductMiniature() in other models? I don't want to make new models for each "variant" of this class.