2022-01-17から1日間の記事一覧
// nullの可能性があるので、collectメソッドで // (Eloquent Model : Hogeの) Collectionに変換した後、 // filterメソッドで return collect([ userId => $this->user_id, ]) // $valueがnullではないものだけ、 ->filter(fn($value) => null !== $value) …
// nullの可能性があるので、collectメソッドで // (Eloquent Model : Hogeの) Collectionに変換した後、 // filterメソッドで return collect([ userId => $this->user_id, ]) // $valueがnullではないものだけ、 ->filter(fn($value) => null !== $value) …