src/Conductors/Concerns/FindsAndCreatesAbilities.php
protected function createMissingAbilities($existing, array $abilities, $attributes = [])
    {
        $missing = array_diff($abilities, $existing->pluck('name')->all());

        return array_map(function ($ability) use ($attributes) {
            return Models::ability()->create($attributes + ['name' => $ability]);
        }, $missing);
    }
protected function createMissingAbilities($existing, array $abilities, $attributes = [])
    {
        $missing = array_diff($abilities, $existing->pluck('name')->all());

        return array_map(function ($ability) use ($attributes) {
            return Models::ability()->create($attributes + ['name' => $ability]);
        }, $missing);
    }
protected function createMissingAbilities ( $ existing , array $ abilities , $ attributes = [ ] ) { $ missing = array_diff ( $ abilities , $ existing -> pluck ( 'name' ) -> all ( ) ) ; return array_map ( function ( $ ability ) use ( $ attributes ) { return Models :: ability ( ) -> create ( $ attributes + [ 'name' => $ ability ] ) ; } , $ missing ) ; }
Create the non-existant abilities by name.

@param  \Illuminate\Database\Eloquent\Collection  $existing
@param  string[]  $abilities
@param  array  $attributes
@return array
Create the non - existant abilities by name .