/
home
/
maktab
/
server
/
app
/
Models
/
File Upload :
llllll
Current File: /home/maktab/server/app/Models/Notice.php
<?php namespace App\Models; use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Model; class Notice extends Model { use HasFactory,Selector; protected $fillable =[ 'title', 'body', 'user_id', 'sts', 'pdf' ]; public function file(){ return $this->hasMany(File::class)->whereNull('type'); } public function pdf_file(){ return $this->belongsTo(File::class,'pdf'); } public function user() { return $this->belongsTo(User::class); } static $STS = [ 1=>'در انتظار تایید', 2 =>'تایید نشده', 3 =>'تایید شده', ]; }
Copyright ©2k19 -
Hexid
|
Tex7ure