PHP code example of ernysans / laraworld

1. Go to this page and download the library: Download ernysans/laraworld 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/ */

    

ernysans / laraworld example snippets


// app/config/app.php

'providers' => [
    '...',
    ErnySans\Laraworld\LaraworldServiceProvider::class,
];

// app/config/app.php

'aliases' => [
    '...',
    'Countries' => ErnySans\Laraworld\Facades\Countries::class,
    'TimeZones' => ErnySans\Laraworld\Facades\TimeZones::class,
    'Languages' => ErnySans\Laraworld\Facades\Languages::class,
];

// database/seeds/DatabaseSeeder.php

class DatabaseSeeder extends Seeder
{

    public function run()
    {
        // Seed the countries
        $this->call(CountriesTableSeeder::class);
    
        // Seed the Time Zones
        $this->call(TimeZonesTableSeeder::class);
    
        // Seed the Languages
        $this->call(LanguagesTableSeeder::class);
    }
}
bash
$ php artisan vendor:publish --provider="ErnySans\Laraworld\LaraworldServiceProvider"
bash
$ php artisan migrate
$ php artisan db:seed