Created
October 30, 2012 15:55
-
-
Save aranw/3981121 to your computer and use it in GitHub Desktop.
Artists 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 Askonasholt; | |
class Artist extends \Eloquent | |
{ | |
public static $timestamps = true; | |
public function category() | |
{ | |
return $this->has_many_and_belongs_to('Askonasholt\Category'); | |
} | |
public function audio() | |
{ | |
return $this->has_many_and_belongs_to('Askonasholt\Audio'); | |
} | |
public function video() | |
{ | |
return $this->has_many_and_belongs_to('Askonasholt\Video'); | |
} | |
public function image() | |
{ | |
return $this->has_many_and_belongs_to('Askonasholt\Image'); | |
} | |
public function post() | |
{ | |
return $this->has_many_and_belongs_to('Askonasholt\Post')->with('order'); | |
} | |
public function tour() | |
{ | |
return $this->has_many_and_belongs_to('Askonasholt\Tour'); | |
} | |
public function event() | |
{ | |
return $this->has_many_and_belongs_to('Askonasholt\Event'); | |
} | |
public function pressreview() | |
{ | |
return $this->has_many('Askonasholt\Pressreview'); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment