orkhanahmadov/laravel-commentable

View on GitHub
src/Models/Comment.php

Summary

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

namespace Orkhanahmadov\LaravelCommentable\Models;

use Illuminate\Database\Eloquent\Model;

class Comment extends Model
{
    protected $fillable = [
        'user_id',
        'comment',
        'ip_address',
        'user_agent',
    ];

    /**
     * Comment constructor.
     *
     * @param array $attributes
     */
    public function __construct(array $attributes = [])
    {
        parent::__construct($attributes);

        $this->setTable(config('commentable.table_name'));
    }
}