My laravel application should move to route “mango/public/4” but it moves to “mango/public/4/4”. Route file route::get(‘/{id}/edit’,’LaptopController@edit’); route::patch(‘/{id}’,’LaptopController@…
Tag: php
Relative URL not loading PHP file, but exact URL does
Relevant code: if(strpos($_SERVER[‘REQUEST_URI’],’/admin/’) === 0 ){ include_once ‘admin.php’; exit; } if(strpos($_SERVER[‘REQUEST_URI’],’pc-repair-‘) !== FALSE && strpos($_SERVER[‘…
How to handle foreach inside foreach?
I need to follow the concept of “DRY” So I have a lot of repetition in my code. decided to make it short as I can! The design that I need to reach is: my shut: @php $names = [ …
mb_strtoupper on a Laravel form with Blade Template
I tried to use the PHP mb_strtoupper function on a form, but the parameter of the function does not appear in my form. For example: <input type="text" name="nome" value="{{mb_strtoupper(trans('…
How to replace (.) dots by (·) interpuncts in PHP?
There’s a French typographic rule to write properly some words in a genderless way, by adding an (·) interpunct between letters. A few authors on my website are however typing a simple (.) dot instead….
How do I make this Javascript function run?
I’m trying to make an image captcha from scratch for a small project, but in the code below, I can’t seem to manage to run the upRAns() function, I can’t find the proper syntax anywhere. Any help? …
Setting just the year with PHP DateTime
With PHP DateTime you can use methods such as ->modify() ->add() and ->sub() to manipulate the current DateTime object. There are also ->setDate() and ->setTime() methods which allow …
Is it possible to load Swagger annotations from a different class or file?
I have the following simple PHP method like the following and I need to include long Swagger documentation into the annotation above the method, so is it possible to write the annotation in a different class ? and call it here with something like The main purpose is to have a clean class without so many lines…
Cronjob not running php script
I’ve done some searching before this post and I still can’t seem to get this to work. I’m trying to setup a cron job with PHPMailer to send out an email every so often. The script below does work if I …
docker-compose: cannot access to phpMyAdmin from my LEMP stack
I just created a LEMP stack (Linux, Nginx, MariaDB, PHP-FPM) with docker and docker-compose. But somehow, I cannot access to my database trough phpMyAdmin. When I’m trying to reach the phpMyAdmin web-…