I have installed prestashop api lib in local (xampp) and works great, but when I upload the it to my server, it throws a exception. Log file: autoload_files.php: composer_real.php: composer.json: I supose that laravel doesn´t get correctly the lib but I don´t know how to fix it correctly. Please help, thx. An…
Tag: laravel
Redirect routes to separate controllers for same url pattern?
In my routes file “web.php”, I’m having below routes. I’m trying to access pages with domainname.in/{slug} and dashboard with domainname.in/dashboard pattern but dashboard prefix routes are redirecting to PageController instead of dashboard controller. I tried where clause as below but…
How to return custom response for `IlluminateSupportItemNotFoundException`?
In my controller, I used the method firstOrFail() for a database query with Eloquent. When in debug mode, I get a Laravel error message with the content IlluminateSupportItemNotFoundException. However, I’d like to return a redirect() or mabye back() instead of showing this error screen. How can I do tha…
UTF8 Encoded messages broken charecter on php smpp sms sending
Hi am using php smpp sms sending package to work on socket sms sending. I am sending with $encodedMessage = GsmEncoder::utf8_to_gsm0338($message); UPDATE But the sms is receiving with broken character.I am sending in myn language and also tried as suggested But now half broken half proper message is sending. …
PHP OpenSSL encrypt with DES-ECB algorithm unexpected output
I’ve tried to encrypt the value with DES-ECB via PHP 7.4 (Laravel) and OpenSSL, and I try the online tool https://emvlab.org/descalc/ to encrypt value, the result was the expected. key: 96187BBAB2BD19ACF899B74FB4E37972 Input Data: F01DCCE40F8C365ADE0A7DC03BC11DDE The encrypted data is 355A627E977D8ECF49…
how to run to foreach loops for single select tag laravel?
I want to show previously selected options as selected, I have two data sets. blocks that are JSON encoded in a column with country codes. countries list from the country table I want to compare both and want to show countries selected that are present in users blocked colmn JSON encoded Answer Thanks to @ger…
Can’t do PHP Artisan Migrate with SQLSTATE [42000]
I just want to PHP Artisan Migrate, I’ve just completed my table on migration but have error I’ve checked my completion that there is no error or any miss spelling I’ve not added nullable because all column have to fill I’m using Laravel 8.6 and on Windows with XAMPP and MariaDB Answer…
Laravel Redirect from Helper Class
I’m trying to redirect to an external URL from a helper class. Here’s my controller: Here’s my helper class used in the controller: Why is the redirect() not working inside my_function()? Do I need to include some Laravel classes using the PHP “use” statement? Answer You can add …
Token expiration doesn’t working – Sanctum, Laravel
What I did: I added token expiration to application that has login system, by changed null to 1 minute expiration in sanctum.php file: Problem: It doesn’t work, the app still accept authorized requests all the time. Nothing has changed. Code: Create token (login): Verify token: Delete token (log out): A…
Convert an int to time()
I want to send a reminder email “x” days after an initial email was send. The admin can choose after how many days they want to send a reminder (after the date of the initial mail). This amount is stored in this function and returns an integer (for example 14) The date/time of that the initial email was send …