Having a controller issue here.
I added a trait to the FrontPage controller and it’s working fine on the localhost but I get a “Trait not found” error on the production server.
app\Controllers\FrontPage.php :
<?php
namespace App\Controllers;
use Sober\Controller\Controller;
class FrontPage extends Controller
{
use Partials\ACF\Hero;
}
app\Controllers\Partials\ACF\hero.php :
<?php
namespace App\Controllers\Partials\ACF;
trait Hero
{
public function hero()
{
$description = get_field('hero_page_description');
$image = get_field('hero_page_image');
return (object) array(
'description' => $description,
'image' => $image
);
}
}
Am i missing something?