# Setting up a controller for ACF fields

**URL:** https://discourse.roots.io/t/setting-up-a-controller-for-acf-fields/11759
**Category:** sage
**Tags:** sage9
**Created:** 2018-02-28T17:43:07Z
**Posts:** 34
**Showing post:** 19 of 34

## Post 19 by @EFW — 2018-03-05T20:51:55Z

Thanks @alwaysblank. I’m getting closer to getting it working now. I’ve renamed:  
app.php to App.php  
front.page.php to FrontPage.php  
page.php to Page.php  
I’ve taken all the code I added out of the above pages so there’s nothing there to sully them.

I can now see my dashboard which is definite progress. However when I try to look at the site I get an error to do with name spacing. I’ve been debugging the site having followed [A Sage 9 + ACF debugging technique](https://discourse.roots.io/t/a-sage-9-acf-debugging-technique/10993)

I’ve now got two errors:  
`Symfony\Component\Debug\Exception\FatalThrowableError Class 'Sober\Controller\Module\Debugger' not found`

`Class 'Sober\Controller\Module\Debugger' not found (View: /srv/www/mysite.co.uk/current/web/app/themes/mytheme/resources/views/partials/page-header.blade.php)`

page-header.blade.php contains:

```
@php
if ($_SERVER['WP_ENV'] == 'development') {
  $controller = new \Sober\Controller\Module\Debugger(get_defined_vars(), 'Debugger');
  $fields = get_fields();
  PC::debug($controller);
  PC::debug($fields);
}
@endphp
```

I really am trying to work it out for myself but I really need help with this bit to help me understand it all.

---

_[View the full topic](https://discourse.roots.io/t/setting-up-a-controller-for-acf-fields/11759)._
