set fare classes on aircraft w/ overrides (no admin ui yet)
This commit is contained in:
32
app/Repositories/FareRepository.php
Normal file
32
app/Repositories/FareRepository.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
namespace App\Repositories;
|
||||
|
||||
use App\Models\Fare;
|
||||
|
||||
class FareRepository extends BaseRepository
|
||||
{
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
protected $fieldSearchable = [
|
||||
'code',
|
||||
'name',
|
||||
'price',
|
||||
'cost',
|
||||
'notes',
|
||||
'active'
|
||||
];
|
||||
|
||||
/**
|
||||
* Configure the Model
|
||||
**/
|
||||
public function model()
|
||||
{
|
||||
return Fare::class;
|
||||
}
|
||||
|
||||
public function findByCode($code) {
|
||||
return $this->findByField('code', $code)->first();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user