1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- <?php
- namespace App\Models;
- use App\Base\BaseModel;
- use Illuminate\Support\Arr;
- class Cart extends BaseModel
- {
- protected $table = "cart";
- protected $casts = [
- "extra" => "array",
- ];
- public function getThumbAttribute()
- {
- return Arr::get($this->extra, "thumb", "");
- }
- public function getGoodsNameAttribute()
- {
- return Arr::get($this->extra, "goods_name", "");
- }
- }
|