Search
 
SCRIPT & CODE EXAMPLE
 

PHP

object of class stdclass could not be converted to string php laravel

/*
$data is indeed an array, but it's made up of objects.

Convert its content to array before creating it*/
$data = array();
foreach ($results as $result) {
   $result->filed1 = 'some modification';
   $result->filed2 = 'some modification2';
   $data[] = (array)$result;  
   #or first convert it and then change its properties using 
   #an array syntax, it's up to you
}
Excel::create(....
Comment

PREVIOUS NEXT
Code Example
Php :: how to pass data to controller in laravel 
Php :: php exit 
Php :: close connection pdo 
Php :: php date 
Php :: random string number generator in php codeigniter 
Php :: echo php in html 
Php :: PHP OOP - Static properties 
Php :: sass download for windows 
Php :: get all error message in array form laravel validation in laravel 
Php :: install phpmyadmin ubuntu 18.04 
Php :: how to declare global variable in laravel controller 
Php :: php localhost:8000 
Php :: where like in laravel 
Php :: how to manually remove cache in laravel 
Php :: woocommerce disable links on specific product 
Php :: symfony form submit on refresh 
Php :: Drupal 8 custom form image field 
Php :: if file is not selected in file input type php 
Php :: how to create cookie in laravel 
Php :: clear cache using laravel controller 
Php :: cakephp login session 
Php :: in date function + 1 month and - 1 day in php 
Php :: php function to minify javascript and css 
Php :: php creating a subdomain automatically in cpanel 
Php :: php strict mopde 
Php :: Override the route parameter names 
Php :: Allowed memory size of 1610612736 bytes exhausted (tried to allocate 4096 bytes) in phar://D:/Program Files/Composer - PHP/composer.phar/src/Composer/DependencyResolver/Solver.php on line 223 
Php :: php get function from different file 
Php :: laravel dirty words check 
Php :: Regullar date format for php 
ADD CONTENT
Topic
Content
Source link
Name
5+4 =