conedevelopment / bazar

Bazar is an e-commerce package for Laravel applications.
https://root.conedevelopment.com
MIT License
421 stars 56 forks source link

Cannot extend Shpping model to create new column 'awb' #195

Closed bobitza closed 2 years ago

bobitza commented 2 years ago

Description:

I cannot make extend for shipping model to create column 'awb' I see column awb in view, but on update is not updating, i tryied everything, Contract override, model override....

Shipping model overriden but still don't see the fillable awb

<?php

namespace App\Models\Bazar;

use Bazar\Models\Shipping as BazarShipping;
use App\Contracts\Models\Shipping as NewContract;

class Shipping extends BazarShipping
{
    protected $appends = [
        'driver_name',
        'formatted_total',
        'awb'
    ];

    protected $attributes = [
        'tax' => 0,
        'cost' => 0,
        'awb' => ''
    ];

    protected $fillable = [
        'awb'
    ];

}
bobitza commented 2 years ago

I override also to work

    public static function getProxiedContract(): string
    {
        return NewContract::class;
    }