I am new in laravel and working on E-Commerce Project. Plz Help me! I am trying to get data from the database but I can’t. My function // I want to get multiple records like SKU, Color, Size, etc //Here this is a record that I can see using dd($attributes_data) At this point, I think everything is fine …
Tag: database
I am always getting an error everytime i try to add data in db: SQLSTATE[42703]: Undefined column: 7 ERROR: column
So, theres already a pre-made table in the database. Now, I am trying to connect my project to that specific table in the db. but everytime i try to insert data, im getting this error “SQLSTATE[42703]: Undefined column: 7 ERROR: column “updated_at” of relation “applicant_account_tbl…
Python expression equivalent to include() of PHP
Is there any expression in Python that is equivalent to ‘include()’ of PHP? To be more specific, I want to make in python a file for database connection and another for queries, but the variable for the connection only exists in the connection file. If it was in PHP I could use ‘include()…
How to validate at least one checkbox is checked in a loop in Laravel?
I’m trying to validate my checkbox from a loop, where at least one is checked and displays an error/alert or disable the submit button instead if there is no checkbox checked. I tried putting a required method inside my checkbox, but the checkbox is in a loop that’s why it requires all to be check…
Method IlluminateDatabaseSchemaBlueprint::unsignedBidInteger does not exist
error in terminal C:xampphtdocslearninglaragonlavuedatabasemigrations2022_07_17_042348_create_transaction_details_table.php:18 IlluminateDatabaseSchemaBlueprint::__call() this my php migration }; When i put php artisan migration sees an error like above Answer There is a typo in your migration file on ‘…
how to simplify this complex query
This is an extract of one of my php functions. I’m struggling to get this optimized as is super slow, as I need to load all interview records, and then check if the current user is either assigned as user_id on the interview record, or if the user->id is in the interviews shared_user_ids which is jso…
How do I update the incoming value if it’s a photo? [LARAVEL 9]
i have a question. database settings table : When adding a new setting I am sending data like this : and I’m querying this while editing: update method: my question is: if value part is photo how can i update it as photo… Answer You can use the UploadedFile’s store or storeAs to store the up…
store function laravel 8 not saving data to the database
Thanks in advance for taking the time to read throw the question. so I have a form in a blade view where a user can add a name, a description, and upload an image but the data is not being passed to the database The blade view: store function in controller : The migration which I had used: and at
Get Error “Warning: Trying to access array offset on value of type null in”
Here’s the error I wan’t to add text “You” Before msg but it getting error. my php code : ($outgoing_id == $row2[‘outgoing_msg_id’]) ? $you = “You: ” : $you = “”; Answer i think this error returned due to the nullable of the $row2 this besides the wr…
Laravel eloquent update, 500 Internal Server Error
I want to update my database with Laravel eloquent update, but response is always 500 This is my model This is the function This is the route Exception: Thanks before, for helping.. Answer Loking at the exception: Seems like you don’t have updated_at column in your database table. There are two solution…