PHP code example of dutchcodingcompany / laravel-seed-once

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

    

dutchcodingcompany / laravel-seed-once example snippets

 


namespace Database\Seeders;

use DutchCodingCompany\SeedOnce\Once;
use Illuminate\Database\Seeder;

class PermissionSeeder extends Seeder
{
    use Once;
    
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run(): void
    {
        //
    }
}

if($this->seeded(PermissionSeeder::class)) {
    //
}