Skip to content

Error user uploading file on Heroku but not local

I have an app where the user can upload a picture file. I use s3 for storage. On my local machine this works fine but when I deploy to Heroku, every time I try to upload (by clicking a form button in …

where and orwhere is not working on eloquent

$classes = Classes::all(); if (!empty($request) and $request->search != null) $classes = $classes->where(‘class_name’, ‘like’, ‘%’ . $request->search . ‘%’) ->orWhere(‘…

php-ffi: Assign char* of a struct

I’m trying to set the value of a char* of a struct. This is a basic example: I’m getting an exception: FFIException: Incompatible types when assigning to type ‘char*’ from PHP ‘string’ My question is: How to set the char *name of a struct? My dirty way was to make an array …

Update database with a live choice made by client

How to update a specific cell in phpmyadmin with jQuery after appending a specific div to a group, code is below the problem is when the item getting updated in database, it became always Group 2 which is the second update. So how to update the database with the selected group on a side question is it better …

Write to MySQL DB from HTML page

My goal is from a Bootstrap toggle button write on MySQL DB “yes” or “no”. I know that JavaScript in client-side so I found a way (but not sure is the best) to collect variable …

how to remove white space from url in php

i am trying to remove white space from my url because i am using the url variable to query something in the database. but i keep getting %20 in my url which causes the database to return no values of …

Display image url use AXIOS combine with laravel

now im doing AXIOS code combine with laravel to get image from instagram URL. the URL is this https://www.instagram.com/p/B_zZCRpB895/media/?size=t AXIOS is new from me. to get the image, i tried this …

insert data from session array in laravel 6

i want to insert a record of form fields in table and also values from session array i have a form with following fields name,email,address and i have session array ‘cartS’ like this “cartS”…