database/seeds/DepartmentSeeder.php
/**
     * Run the database seeds.
     *
     * @return void
     */
Run the database seeds.
@return void
Run the database seeds . @return void
public function run()
    {
        $departments = [
            'General Management',
            'Marketing Department',
            'Operations Department',
            'Finance Department',
            'Sales Department',
            'Human Resource Department',
            'Purchase Department'
        ];
        foreach($departments as $department) {
            Department::create([
                'name' => $department
            ]);
        }
    }
public function run ( ) { $ departments = [ 'General Management' , 'Marketing Department' , 'Operations Department' , 'Finance Department' , 'Sales Department' , 'Human Resource Department' , 'Purchase Department' ] ; foreach ( $ departments as $ department ) { Department :: create ( [ 'name' => $ department ] ) ; } }
Run the database seeds.
Run the database seeds .