2016-11-25 28 views
0

私は次のような問題があります:モデルのませクエリ結果はありません[アプリケーションカード]

ないクエリ結果[アプリケーション\カード]。

マイRoute.php

public function store(Request $request) 
    { 
    return $request->all(); 
    } 

そして、私のビュー

@section('content') 
    <div class="row"> 
     <div class="col-md-6 col-md-offset-3"> 
      <h1> {{ $card->title }}</h1> 
      <h4> {{ $card->created_at }}</h4> 

      <ul class="list-group"> 
       @foreach($card->notes as $note) 
        <li class="list-group-item">{{ $note->body }}</li> 
       @endforeach 

      </ul> 

      <hr> 
      <h3>Add a New Note</h3> 

      <form action="post" action="/cards/{{ $card->id }}/notes"> 
      <div class="form-group"> 
       <textarea name="body" class="form-control"></textarea> 
      </div> 

      <div class="form-group"> 
       <button type="submit" class="btn btn-success">Add note</button> 
      </div> 

      </form> 
     </div> 
    </div> 
@stop 
NotesControllerの

Route::post('/cards/{card}/notes' , '[email protected]'); 

マイ

カードとメモの2つのデータベーステーブルがあります。

+1

あなたはそれがより明確に、ルータを表示ようになりますでしょうか? –

+0

/cards/.....のルータをすべて表示してください。 –

+0

あなたの掲示板には、あなたが掲示しているカードIDを持つレコードがありますか? – alariva

答えて

関連する問題