PHP code example of tonnyorg / laraseed

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

    

tonnyorg / laraseed example snippets


    'providers' => [
        /*
         * Package Service Providers...
         */
        TonnyORG\LaraSeed\ServiceProvider::class,
    ],



use Illuminate\Database\Seeder;
use TonnyORG\LaraSeed\Database\Traits\SeedersHandler;

class DatabaseSeeder extends Seeder
{
    use SeedersHandler;


$this->call(UsersTableSeeder::class);

$this->try(UsersTableSeeder::class);

    'providers' => [
        'users' => [
            // other stuff here
        ],

        'administrators' => [
            'driver' => 'eloquent',
            'model' => App\Administrator::class, // We are going to create this model in the next step
        ],
    ],

    // more stuff here

    'passwords' => [
        'users' => [
            // and more stuff here as well
        ],

        'administrators' => [
            'provider' => 'administrators',
            'table' => 'administrator_password_resets',
            'expire' => 60,
            'throttle' => 60,
        ],
    ],

    'passwords' => [
        'users' => [
            //
            'table' => 'user_password_resets',
            //
        ],
    ],

// app/User.php


namespace App;

use TonnyORG\LaraSeed\Models\SoftUser;

class User extends SoftUser
{
    //
}

// app/Post.php


namespace App;

use TonnyORG\LaraSeed\Models\Base\Model;

class Post extends Model
{
    //
}
shell
php artisan vendor:publish --tag=laraseed-config
shell
php artisan laraseed:update-revision-number
shell
php artisan vendor:publish --tag=laraseed-migration-administrators
shell
php artisan migrate
shell
php artisan vendor:publish --tag=laraseed-migration-renaming
shell
php artisan migrate
shell
php artisan vendor:publish --tag=laraseed-migration-soft-deletes
shell
php artisan migrate