KGRKJGETMRETU895U-589TY5MIGM5JGB5SDFESFREWTGR54TY
Server : Apache/2.4.41 (Ubuntu)
System : Linux vmi1525618.contaboserver.net 5.4.0-105-generic #119-Ubuntu SMP Mon Mar 7 18:49:24 UTC 2022 x86_64
User : www-data ( 33)
PHP Version : 8.2.12
Disable Function : NONE
Directory :  /var/www/lecturebazaar.com/app/Models/Api/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /var/www/lecturebazaar.com/app/Models/Api/Ticket.php
<?php

namespace App\Models\Api;

use App\Models\Ticket as Model;

class Ticket extends Model
{
    //
    public function getDetailsAttribute(){

       // dd($this->webinar);
        return [
            'id' => $this->id,
            'title' => $this->title,
            'sub_title' => $this->getSubTitle(),
            'discount' => $this->discount,
            //  'price_with_ticket_discount'=>$this->price -  ($ticket->discount) * $this->price/100 ,
          //  'price_with_ticket_discount' => $this->price - $this->getDiscount($ticket),
            'price_with_ticket_discount' => $this->webinar->price - $this->webinar->getDiscount($this),

            //  'order' => $ticket->order,
            'is_valid' => $this->isValid(),

        ];
    }

    public function webinar()
    {
        return $this->belongsTo('App\Models\Api\Webinar', 'webinar_id', 'id');
    }
}

Anon7 - 2021