Skip to content

Instantly share code, notes, and snippets.

@rohman
rohman / Article.php
Created December 2, 2013 11:15
L4 Blog Models Article.php
<?php namespace App\Models;
class Article extends Eloquent
{
protected $table = 'articles';
public function author()
{
return $this->belongsTo('User');
}
@rohman
rohman / Page.php
Created December 2, 2013 11:16
L4 Blog Models Page.php
<?php namespace App\Models;
class Page extends Eloquent
{
protected $table = 'pages';
public function author()
{
return $this->belongsTo('User');
}