add PIREP pre-file and ACARS updates; removing caching from ACARS/Pirep/User repositories; adjust PirepState enum values; add additional columns

This commit is contained in:
Nabeel Shahzad
2017-12-25 15:19:34 -06:00
parent 70b1476e93
commit 3bd97b4d37
41 changed files with 688 additions and 192 deletions

View File

@@ -0,0 +1,22 @@
<?php
namespace App\Repositories;
use App\Models\Acars;
use App\Repositories\Traits\CacheableRepository;
use Prettus\Repository\Contracts\CacheableInterface;
class AcarsRepository extends BaseRepository implements CacheableInterface
{
use CacheableRepository;
public function model()
{
return Acars::class;
}
public function forPirep($pirep_id)
{
return $this->findWhere(['pirep_id' => $pirep_id]);
}
}

View File

@@ -8,10 +8,8 @@ use App\Models\User;
use App\Repositories\Traits\CacheableRepository;
use Prettus\Repository\Contracts\CacheableInterface;
class PirepRepository extends BaseRepository implements CacheableInterface
class PirepRepository extends BaseRepository
{
use CacheableRepository;
protected $fieldSearchable = [
'user_id',
'flight_id',

View File

@@ -2,17 +2,13 @@
namespace App\Repositories;
use Illuminate\Http\Request;
use Prettus\Repository\Contracts\CacheableInterface;
use App\Models\User;
use App\Models\Enums\PilotState;
use App\Repositories\Criteria\WhereCriteria;
use App\Repositories\Traits\CacheableRepository;
class UserRepository extends BaseRepository implements CacheableInterface
class UserRepository extends BaseRepository
{
use CacheableRepository;
protected $fieldSearchable = [
'name' => 'like',
'email' => 'like',