public function parse(string $list)
    {
        if (!$list) {
            return $list;
        }

        $list = collect(explode(',', $list));

        return $list->map(function ($item) {
            $parts = explode(':', $item);
            $model = app()->make(config('mentions.pools.'.$parts[0].'.model'));
            return $model::findOrFail($parts[1]);
        });
    }
public function parse(string $list)
    {
        if (!$list) {
            return $list;
        }

        $list = collect(explode(',', $list));

        return $list->map(function ($item) {
            $parts = explode(':', $item);
            $model = app()->make(config('mentions.pools.'.$parts[0].'.model'));
            return $model::findOrFail($parts[1]);
        });
    }
public function parse ( string $ list ) { if ( ! $ list ) { return $ list ; } $ list = collect ( explode ( ',' , $ list ) ) ; return $ list -> map ( function ( $ item ) { $ parts = explode ( ':' , $ item ) ; $ model = app ( ) -> make ( config ( 'mentions.pools.' . $ parts [ 0 ] . '.model' ) ) ; return $ model :: findOrFail ( $ parts [ 1 ] ) ; } ) ; }
Parses the encoded string and returns a collection of models.

@return Collection Model
Parses the encoded string and returns a collection of models .