Back | Home
الـ Path الحالي: /home/picotech/domains/instantly.picotech.app/public_html/public/uploads/.././././../app/./Models
الملفات الموجودة في هذا الـ Path:
.
..
Accelerator.php
AcceleratorCategory.php
Activity.php
BillingRequest.php
Campaign.php
CampaignTemplate.php
Contact.php
ContactGroup.php
Customer.php
CustomerMail.php
CustomerPlan.php
CustomerSettings.php
Domain.php
Draft.php
EmailAccount.php
EmailAddress.php
EmailQueue.php
EmailTemplate.php
Faq.php
Form.php
FormData.php
FormDetail.php
FrontContact.php
Group.php
Label.php
Lead.php
Message.php
MessageLog.php
Page.php
Plan.php
Sender.php
SendingServer.php
Settings.php
Tax.php
Template.php
Ticket.php
TicketDescription.php
Unsubscribe.php
User.php
VerifyCustomer.php

مشاهدة ملف: Campaign.php

<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class Campaign extends Model
{
    use HasFactory;
    protected $dates=['start_date','end_date'];
    protected $fillable=['title', 'start_date', 'end_date','message_body', 'start_time', 'end_time', 'status', 'import_fail_message','template_id','from_email','from_email_name','reply_to_email','customize_to_email','from_email','subject_line','preview_text','to_email','group_id'];

    public function email_queue(){
        return $this->hasMany(EmailQueue::class);
    }
    public function messages(){
        return $this->hasMany(Message::class);
    }
    public function campaign_template(){
        return $this->belongsTo(CampaignTemplate::class,'template_id')->withDefault();
    }
    public function total_processed(){
        return $this->email_queue()->where('schedule_completed','yes');
    }
}