Fix display of supplier products and offerings - wasnt including all services
This commit is contained in:
@@ -4,7 +4,6 @@ namespace App\Http\Controllers;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
|
||||
use App\Http\Requests\{SupplierAddEdit,SupplierProductAddEdit};
|
||||
use App\Models\{Cost,Supplier,SupplierDetail};
|
||||
|
@@ -6,7 +6,7 @@ use Illuminate\Support\Collection;
|
||||
|
||||
interface ProductItem
|
||||
{
|
||||
public function product();
|
||||
public function products();
|
||||
|
||||
public function supplied();
|
||||
|
||||
|
@@ -20,11 +20,11 @@ abstract class Type extends Model
|
||||
/**
|
||||
* The product that sells this type
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Relations\MorphOne
|
||||
* @return \Illuminate\Database\Eloquent\Relations\MorphMany
|
||||
*/
|
||||
public function product()
|
||||
public function products()
|
||||
{
|
||||
return $this->morphOne(Product::class, null,'model','model_id');
|
||||
return $this->morphMany(Product::class, null,'model','model_id');
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user