Files
LaravelShoppingcart/tests/Fixtures/BuyableProductTrait.php
2022-02-05 21:38:17 +01:00

35 lines
685 B
PHP

<?php
namespace Gloudemans\Tests\Shoppingcart\Fixtures;
use Gloudemans\Shoppingcart\Contracts\Buyable;
use Illuminate\Database\Eloquent\Model;
class BuyableProductTrait extends Model implements Buyable
{
use \Gloudemans\Shoppingcart\CanBeBought;
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
'id',
'name',
'title',
'description',
'price',
'currency',
'weight',
];
protected $attributes = [
'id' => 1,
'name' => 'Item name',
'price' => 1000,
'currency' => 'USD',
'weight' => 0,
];
}