database/seeds/ProyectoFaker.php
/**
     * Run the database seeds.
     *
     * @return void
     */
Run the database seeds.
@return void
Run the database seeds . @return void
public function run()
    {
        factory(App\Models\Area::class, 5)->create()
        ->each(function ($area) {
        	$area->proyectos()->save(factory(App\Models\Proyecto::class)->make());
        });
    }
public function run ( ) { factory ( App \ Models \ Area :: class , 5 ) -> create ( ) -> each ( function ( $ area ) { $ area -> proyectos ( ) -> save ( factory ( App \ Models \ Proyecto :: class ) -> make ( ) ) ; } ) ; }
Run the database seeds.
Run the database seeds .