mirror of
https://github.com/kevin-DL/LaravelShoppingcart.git
synced 2026-01-18 21:45:06 +00:00
50 lines
962 B
PHP
50 lines
962 B
PHP
<?php
|
|
|
|
namespace Gloudemans\Tests\Shoppingcart\Fixtures;
|
|
|
|
use Gloudemans\Shoppingcart\Contracts\Buyable;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class BuyableProduct extends Model implements Buyable
|
|
{
|
|
/**
|
|
* Get the identifier of the Buyable item.
|
|
*
|
|
* @return int|string
|
|
*/
|
|
public function getBuyableIdentifier($options = null)
|
|
{
|
|
return $this->id;
|
|
}
|
|
|
|
/**
|
|
* Get the description or title of the Buyable item.
|
|
*
|
|
* @return string
|
|
*/
|
|
public function getBuyableDescription($options = null)
|
|
{
|
|
return $this->name;
|
|
}
|
|
|
|
/**
|
|
* Get the price of the Buyable item.
|
|
*
|
|
* @return float
|
|
*/
|
|
public function getBuyablePrice($options = null)
|
|
{
|
|
return $this->price;
|
|
}
|
|
|
|
/**
|
|
* Get the price of the Buyable item.
|
|
*
|
|
* @return float
|
|
*/
|
|
public function getBuyableWeight($options = null)
|
|
{
|
|
return $this->weight;
|
|
}
|
|
}
|