how to encrypt data from a database query array in laravel controller? -


$shares_data = share::where('member_id', $member_id)->get(); 

i want data of $shares_data array in different variable. using laravel 5.2

firstly used code in controller:

enforeach($shares_data $key=>$share_data): $name= $share_data->name; $mobile= $share_data->mobile; endforeach 

but not working. try code below:

foreach($shares_data $key=>$share_data){ $name= $share_data->name; $mobile= $share_data->mobile; } 

now it's working. thank saman kind help.


Comments

Popular posts from this blog

c# - Update a combobox from a presenter (MVP) -

How to understand 2 main() functions after using uftrace to profile the C++ program? -

How to put a lock and transaction on table using spring 4 or above using jdbcTemplate and annotations like @Transactional? -