turkmentv/app/Models/Folder.php

77 lines
2.0 KiB
PHP
Raw Normal View History

2020-08-11 09:21:44 +00:00
<?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'];
2021-07-30 08:39:45 +00:00
protected $fillable = [
'title',
'description',
'property_id',
'folder_table',
'total_price',
'choice_time',
'on_tv',
'on_radio',
'on_subtitle',
'on_web',
2021-08-12 12:17:48 +00:00
'on_belet',
2021-10-27 11:19:00 +00:00
'usage_name',
'beletli'
2021-07-30 08:39:45 +00:00
];
2020-08-11 09:21:44 +00:00
// 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
|--------------------------------------------------------------------------
*/
}