Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
This gist is the comment.php file for the ld-fullstack Comment model
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Comment extends Model
{
protected $fillable = ['id', 'user_id', 'forum_id', 'comment'];
public function user()
{
return $this->belongsTo('App\User', 'user_id');
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment