Skip to content

Instantly share code, notes, and snippets.

@harryWonder
Created October 19, 2020 20:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save harryWonder/118250c783dbe4c49d7fde4cf1434263 to your computer and use it in GitHub Desktop.
Save harryWonder/118250c783dbe4c49d7fde4cf1434263 to your computer and use it in GitHub Desktop.
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