У меня есть выбранная информация, которая выглядит следующим образом:
use Illuminate\Support\Facades\DB;
$arrays = DB::table('users')->where('id', Session::get('user_id'))->get();
И когда я повторяю $arrays
, я получаю что-то вроде:
[{"id":2,"first_name":"Mukesh","last_name":"Aryal","birth_date":"2002-08-23","email":"aryalmukesh60m@gmail.com","password":"4cb22531c6a79ae334e9e9ca95575394","profession":"Student","gender":"male","age":15,"bio":"maaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","preferred_people":"Anyone eXPLORE! Would Prefer","profile_picture":"me.jpg","full_name":"Mukesh Aryal","joined_date":"2018-04-29","user_json":"'{\"first_name\":\"Mukesh\",\"last_name\":\"Aryal\",\"birth_date\":\"2002-8-23\",\"birth_date_in_string\":\"23 August 2002\",\"email_address\":\"aryalmukesh60m@gmail.com\",\"password\":\"4cb22531c6a79ae334e9e9ca95575394\",\"profession\":\"Student\",\"gender\":\"male\",\"age\":\"15\",\"bio\":\"maaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"profile_picture\":\"me.jpg\",\"full_name\":\"Mukesh Aryal\",\"joined_date\":\"2018-04-29\",\"joined_date_in_string\":\"29 April 2018\",\"friends\":[],\"posts\":[],\"address\":\"\",\"searches\":[],\"nickname\":\"\",\"likedSubjects\":[],\"facebookProfile\":{},\"twitterProfile\":{}}'"}]
Теперь, как echo
выделяет first_name
из всего объекта?