PHP code example of ijeffro / laravel-aircrafts

1. Go to this page and download the library: Download ijeffro/laravel-aircrafts library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

ijeffro / laravel-aircrafts example snippets


use FLAIRUK\Aircrafts\Facades\Aircrafts;

Aircrafts::find('738');          // Aircraft { id: 55, code: "738", name: "Boeing 737-800" }
Aircrafts::findOrFail('388');    // throws ItemNotFoundException for unknown codes
Aircrafts::exists('73h');        // true (codes are case-insensitive)
Aircrafts::findById(55);

Aircrafts::all();                // Collection<string, Aircraft> keyed by code
Aircrafts::search('a380');       // matches on name or exact code
Aircrafts::codes();

Aircrafts::options();            // ['738' => 'Boeing 737-800', ...] sorted by name

use FLAIRUK\Aircrafts\Rules\AircraftCode;

$request->validate(['equipment' => ['

$this->call(\FLAIRUK\Aircrafts\Database\AircraftsSeeder::class);