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.
- Create a model for NeonTaxonomy table - Add taxonCode to Taxonomy model - Add taxon code to Taxonomy Controlled targeting output for single taxon API
- Loading branch information
Showing
3 changed files
with
33 additions
and
0 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