PK

ADDRLIN : /home/questend/public_html/domains/flaxzy.com/app/Models/
FLL :
Current File : /home/questend/public_html/domains/flaxzy.com/app/Models/Coupon.php

<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class Coupon extends Model
{
    protected $fillable=['code','type','value','status'];

    public static function findByCode($code){
        return self::where('code',$code)->first();
    }
    public function discount($total){
        if($this->type=="fixed"){
            return $this->value;
        }
        elseif($this->type=="percent"){
            return ($this->value /100)*$total;
        }
        else{
            return 0;
        }
    }
}


PK 99
E-SHOP || DASHBOARD
404

Page Not Found

It looks like you found a glitch in the matrix...

← Back to Home