Last active
October 29, 2015 14:04
-
-
Save hoanganh25991/983a801d91de9375e9a6 to your computer and use it in GitHub Desktop.
Laravel: Model Cat
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 | |
class Cat extends Eloquent { | |
protected $fillable = array('name','date_of_birth','breed_id'); | |
public function breed(){ | |
return $this->belongsTo('Breed'); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment