for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* StupidlySimple - A PHP Framework For Lazy Developers.
*
* @author Fariz Luqman <[email protected]>
* @copyright 2017 Fariz Luqman
* @license MIT
* @link https://stupidlysimple.github.io/
*/
namespace Model;
use Illuminate\Database\Eloquent\Model as Eloquent;
class Post extends Eloquent
{
* Get the comments for the Post.
public function comments()
return $this->hasMany('Model\Comment');
}
public function author()
return $this->belongsTo('Model\User', 'author_id');