I’m trying to compress and upload an image to the server with PHP. The upload are working correctly (without any errors), however the image size remains the same after the upload has completed. Could someone please advise what I could possibly be doing wrong? Please find the code below: Answer If it is …
Configuration observer in Laravel
I am beginner in Laravel. I use in my project Laravel 8. I have this code: Controller Model Observer ServiceProvider I have 2 questions / problems: How can I disable following in the controller (index method)? I only need to record the moment when someone opens one record for editing, and does not list all th…
htaccess redirect POST message to php file in subfolder
I hope someone can help me to correct my htaccess problem in a shared hosting scenario, so I don’t have access to httpd.conf. I am trying to redirect a POST to /process-dev.php to the file in the correct subfolder as shown below, but instead my POST gets redirected to index.php The POST comes from the w…
DDD, problem with value objects and “new Domain()”
I have a question, I am migrating from MVC to hexagonal architecture and DDD architecture in a laravel project. I understand that a value object represents an attribute of table X but I have a problem, I have a table with 60 columns, would it have 60 value objects? That same table in the laravel controller ha…
Incorrect PHP calculation
Can someone give me an explanation on why this is happening in PHP: It’s probably very simple but logically I do not see any explanation. Probably how PHP works in the background. I was trying to get the first two decimal positions of a number when I ran into this case. Result should be 29 naturally. If…
Auth::attempt($credentials) Always returns false in Laravel 8.76.2
I’m using Auth::attempt($credentials) in Laravel 8.7, it always returns false. My Login Blade Is resources/views/login/login.blade.php <form action="{{ route('login.custom') }}" method=&…
Shopware : How to get customFields for products in the Order Object
I am currently trying to get a custom field ’emakers_custom_field_warehouse_name’ in the products when an order is made with the code below. Here’s my search Request : Here’s what I get when I serialize $orderObject->getLineItems->first()->getProduct() : https://gist.github.co…
Change Routing in Zend Framework for SEO
I am new to Zend framework and using framework 2.0 , And I want user Friendly URL for My Site. Right Now my URL for Contact us page is http://local.example.com/application/index/contact but I want http://local.example.com/contact like this. My Module name is Application and Controller name is IndexController …
How to get the image links from Gutenberg block gallery and add them as html data attributes to a button in wordpress
I’m using gutenberg gallery block inside a post and I’m trying to create a button which contains all of the image ids in the gallery block as html data attributes such that later when I output the …
Protocol being switched during redirects
In my CakePHP 3.10 application, the redirects are changing the protocols and breaking the app. This is being deployed to an App Service (PHP 7.4) in Azure. I’m not seeing this on another LAMP stack (RHEL, Apache 2.4, PHP 7.3, https configured) on premise. Example, logging out of the application. During …