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); }

Imap Basics

I explain how to delete or move mails from a mail account through a script. First you should setup a connection. This should look like this: /* connect to server */ $hostname = ‘{}’; $username = ‘’; $password = ‘top_secreted_69’; /* try to connect */ $inbox = imap_open($hostname,$username,$password) or die(‘Cannot connect to mailbox: ‘ . […]