2018-10-15 14:40:34 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Models;
|
|
|
|
|
2018-11-20 05:36:56 +01:00
|
|
|
use App\Utils\Traits\MakesHash;
|
2018-10-15 14:40:34 +02:00
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
|
2018-11-02 11:54:46 +01:00
|
|
|
class ClientLocation extends BaseModel
|
2018-10-15 14:40:34 +02:00
|
|
|
{
|
2018-11-20 05:36:56 +01:00
|
|
|
use MakesHash;
|
|
|
|
|
2018-10-29 04:16:17 +01:00
|
|
|
public $timestamps = false;
|
2018-11-20 05:36:56 +01:00
|
|
|
|
|
|
|
protected $appends = ['client_location_id'];
|
|
|
|
|
|
|
|
public function getRouteKeyName()
|
|
|
|
{
|
|
|
|
return 'client_location_id';
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getClientLocationIdAttribute()
|
|
|
|
{
|
|
|
|
return $this->encodePrimaryKey($this->id);
|
|
|
|
}
|
|
|
|
|
|
|
|
public function client()
|
|
|
|
{
|
|
|
|
return $this->belongsTo(Client::class);
|
|
|
|
}
|
2018-10-15 14:40:34 +02:00
|
|
|
}
|