Sh3ll
OdayForums


Server : Apache
System : Linux 145.162.205.92.host.secureserver.net 5.14.0-611.45.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Apr 1 05:56:53 EDT 2026 x86_64
User : tradze ( 1001)
PHP Version : 8.1.34
Disable Function : NONE
Directory :  /home/tradze/public_html/test.tradze.com/Backup25feb2025/app/Modules/Zenjobs/Models/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/tradze/public_html/test.tradze.com/Backup25feb2025/app/Modules/Zenjobs/Models/Zenjob.php
<?php

namespace App\Modules\Zenjobs\Models;

use Carbon\Carbon;
use Cviebrock\EloquentSluggable\Sluggable;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Support\Facades\Storage;

class Zenjob extends Model
{
    use SoftDeletes;
    use Sluggable;

    /**
     * The database table used by the model.
     *
     * @var string
     */
    protected $table="zenjobs";

    /**
     * The attributes that are mass assignable.
     *
     * @var array
     */
    protected $fillable = ['title','slug','body','is_active','image_feature','meta_title','meta_keywords','meta_description'];

    /**
     * The attributes that should be mutated to dates.
     *
     * @var array
     */
    protected $dates = ['deleted_at','posted_at'];

    /**
     * Set sluggable attribute
     * @return array
     */
    public function sluggable()
    {
        return [
            'slug' => [
                'source' => 'slug'
            ]
        ];
    }

    /**
     * Get all of the banners for the event.
     *
     * @return \Illuminate\Database\Eloquent\Relations\MorphToMany
     */
    public function banners()
    {
        return $this->morphToMany('App\Modules\Banners\Models\Banner', 'bannerable');
    }

//    /**
//     * The page url
//     *
//     * @return mixed null|string
//     */
//    public function getUrlAttribute()
//    {
//        return route('zenjobs.show', ['slug' => $this->slug]);
//    }

    /**
     * The pages short content
     *
     * @return mixed null|string
     */
    public function getExcerptAttribute()
    {
        if (array_has($this->attributes, 'body')) {
            return str_limit(
                strip_tags($this->attributes['body']),
                400
            );
        }
        return null;
    }

    /**
     * The page url
     *
     * @return mixed null|string
     */
    public function getUrlAttribute()
    {
        return route('zenjobs.show', ['slug' => $this->slug]);
    }

}

ZeroDay Forums Mini