mirror of
https://gitlab.com/TheGamecraft/c-cms.git
synced 2026-04-21 02:39:10 -04:00
3.0.1c
This commit is contained in:
23
app/Log.php
Normal file
23
app/Log.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
namespace App;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Log extends Model
|
||||
{
|
||||
public function user()
|
||||
{
|
||||
return $this->belongsTo(User::class);
|
||||
}
|
||||
|
||||
public static function saveLog($action)
|
||||
{
|
||||
$log = new Log;
|
||||
|
||||
$log->action = $action;
|
||||
$log->user_id = \Auth::User()->id;
|
||||
|
||||
$log->save();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user