1
0
Fork 0
forked from mirror/pixelfed
pixelfed/app/ModLog.php
2020-02-18 00:22:47 -07:00

36 lines
532 B
PHP

<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class ModLog extends Model
{
protected $visible = ['id'];
public function admin()
{
return $this->belongsTo(User::class, 'user_id');
}
public function actionToText()
{
$msg = 'Unknown action';
switch ($this->action) {
case 'admin.user.message':
$msg = "Sent Email Message";
break;
case 'admin.user.action.cw.warn':
$msg = "Sent CW reminder";
break;
default:
$msg = 'Unknown action';
break;
}
return $msg;
}
}