public static function checkDocumentOwner($type, $data) { if (Auth::user()->id == Laralum::document($type, $data)->author->id) { return true; } else { return false; } }