Created
January 13, 2019 13:52
-
-
Save ddavaham/9c085d31cb844c7354ed2a1977129efc 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 SUN\Models\ESI; | |
use Illuminate\Database\Eloquent\Model; | |
class Type extends Model | |
{ | |
... | |
public function skillz() | |
{ | |
return $this->belongsToMany(Type::class, 'type_skillz', 'type_id', 'skill_id'); | |
} | |
public function p_types () | |
{ | |
return $this->belongsToMany(Type::class, 'type_skillz', 'skill_id', 'type_id'); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment