turkmentv/app/Models/Folder.php

78 lines
2.0 KiB
PHP

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Backpack\CRUD\CrudTrait;
class Folder extends Model
{
use CrudTrait;
/*
|--------------------------------------------------------------------------
| GLOBAL VARIABLES
|--------------------------------------------------------------------------
*/
protected $table = 'folders';
// protected $primaryKey = 'id';
public $timestamps = false;
// protected $guarded = ['id'];
protected $fillable = [
'title',
'description',
'property_id',
'folder_table',
'total_price',
'choice_time',
'on_tv',
'on_radio',
'on_subtitle',
'on_web',
'on_belet',
'on_aydym',
'usage_name',
'beletli'
];
// protected $hidden = [];
// protected $dates = [];
//json to array;
protected $casts = [
'folder_table'=>'array'
];
/*
|--------------------------------------------------------------------------
| FUNCTIONS
|--------------------------------------------------------------------------
*/
/*
|--------------------------------------------------------------------------
| RELATIONS
|--------------------------------------------------------------------------
*/
public function property(){
return $this->belongsTo('App\Models\PropertyType','property_id');
}
/*
|--------------------------------------------------------------------------
| SCOPES
|--------------------------------------------------------------------------
*/
/*
|--------------------------------------------------------------------------
| ACCESORS
|--------------------------------------------------------------------------
*/
/*
|--------------------------------------------------------------------------
| MUTATORS
|--------------------------------------------------------------------------
*/
}