flight search and pagination (in admin), schema changes to accomodate

This commit is contained in:
Nabeel Shahzad
2017-11-30 20:28:45 -06:00
parent a82b8878d3
commit e1b0b92f83
30 changed files with 554 additions and 104 deletions

View File

@@ -3,9 +3,13 @@
namespace App\Repositories;
use App\Models\Aircraft;
use Prettus\Repository\Contracts\CacheableInterface;
use Prettus\Repository\Traits\CacheableRepository;
class AircraftRepository extends BaseRepository
class AircraftRepository extends BaseRepository implements CacheableInterface
{
use CacheableRepository;
/**
* @var array
*/

View File

@@ -3,9 +3,14 @@
namespace App\Repositories;
use App\Models\Airline;
use Prettus\Repository\Contracts\CacheableInterface;
use Prettus\Repository\Traits\CacheableRepository;
class AirlineRepository extends BaseRepository
class AirlineRepository extends BaseRepository implements CacheableInterface
{
use CacheableRepository;
/**
* @var array
*/

View File

@@ -3,10 +3,14 @@
namespace App\Repositories;
use App\Models\Airport;
use Prettus\Repository\Contracts\CacheableInterface;
use Prettus\Repository\Traits\CacheableRepository;
class AirportRepository extends BaseRepository
class AirportRepository extends BaseRepository implements CacheableInterface
{
use CacheableRepository;
/**
* @var array
*/
@@ -21,4 +25,10 @@ class AirportRepository extends BaseRepository
{
return Airport::class;
}
public function create(array $attributes)
{
//$attributes['id'] = $attributes['icao'];
return parent::create($attributes);
}
}

View File

@@ -3,15 +3,22 @@
namespace App\Repositories;
use App\Models\Flight;
use Prettus\Repository\Contracts\CacheableInterface;
use Prettus\Repository\Traits\CacheableRepository;
class FlightRepository extends BaseRepository
class FlightRepository extends BaseRepository implements CacheableInterface
{
use CacheableRepository;
/**
* @var array
*/
protected $fieldSearchable = [
'arr_airport_id',
'dpt_airport_id',
'arr_airport_id'
'flight_number' => 'like',
'route' => 'like',
'notes' => 'like',
];
/**

View File

@@ -3,9 +3,13 @@
namespace App\Repositories;
use App\Models\Rank;
use Prettus\Repository\Contracts\CacheableInterface;
use Prettus\Repository\Traits\CacheableRepository;
class RankRepository extends BaseRepository
class RankRepository extends BaseRepository implements CacheableInterface
{
use CacheableRepository;
/**
* @var array
*/