Skip to content
Advertisement

Call to a member function notify() on null in Laravel 8

I want to send an SMS to a mobile phone (if he had already turned on the two-factor authentication system). So at LoginController I added this method: And this loggendin method is inside of a trait called TwoFactorAuthentication, which goes like this: Now the problem is when I want to log in, this message appears on the screen which is

Why xdebug 3 is not loaded?

I have restarted nginx and php7.4-fpm. xdebug 3 looks like is installed based on this: Ini directories from phpinfo(): Loaded Configuration File /etc/php/7.4/fpm/php.ini Scan this dir for additional .ini files /etc/php/7.4/fpm/conf.d Additional .ini files parsed /etc/php/7.4/fpm/conf.d/10-opcache.ini, /etc/php/7.4/fpm/conf.d/10-pdo.ini, /etc/php/7.4/fpm/conf.d/15-xml.ini, /etc/php/7.4/fpm/conf.d/20-bcmath.ini, /etc/php/7.4/fpm/conf.d/20-calendar.ini, /etc/php/7.4/fpm/conf.d/20-ctype.ini, /etc/php/7.4/fpm/conf.d/20-dom.ini, /etc/php/7.4/fpm/conf.d/20-exif.ini, /etc/php/7.4/fpm/conf.d/20-ffi.ini, /etc/php/7.4/fpm/conf.d/20-fileinfo.ini, /etc/php/7.4/fpm/conf.d/20-ftp.ini, /etc/php/7.4/fpm/conf.d/20-gettext.ini, /etc/php/7.4/fpm/conf.d/20-iconv.ini, /etc/php/7.4/fpm/conf.d/20-igbinary.ini, /etc/php/7.4/fpm/conf.d/20-imagick.ini, /etc/php/7.4/fpm/conf.d/20-json.ini, /etc/php/7.4/fpm/conf.d/20-phar.ini, /etc/php/7.4/fpm/conf.d/20-posix.ini, /etc/php/7.4/fpm/conf.d/20-readline.ini, /etc/php/7.4/fpm/conf.d/20-redis.ini, /etc/php/7.4/fpm/conf.d/20-shmop.ini, /etc/php/7.4/fpm/conf.d/20-simplexml.ini, /etc/php/7.4/fpm/conf.d/20-sockets.ini, /etc/php/7.4/fpm/conf.d/20-sysvmsg.ini, /etc/php/7.4/fpm/conf.d/20-sysvsem.ini,

How to use Vich uploader with easyAdmin 3 on Symfony 5

I’ve been trying to use VichUploader to upload files on a Symfony project, already using EasyAdmin 3. I’ve configured everything correctly, but I’m getting this error: The “pieceJointeFile” image field must define the directory where the images are uploaded using the setUploadDir() method. vich uploader configuration and finally My crud controller Finally, I want to clarify that when using TextField it

How to write text with opacity on a picture in PHP?

I’m writing a text on a picture. So far everything is fine, but I have to lower the transparency or opacity value of this text. I tried the following methods for the opacity value, but I couldn’t get any results. Actual result : https://prnt.sc/vy8axf Expected result : https://prnt.sc/vy8cnz Answer You could use imagecolorallocatealpha() to assign alpha channel to $textcolor :

Check if PDFTOHTML is installed on server

I’m trying to check before running a php script if pdftohtml is installed on server. Is there a way to check if pdftohtml is installed on server (linux or mac) from within the code. I’m looking for something similar to function_exists() Answer Perhaps, the following will solve your case: which returns nothing if the program isn’t found. But it will

Php Show Online Users with Pusher or socket.io

I have a forum page. On the only index page, I show an online user list that shows usernames. I use Pusher. It works great. I have a problem about which my customer is complaining. The problem is that when a user browses to other pages, his/her username disappears and re-appears again. His/her connection to Pusher is lost on every

How to carousel in loop?

I am trying to loop carousels with class “active” first item here is my code I trying to put active item in the loop too. Answer You can use $loop->iteration==1 as said in laravel blade doc inside the foreach:

Default to an option on a dropdown option

I’m trying to get a dropdown menu to default to a certain value depending on an employee number, I have managed to get it to say it but it’s not the right option as the options are pulled in from on MS SQL server, so it just created 2 options for ‘Labour’ for example, there’s the one from SQL which

Advertisement