7e1cd96bf5
This is the first part of the API. It supports most of contacts, as well as the journal. This PR also brings Monica to Laravel 5.5, as the API required it with the new concept of resources. It needs to run `php artisan migrate` as well as `php artisan passport:keys` to generate the access tokens needed for the API.
24 lines
480 B
PHP
24 lines
480 B
PHP
<?php
|
|
|
|
namespace App;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class ActivityType extends Model
|
|
{
|
|
protected $table = 'activity_types';
|
|
|
|
/**
|
|
* Get the activity type group record associated with the activity types.
|
|
*/
|
|
public function group()
|
|
{
|
|
return $this->belongsTo('App\ActivityTypeGroup', 'activity_type_group_id');
|
|
}
|
|
|
|
public function getTranslationKeyAsString()
|
|
{
|
|
return trans('people.activity_type_'.$this->key);
|
|
}
|
|
}
|