for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class TechTips extends Model
{
protected $primaryKey = 'tip_id';
protected $fillable = ['user_id', 'subject', 'tip_type_id', 'description', 'created_at']; // ToDo: Remove Created_at - future build
protected $casts = [
'created_at' => 'datetime:M d, Y',
'updated_at' => 'datetime:M d, Y',
];
public function systemTypes()
return $this->hasManyThrough('App\SystemTypes', 'App\TechTipSystems', 'tip_id', 'sys_id', 'tip_id', 'sys_id');
}
// public function user()
// {
// return $this->hasOne('App\User', 'user_id', 'user_id');
// }
// public function techTipComments()
// return $this->belongsTo('App\TechTipComments', 'tip_id', 'tip_id');
// public function techTipFiles()
// return $this->belongsTo('App\TechTipFiles', 'tip_id', 'tip_id');
public function techTipSystems()
return $this->hasMany('App\TechTipSystems', 'tip_id', 'tip_id');