Я пытаюсь использовать imagettftext в laravel проекте, но у меня ошибка
500 Внутренняя ошибка сервера!
Это мой laravel .log файл ниже
[2020-04-17 20:35:54] local.ERROR: Call to undefined function App\Http\Controllers\User\imagettftext() {"exception":"[object] (Symfony\\Component\\Debug\\Exception\\FatalThrowableError(code: 0): Call to undefined function App\\Http\\Controllers\\User\\imagettftext() at /opt/lampp/htdocs/ag/project/app/Http/Controllers/User/LoginController.php:113)
[stacktrace]
#0 /opt/lampp/htdocs/ag/project/app/Http/Controllers/User/LoginController.php(21): App\\Http\\Controllers\\User\\LoginController->code_image()
#1 [internal function]: App\\Http\\Controllers\\User\\LoginController->showLoginForm()
#2 /opt/lampp/htdocs/ag/project/vendor/laravel/framework/src/Illuminate/Routing/Controller.php(54): call_user_func_array(Array, Array)
#3 /opt/lampp/htdocs/ag/project/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(45): Illuminate\\Routing\\Controller->callAction('showLoginForm', Array)
"}
Вот мой home.controller. php file
private function code_image()
{
{
$letter = $allowed_letters[rand(0, $length-1)];
imagettftext($image, 25, 1, 35+($i*25), 35, $text_color, $font, $letter);
$word.=$letter;
}
}```