How to fix FPDF error: Undefined font

If you get this error, this could have one of the following causes 1. You forgot to set the font Before you set the font, its necessary to add the font! $pdf->AddFont(‘DejaVuSansCondensed’, ‘B’, ‘DejaVuSansCondensed-Bold.ttf’, true); $pdf->SetFont(‘DejaVuSansCondensed’, ‘B’, 11); 2. You forgot to set the fontpath Imagine you have specified some custom fonts then you need […]

Load does not work for dynamical relationships?

Imagine you have the following two relations: /** * Relation working/holiday/.. hours * @return [type] [description] */ public function relatedHours($type = null) { $type = $type ?? $this->type; return $this->hours()->where(‘type’, ‘=’, $type); } public function workingHours() { return $this->relatedHours(Type::WORK); }