Created
October 19, 2020 20:08
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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