I am new to Laravel, i am seeding into a table called “area” in a database. Please this is an open source project I am learning with. Below is the code that gives the above error. Please don’t close my question, I have research anywhere I could for help. I am seeding into the “area” table with the columns: name,
Tag: php
How can I update json column with a correct data type with PDO?
I have MySQL 5.7 and a query with PDO: But after it I’m having: id data 1 {“old_field”: 2, “new_field”: “1”} Why does my new value have a string type? Expected table: id data 1 {“old_field”: 2, “new_field”: 1} I have success without using PDO(JSON_OBJECT(‘new_field’, 1)), but I have a string type with using placeholders. Answer When you pass an
laravel – unable to get data outside foreach
dump($data) outside the foreach loop gives me only 1 data where as dump($data) inside the foreach shows all arrays of rows of data . How can i get all rows of data outside the foreach too? EDIT: Error: Call to a member function paginate() on array Answer In Controller add new function for it After that crate that function for
Checkbox HTML array syntax doesn’t work in CakePHP 4
I have an application in CakePHP 4 where I’m doing the equivalent of what’s described in Make array from checkbox form The markup I have is simple: So somebody could for example check “Service 1” and “Service 3” and omit “Service 2”, e.g. I’ve used the Form Helper in CakePHP to generate the HTML above. The code looks like this
Codeigniter 4 doesnt declare models when put inside constructor
I have a problem when i want to declare models only once, i make it like this but its get error saying undefined variable $komikModel on this line 12 which is this how do i fix this ? or maybe you can suggest with better practice than this one. Answer change to
How do I Save IP’s of Those Who Visit My Website to logs.txt?
I have a website with which I want to record the ip’s of those who visit it. Now, I think I have some code that will do the job (I got this from here): What I want this to end up doing is saving the ip address and the date of everyone who visits my website to a log.txt file.
Laravel Paypal Api and Subscription plan integration. Problems of the self-taught beginner
The emotional part. Hello stackoverflow community! Please do not be angry with me for possible stupid questions, the answers to which seem obvious to you. I am learning to program and my only opportunity is to do it myself. I want to understand how I can correctly change my intellection and realize how a real programmer thinks. I will be
Retrieving PayPal email address after payment?
When you are setting up a PayPal Buy Now Button, you can take customers to the URL when they finish checkout. Is there a way to retrieve their PayPal email immediately after PayPal checkout using $_GET? Does PayPal append some kind of ?email=email@address.com at the end of your thankyou page? Or is there any variable I could add at the
How to get user order data by specific month in laravel?
I want to user orders data by specific month in a year. Here is my order Table id | user_id | price | quantity | total Here is my order model Here is my user model In a controller, by doing this I get all user orders Now, How can I get specific month user orders detail? I want to
Laravel :value in another language
Laravel 8 php 7.1 I have a form with some input fields. The form is available in English and German. If you don’t enter something in the German version and want to send it, the following text appears: (In English that means This field is required if the job description is not available. ) How can I replace the job