Skip to content
Advertisement

Losing session data after POST from third party website

I have a Laravel site that redirects to a payment provider (external third party website). When the user completes their payment, they are redirected back to my site via a POST request. The issue I’m having is that the user’s session is lost when they return to the confirmation page. I wondered if this was behaviour of PHP generally but

Add a placeholder text using PhpSpreadsheet

Is there a way to add a placeholder text to a cell using PhpSpreadsheet? I want a piece of text to be placeholder, so clients can instantly type in that cell instead of first needing to remove the …

Determine selected options based on many-to-many relationship

I have three tables: products, categories and category_product. In my edit form page I’m displaying the categories and subcategories values in a select box. The chosen category options are saved in the pivot table category_product. This table has product_id and category_id. Here’s my code. Product model Category model: edit product page view: subcats-select view How can I put “selected” attribute

How to send multiple data into view with their required relationships

I am working on a Laravel 5.8 project which is an Online Store. and in this project, I wanted to add “Printing Order Factors” feature for Admins. So I have made a form like this: So basically admins can select multiple orders like this: And I’m trying to send order ids as an array: <input class=”form-check-input” name=”orderCheck[]” type=”checkbox” value=”{{ $order->ord_id

Retrieve JSON Value error Undefined offset: 0

I have been having a hard time retrieving eth Value from a Json url for a while now, it keeps returning the error “Undefined offset: 0” as easy as it may be to anyone giving the answer, …

Using phpmailer V6 with docker-compose

I have been using PHPMailer 5.2 with a standalone LAMP server and it has been working fine. However, after studying more modern ways to set up a webserver, I tried docker-compose with php8 and apache2….

Advertisement