forked from egbot/Symbiota
-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #507 from BioKIC/add-NEON-taxonCodes-to-API
Add taxon code
- Loading branch information
Showing
3 changed files
with
43 additions
and
16 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?php | ||
|
||
namespace App\Models; | ||
|
||
use Illuminate\Auth\Authenticatable; | ||
use Illuminate\Contracts\Auth\Access\Authorizable as AuthorizableContract; | ||
use Illuminate\Contracts\Auth\Authenticatable as AuthenticatableContract; | ||
use Illuminate\Database\Eloquent\Factories\HasFactory; | ||
use Illuminate\Database\Eloquent\Model; | ||
use Laravel\Lumen\Auth\Authorizable; | ||
|
||
class NeonTaxonomy extends Model implements AuthenticatableContract, AuthorizableContract{ | ||
use Authenticatable, Authorizable, HasFactory; | ||
|
||
protected $table = 'neon_taxonomy'; | ||
protected $primaryKey = 'taxonPK'; | ||
public $timestamps = false; | ||
|
||
protected $fillable = [ ]; | ||
|
||
protected $hidden = [ 'taxonPK', 'verbatimScientificName', 'tid', 'sciname', 'scientificNameAuthorship', 'family', 'acceptedTaxonCode', 'taxonProtocolCategory', | ||
'vernacular', 'source', 'sourceReference', 'notes', 'initialTimestamp' ]; | ||
|
||
public function taxa() { | ||
return $this->belongsTo(Taxonomy::class, 'tid', 'tid'); | ||
} | ||
} |
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