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 DoctorSpecialization extends Model
{
/**
* @var string
*/
protected $table = 'doctor_specializations';
public $primaryKey = 'id';
* @var bool
public $timestamps = true;
* @var array
protected $dates = [
'created_at',
'updated_at'
];
public function doctor() {
return $this->hasOne('App\Doctor', 'specialization_id');
}
* @param $str
* @return string
public function trimStr($str)
if(strlen($str) > 15) {
return substr($str, 0, 15)."...";
return $str;