title: Laravel Undefined offset error
body: <p>I just finishing my blog, using laravel, and I want to add a comment feature on it, but i got few errors like this, can anyone help me, please??,
  sorry for my English, English is not my native language,
  Thank you :)</p>
  
  <pre><code>(1/1) ErrorException
  Undefined offset: 1
  </code></pre>
  
  <p>Here is my AdminBlog.php Model</p>
  
  <pre><code>&lt;?php
  namespace App;
  
  use Illuminate\Database\Eloquent\Model;
  
  class AdminBlog extends Model
  {
      protected $table = 'admin';
      protected $fillable = ['title','text','images','slug'];
  
      public function comment(){
          return $this-&gt;hasMany('App\Comment');
      }
  }
  </code></pre>
  
  <p>Comment.php Model</p>
  
  <pre><code>&lt;?php
  
  namespace App;
  
  use Illuminate\Database\Eloquent\Model;
  
  class Comment extends Model
  {
      protected $table = 'comment';
      protected $fillable = ['name','email','text','post_id'];
  
      public function post(){
          return $this-&gt;belongsTo('App\AdminBlog');
      }
  }
  </code></pre>
  
  <p>BlogController.php </p>
  
  <pre><code>&lt;?php
  
  namespace App\Http\Controllers;
  
  use Illuminate\Http\Request;
  use App\AdminBlog;
  use App\Comment;
  
  class BlogController extends Controller
  {
      //Index
      public function index(){
          $post   = AdminBlog::all();
          return view('blog/index', compact('post'));
      }
  
      //Show
      public function show($id){
          $post       = AdminBlog::findOrFail($id);
          $comment    = Comment::all();
          //dd($comment);
          return view('blog/show', ['post'    =&gt; $post,
                                    'comment' =&gt; $comment]);
      }
  }
  </code></pre>
  
  <p>show.blade.php</p>
  
  <pre><code>&lt;div class="col-md-12 post-comment-show"&gt;
          @foreach($post-&gt;comment() as $list)
              &lt;p&gt;{{ $list-&gt;text }}&lt;/p&gt;
          @foreach
  &lt;/div&gt;
  </code></pre>