flexisip-account-manager/flexiapi/app/AccountAction.php
Timothée Jaussoin 48323477cf Complete the authenticated account contacts tests and fix the related documentation
Cleanup the returned Vcard 4.0 formats
Implement the recently introducted REST endpoints in the admin panels
Add account actions logs to the new Controllers
2021-11-02 17:00:41 +01:00

28 lines
593 B
PHP

<?php
namespace App;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class AccountAction extends Model
{
use HasFactory;
public static $protocols = ['sipinfo' => 'SIPInfo', 'rfc2833' => 'RFC2833'];
public static function protocolsRule()
{
return implode(',', array_keys(self::$protocols));
}
public function getResolvedProtocolAttribute()
{
return self::$protocols[$this->attributes['protocol']];
}
public function account()
{
return $this->belongsTo('App\Account');
}
}