Thursday, December 29, 2022

Call Factory and make multiple record entry Using tinker

 $d = Factory(App\Department::class,3)->create();


> $d = Factory(App\Department::class, 10)->create();

= Illuminate\Database\Eloquent\Collection {#4478

    all: [

      App\Department {#4475

        name: "Gonzalo Walter Jr.",

        updated_at: "2022-12-29 16:17:43",

        created_at: "2022-12-29 16:17:43",

        id: 12,

      },

      App\Department {#4483

        name: "Felicia Lockman",

        updated_at: "2022-12-29 16:17:43",

        created_at: "2022-12-29 16:17:43",

        id: 13,

      },

      App\Department {#4481

        name: "Amelie O'Keefe",

        updated_at: "2022-12-29 16:17:43",

        created_at: "2022-12-29 16:17:43",

        id: 14,

      },

      App\Department {#4482

        name: "Dr. Theresia Gottlieb III",

        updated_at: "2022-12-29 16:17:43",

        created_at: "2022-12-29 16:17:43",

        id: 15,

      },

      App\Department {#4479

        name: "Ebony Douglas",

        updated_at: "2022-12-29 16:17:43",

        created_at: "2022-12-29 16:17:43",

        id: 16,

      },

      App\Department {#4477

        name: "Prof. Lillian Cummerata I",

        updated_at: "2022-12-29 16:17:43",

        created_at: "2022-12-29 16:17:43",

        id: 17,

      },

      App\Department {#4473

        name: "Lelia Thompson",

        updated_at: "2022-12-29 16:17:44",

        created_at: "2022-12-29 16:17:44",

        id: 18,

      },

      App\Department {#4474

        name: "Elza Kreiger",

        updated_at: "2022-12-29 16:17:44",

        created_at: "2022-12-29 16:17:44",

        id: 19,

      },

      App\Department {#4503

        name: "Brielle Lowe",

        updated_at: "2022-12-29 16:17:44",

        created_at: "2022-12-29 16:17:44",

        id: 20,

      },

      App\Department {#4500

        name: "Mr. Brenden West IV",

        updated_at: "2022-12-29 16:17:44",

        created_at: "2022-12-29 16:17:44",

        id: 21,

      },

    ],

  }







Call Factory and make multiple record entry Using tinker

  $d = Factory(App\Department::class,3)->create(); > $d = Factory(App\Department::class, 10)->create(); = Illuminate\Database\Eloqu...