database/seeders/AbilityCategorySeeder.php
/**
     * Run the database seeds.
     *
     * @return void
     */
Run the database seeds.
@return void
Run the database seeds . @return void
public function run()
    {
        Ability::where('name', '3 HP')->firstOrFail()->favorit_category()->attach(Category::findOrFail('Lyssky'));
        Ability::where('name', '3 HP')->firstOrFail()->favorit_category()->attach(Category::findOrFail('Jæger'));
        Ability::where('name', '4 HP')->firstOrFail()->favorit_category()->attach(Category::findOrFail('Kriger'));
        Ability::where('name', '5 HP')->firstOrFail()->favorit_category()->attach(Category::findOrFail('Kriger'));
        Ability::where('name', '6 HP')->firstOrFail()->favorit_category()->attach(Category::findOrFail('Kriger'));
        Ability::where('name', 'Nævekamp 2')->firstOrFail()->favorit_category()->attach(Category::findOrFail('Kriger'));
        Ability::where('name', 'Nævekamp 2')->firstOrFail()->favorit_category()->attach(Category::findOrFail('Jæger'));
        Ability::where('name', 'Nævekamp 2')->firstOrFail()->favorit_category()->attach(Category::findOrFail('Lyssky'));
        Ability::where('name', 'Nævekamp 2')->firstOrFail()->favorit_category()->attach(Category::findOrFail('Borger'));
        Ability::where('name', 'Nævekamp 3')->firstOrFail()->favorit_category()->attach(Category::findOrFail('Kriger'));
        Ability::where('name', 'Nævekamp 3')->firstOrFail()->favorit_category()->attach(Category::findOrFail('Jæger'));
        Ability::where('name', 'Nævekamp 3')->firstOrFail()->favorit_category()->attach(Category::findOrFail('Lyssky'));
        Ability::where('name', 'Nævekamp 3')->firstOrFail()->favorit_category()->attach(Category::findOrFail('Borger'));
        Ability::where('name', 'Nævekamp 4')->firstOrFail()->favorit_category()->attach(Category::findOrFail('Kriger'));
        Ability::where('name', 'Nævekamp 4')->firstOrFail()->favorit_category()->attach(Category::findOrFail('Jæger'));
        Ability::where('name', 'Nævekamp 4')->firstOrFail()->favorit_category()->attach(Category::findOrFail('Lyssky'));
        Ability::where('name', 'Nævekamp 4')->firstOrFail()->favorit_category()->attach(Category::findOrFail('Borger'));
        Ability::where('name', 'Nævekamp 5')->firstOrFail()->favorit_category()->attach(Category::findOrFail('Kriger'));
        Ability::where('name', 'Nævekamp 5')->firstOrFail()->favorit_category()->attach(Category::findOrFail('Jæger'));
        Ability::where('name', 'Nævekamp 5')->firstOrFail()->favorit_category()->attach(Category::findOrFail('Lyssky'));
        Ability::where('name', 'Nævekamp 5')->firstOrFail()->favorit_category()->attach(Category::findOrFail('Borger'));
        Ability::where('name', 'Nævekamp 6')->firstOrFail()->favorit_category()->attach(Category::findOrFail('Kriger'));
        Ability::where('name', 'Nævekamp 7')->firstOrFail()->favorit_category()->attach(Category::findOrFail('Kriger'));
        Ability::where('name', 'Nævekamp 8')->firstOrFail()->favorit_category()->attach(Category::findOrFail('Kriger'));
        Ability::where('name', 'Nævekamp 9')->firstOrFail()->favorit_category()->attach(Category::findOrFail('Kriger'));
        Ability::where('name', 'Nævekamp 10')->firstOrFail()->favorit_category()->attach(Category::findOrFail('Kriger'));
        Ability::where('name', 'Troldmand Niveau 1 Ildens Orden')->firstOrFail()->favorit_category()->attach(Category::findOrFail('Akedemiker'));
        Ability::where('name', 'Troldmand Niveau 2 Ildens Orden')->firstOrFail()->favorit_category()->attach(Category::findOrFail('Akedemiker'));
        Ability::where('name', 'Troldmand Niveau 3 Ildens Orden')->firstOrFail()->favorit_category()->attach(Category::findOrFail('Akedemiker'));
        Ability::where('name', 'Troldmand Niveau 4 Ildens Orden')->firstOrFail()->favorit_category()->attach(Category::findOrFail('Akedemiker'));
        Ability::where('name', 'Troldmand Niveau 1 Den Grå Orden')->firstOrFail()->favorit_category()->attach(Category::findOrFail('Akedemiker'));
        Ability::where('name', 'Troldmand Niveau 2 Den Grå Orden')->firstOrFail()->favorit_category()->attach(Category::findOrFail('Akedemiker'));
        Ability::where('name', 'Troldmand Niveau 3 Den Grå Orden')->firstOrFail()->favorit_category()->attach(Category::findOrFail('Akedemiker'));
        Ability::where('name', 'Troldmand Niveau 4 Den Grå Orden')->firstOrFail()->favorit_category()->attach(Category::findOrFail('Akedemiker'));
        Ability::where('name', 'Dhar')->firstOrFail()->favorit_category()->attach(Category::findOrFail('Akedemiker'));
    }
public function run ( ) { Ability :: where ( 'name' , '3 HP' ) -> firstOrFail ( ) -> favorit_category ( ) -> attach ( Category :: findOrFail ( 'Lyssky' ) ) ; Ability :: where ( 'name' , '3 HP' ) -> firstOrFail ( ) -> favorit_category ( ) -> attach ( Category :: findOrFail ( 'Jæger') ) ; Ability :: where ( 'name' , '4 HP' ) -> firstOrFail ( ) -> favorit_category ( ) -> attach ( Category :: findOrFail ( 'Kriger' ) ) ; Ability :: where ( 'name' , '5 HP' ) -> firstOrFail ( ) -> favorit_category ( ) -> attach ( Category :: findOrFail ( 'Kriger' ) ) ; Ability :: where ( 'name' , '6 HP' ) -> firstOrFail ( ) -> favorit_category ( ) -> attach ( Category :: findOrFail ( 'Kriger' ) ) ; Ability :: where ( 'name' , 'Nævekamp 2') - >f irstOrFail( ) - >f avorit_category( ) - >a ttach( C ategory: :f indOrFail( ' Kriger') ) ; Ability :: where ( 'name' , 'Nævekamp 2') - >f irstOrFail( ) - >f avorit_category( ) - >a ttach( C ategory: :f indOrFail( ' Jæger')) ; Ability :: where ( 'name' , 'Nævekamp 2') - >f irstOrFail( ) - >f avorit_category( ) - >a ttach( C ategory: :f indOrFail( ' Lyssky') ) ; Ability :: where ( 'name' , 'Nævekamp 2') - >f irstOrFail( ) - >f avorit_category( ) - >a ttach( C ategory: :f indOrFail( ' Borger') ) ; Ability :: where ( 'name' , 'Nævekamp 3') - >f irstOrFail( ) - >f avorit_category( ) - >a ttach( C ategory: :f indOrFail( ' Kriger') ) ; Ability :: where ( 'name' , 'Nævekamp 3') - >f irstOrFail( ) - >f avorit_category( ) - >a ttach( C ategory: :f indOrFail( ' Jæger')) ; Ability :: where ( 'name' , 'Nævekamp 3') - >f irstOrFail( ) - >f avorit_category( ) - >a ttach( C ategory: :f indOrFail( ' Lyssky') ) ; Ability :: where ( 'name' , 'Nævekamp 3') - >f irstOrFail( ) - >f avorit_category( ) - >a ttach( C ategory: :f indOrFail( ' Borger') ) ; Ability :: where ( 'name' , 'Nævekamp 4') - >f irstOrFail( ) - >f avorit_category( ) - >a ttach( C ategory: :f indOrFail( ' Kriger') ) ; Ability :: where ( 'name' , 'Nævekamp 4') - >f irstOrFail( ) - >f avorit_category( ) - >a ttach( C ategory: :f indOrFail( ' Jæger')) ; Ability :: where ( 'name' , 'Nævekamp 4') - >f irstOrFail( ) - >f avorit_category( ) - >a ttach( C ategory: :f indOrFail( ' Lyssky') ) ; Ability :: where ( 'name' , 'Nævekamp 4') - >f irstOrFail( ) - >f avorit_category( ) - >a ttach( C ategory: :f indOrFail( ' Borger') ) ; Ability :: where ( 'name' , 'Nævekamp 5') - >f irstOrFail( ) - >f avorit_category( ) - >a ttach( C ategory: :f indOrFail( ' Kriger') ) ; Ability :: where ( 'name' , 'Nævekamp 5') - >f irstOrFail( ) - >f avorit_category( ) - >a ttach( C ategory: :f indOrFail( ' Jæger')) ; Ability :: where ( 'name' , 'Nævekamp 5') - >f irstOrFail( ) - >f avorit_category( ) - >a ttach( C ategory: :f indOrFail( ' Lyssky') ) ; Ability :: where ( 'name' , 'Nævekamp 5') - >f irstOrFail( ) - >f avorit_category( ) - >a ttach( C ategory: :f indOrFail( ' Borger') ) ; Ability :: where ( 'name' , 'Nævekamp 6') - >f irstOrFail( ) - >f avorit_category( ) - >a ttach( C ategory: :f indOrFail( ' Kriger') ) ; Ability :: where ( 'name' , 'Nævekamp 7') - >f irstOrFail( ) - >f avorit_category( ) - >a ttach( C ategory: :f indOrFail( ' Kriger') ) ; Ability :: where ( 'name' , 'Nævekamp 8') - >f irstOrFail( ) - >f avorit_category( ) - >a ttach( C ategory: :f indOrFail( ' Kriger') ) ; Ability :: where ( 'name' , 'Nævekamp 9') - >f irstOrFail( ) - >f avorit_category( ) - >a ttach( C ategory: :f indOrFail( ' Kriger') ) ; Ability :: where ( 'name' , 'Nævekamp 10') - >f irstOrFail( ) - >f avorit_category( ) - >a ttach( C ategory: :f indOrFail( ' Kriger') ) ; Ability :: where ( 'name' , 'Troldmand Niveau 1 Ildens Orden' ) -> firstOrFail ( ) -> favorit_category ( ) -> attach ( Category :: findOrFail ( 'Akedemiker' ) ) ; Ability :: where ( 'name' , 'Troldmand Niveau 2 Ildens Orden' ) -> firstOrFail ( ) -> favorit_category ( ) -> attach ( Category :: findOrFail ( 'Akedemiker' ) ) ; Ability :: where ( 'name' , 'Troldmand Niveau 3 Ildens Orden' ) -> firstOrFail ( ) -> favorit_category ( ) -> attach ( Category :: findOrFail ( 'Akedemiker' ) ) ; Ability :: where ( 'name' , 'Troldmand Niveau 4 Ildens Orden' ) -> firstOrFail ( ) -> favorit_category ( ) -> attach ( Category :: findOrFail ( 'Akedemiker' ) ) ; Ability :: where ( 'name' , 'Troldmand Niveau 1 Den Grå Orden') - >f irstOrFail( ) - >f avorit_category( ) - >a ttach( C ategory: :f indOrFail( ' Akedemiker') ) ; Ability :: where ( 'name' , 'Troldmand Niveau 2 Den Grå Orden') - >f irstOrFail( ) - >f avorit_category( ) - >a ttach( C ategory: :f indOrFail( ' Akedemiker') ) ; Ability :: where ( 'name' , 'Troldmand Niveau 3 Den Grå Orden') - >f irstOrFail( ) - >f avorit_category( ) - >a ttach( C ategory: :f indOrFail( ' Akedemiker') ) ; Ability :: where ( 'name' , 'Troldmand Niveau 4 Den Grå Orden') - >f irstOrFail( ) - >f avorit_category( ) - >a ttach( C ategory: :f indOrFail( ' Akedemiker') ) ; Ability :: where ( 'name' , 'Dhar' ) -> firstOrFail ( ) -> favorit_category ( ) -> attach ( Category :: findOrFail ( 'Akedemiker' ) ) ; }
Run the database seeds.
Run the database seeds .