You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
560 B

<?php
namespace mstrNmspc;
use App\User;
use Illuminate\Database\Eloquent\Model;
class Master extends Model
{
protected $fillable = ['name', 'description', 'creator_id'];
public function getNameLinkAttribute()
{
return link_to_route('masters.show', $this->name, [$this], [
'title' => __(
'app.show_detail_title',
['name' => $this->name, 'type' => __('master.master')]
),
]);
}
public function creator()
{
return $this->belongsTo(User::class);
}
}