Created
June 28, 2016 18:37
-
-
Save DavidStrada/4af68f6965e6f6dd93f822547b3dc47d to your computer and use it in GitHub Desktop.
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 Article extends Model | |
{ | |
protected $fillable = ['name', 'content']; | |
public function laws() | |
{ | |
return $this->belongsTo(Law::class); | |
} | |
public function articles() | |
{ | |
return $this->belongsTo(Article::class); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment