2023年2月19日解決済み

なぜ単数形の post を使用するのですか?

ユーザー
public function index()
    {
        return view('index')
            ->with(['posts' => $this->posts]);
    }

    public function show($id)
    {
        return view('show')
            ->with(['post' => $this->posts[$id]]);
    }

なぜ単数形の post を使うのでしょうか?

スタッフ

この回答を見るにはプレミアムプランへの登録が必要です

プレミアムプランとは?