landrok/laravel-request-logger

View on GitHub
src/RequestLogger/RequestLog.php

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
<?php

namespace Landrok\Laravel\RequestLogger;

use Illuminate\Database\Eloquent\Model;

class RequestLog extends Model
{
    /**
     * Indicates if the model should be timestamped.
     *
     * @var bool
     */
    public $timestamps = false;

    public function getTable()
    {
        return config('requestlogger.tablename', parent::getTable());
    }

    /**
     * Relation to user
     */
    public function user()
    {
        return $this->belongsTo(
            config('requestlogger.user_model')
        );
    }
}