My component looks like this:
namespace App\View\Components;
use Illuminate\View\Component;
use App\Http\Controllers;
use Illuminate\Http\Request;
class shopImageContainer extends Component
{
public $image;
public $ph;
public $va;
public $config;
/**
* Create a new component instance.
*@param string $ph
*@param string $va
* @return void
*/
public function __construct($ph, $va, $image)
{
$this->image = $image;
$this->va = $va;
$this->ph = $ph;
$this->config = Controllers\GlobalFunctions::getConfig($ph, $va);
}
/**
* Get the view / contents that represent the component.
*
* @return \Illuminate\Contracts\View\View|string
*/
public function render()
{
return view('components.shop-image-container');
}
}
in my component.blade I have this line/block that throws the error "Undefined variable: config":
@if($config->dd)
<div class="col bg-dark text-center p-3">
<a class="btn btn-primary rounded-0 " href="/download/{{ basename($image) }}" role="button">Download in {{ $config->ddLongEdge }}px</a>
</div>
@endif
It seems the constructor method is not being called (I tried dd("test) in the method and, there was no output) Interesting thing is, it's working in my local environment, but not on a server (apache2) I've read somewhere that there might be a bug with components and that there could be something wrong with the configuration of the server, in both cases there was no further detail on fixing the issue. Thanks for any help

