I am trying to get dir name from my file path: Currently below is my output: Array ( [path] => documentLibraryworkmarketingProcessBusinessMarketingDesignImages2_Product_Images4_SHORT-…
Tag: php
Show Image Response Null If image Is Not Submitted In Laravel
I’m Submitting data through postman in Laravel. I need to show the null value if data do not insert during submitting(In JSON response). But It did not show the image in response I need to show an …
Export and download my php table data to csv
I’m trying to get my datbase fetched data to Excel file for downloading it in execl or csv, but I’m having problems with exporting and also No datas are fetching to the csv .Here is my code: This is …
How to get data with sorting from controller?
I have this query I want to get data from the database with alphabetically sorting $states = State::where(‘status’, 1)->sortBy(‘name’)->get();
assign json object to javascript variable in CanvasJS
Im trying to assign a json object to a variable. Im not sure how to accomplish this. This is my JSON array: [{ “Date”: “2020-01-24 07:35:46”, “sensorName”: “sensor 1”, “sensorValue”: 213 …
Laravel : email send multiples times to one user
I want send email to many users in one time but in this case the mail is sending multiple times to one user it self. Try to email each person one time only(not spam the users) Its didnt work with …
how to change the way the url looks but keep the function
How do I change my URL’s function for calling up on pages? Here’s an example: https://exaplesitename.com/index.php?id=21 What it looks like now but I want it to be something like this: https://…
unable to add key value pairs to complex object in php
I’m trying to create the follwing object in PHP: $obj= {abc@gmail.com:[usr:130,fname:’Bob’,lname:’thekid’,news:0,wres:1,SWAGLeaders:0]} ultimately $obj will have a number of email addresses each …
How to combine multiple sorting functions
It works like a charm in SQL: SELECT * FROM person ORDER BY age DESC, name ASC But what if we have such data in PHP array. How can we do the same? For example, if I have $a = [ [‘name’ => ‘…
unable to create object in php and add key/value pair
I am trying to create an object in PHP and add a key value pair consisting of an email address for the key and an empty array for the value. It is not working. Here is what I’ve tried. $user[0][‘…