GithubHelp home page GithubHelp logo

guoyu07 / laravel-airlines Goto Github PK

View Code? Open in Web Editor NEW

This project forked from flairuk/laravel-airlines

0.0 0.0 0.0 34 KB

IATA Airline Codes for Laravel Framework

License: MIT License

PHP 72.72% HTML 27.28%

laravel-airlines's Introduction

Laravel Airlines

Latest Stable Version Total Downloads Latest Unstable Version License

Laravel Airlines is a bundle for Laravel, providing Iata Code ISO 3166_3 and country codes for all the airlines.

Please note that the dev-master version is for Laravel 5 only

Installation

Run composer require ijeffro/laravel-airlines dev-master in your Laravel root directory to install the latest version.

Or add ijeffro/laravel-airlines to composer.json.

"ijeffro/laravel-airlines": "dev-master"

Run composer update to pull down the latest version of Airline List.

Edit app/config/app.php and add the provider and filter

'providers' => [
    ijeffro\Airlines\AirlinesServiceProvider::class,
]

Now add the alias.

'aliases' => [
    'Airlines' => ijeffro\Airlines\AirlinesFacade::class,
]

Model

You can start by publishing the configuration. This is an optional step, it contains the table name and does not need to be altered. If the default name airlines suits you, leave it. Otherwise run the following command

$ php artisan vendor:publish

Next generate the migration file:

$ php artisan airlines:migration

It will generate the <timestamp>_setup_airlines_table.php migration and the AirlinesSeeder.php seeder. To make sure the data is seeded insert the following code in the seeds/DatabaseSeeder.php

//Seed the airlines
$this->call('AirlinesSeeder');
$this->command->info('Seeded the airlines!');

You may now run it with the artisan migrate command:

$ php artisan migrate --seed

After running this command the filled airlines table will be available

laravel-airlines's People

Contributors

ijeffro avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.