39 lines
692 B
PHP
39 lines
692 B
PHP
<?php
|
|
|
|
namespace App\Interfaces;
|
|
|
|
use Illuminate\Support\Collection;
|
|
|
|
interface ProductSupplier
|
|
{
|
|
/**
|
|
* Return the traffic inclusion with the service
|
|
*
|
|
* @return mixed
|
|
*/
|
|
public function allowance(): Collection;
|
|
|
|
/**
|
|
* Render the traffic inclusion as a string
|
|
*
|
|
* @return mixed
|
|
*/
|
|
public function allowance_string(): string;
|
|
|
|
/**
|
|
* Return the product cost
|
|
*
|
|
* @return float
|
|
*/
|
|
public function getCostAttribute(): float;
|
|
|
|
/**
|
|
* Return the supplier class
|
|
* If there is a model relationship return:
|
|
* return $this->getRelationValue('supplier');
|
|
* otherwise return a stdClass with name
|
|
*
|
|
* @return mixed
|
|
*/
|
|
public function getSupplierAttribute();
|
|
} |