2019-12-06から1日間の記事一覧
pluckで、独自フィールドを使いたい public function getDisplayUsernameAttribute() { return $this->nickname ?? $this->username; } こんな感じに、display_usernameという値を使いたい。 ニックネームがなければ、ユーザーネームを出すという挙動。 これ…
pluckで、独自フィールドを使いたい public function getDisplayUsernameAttribute() { return $this->nickname ?? $this->username; } こんな感じに、display_usernameという値を使いたい。 ニックネームがなければ、ユーザーネームを出すという挙動。 これ…