PHP code example of mrbenosborne / laravel-database-seed-trait

1. Go to this page and download the library: Download mrbenosborne/laravel-database-seed-trait 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/ */

    

mrbenosborne / laravel-database-seed-trait example snippets




namespace Tests\Feature;

use DatabaseSeeder;
use Illuminate\Foundation\Testing\DatabaseMigrations;
use Tests\TestCase;

class AuthControllerTest extends TestCase
{
    use DatabaseMigrations;

    protected function setUp(): void
    {
        parent::setUp();
        $this->seed(DatabaseSeeder::class);
    }
}



namespace Tests\Feature;

use Illuminate\Foundation\Testing\DatabaseMigrations;
use Database\SeedDatabase;
use Tests\TestCase;

class AuthControllerTest extends TestCase
{
    use DatabaseMigrations, SeedDatabase;
}