I'm facing a problem about passing a variable in another page in laravel from controller. it always shows me the same exception but i did everything and exact from tutorial. I'm using Laravel 5.8

this is my problem:

```
Undefined variable: pods (View: 
E:\work\practice\Test\resources\views\pods\index.blade.php)

```

my controller code:

```
public function index()
    {
        $pods = Pod::all();
        return view('pods.index', compact('pods'));
    }

```

my resource file:

```
@extends('layouts.app')
@section('title','Home')

@section('content')
    <div class="container">
        <a href="{{ route('pods.create') }}" class="btn btn-uni"><i class="fa fa-plus-circle" aria-hidden="true"></i> Create New Pod</a>
    </div>

    <div class="container mt-3">
        <div class="row">
            <div class="col-3">
                <button class="btn btn-primary" type="button" data-toggle="collapse" data-target="#collapseExample" aria-expanded="false" aria-controls="collapseExample">
                 {{ $pods->name }}
                </button>
            </div>
            <div class="col-9">
                <div class="collapse" id="collapseExample">
                    <div class="card card-body">
                        Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident.
                    </div>
                </div>
            </div>
        </div>
    </div>
@endsection

```

this is my route code: 

```
   Route::get('/', function () { return view('pods.index'); }); 
   Auth::routes(); 
   Route::get('/home', 'HomeController@index'); 
   Route::resource('pods','PodController');

```

Please give a solution for my problem. Thank you.