$ request laravel undefined Innere Funktionsabfrage

class BookController extends Controller
{
   public function bookIndex($id, $slug) {
   // echo $id works without a problem

   $findcover = Thing::with(array('cover' => function($query) use ($id) {
        $query->where('imageable_type', 'App\Models\Thing')
              ->where('imageable_id', $id);
        }))->find($id);

        $maincover = $findcover->cover;
   }
Clean Cod