Last active
May 29, 2020 17:22
-
-
Save rakeshsoni18/42d2c877258f244fbea182ba23ceb061 to your computer and use it in GitHub Desktop.
Collection Map Column Change
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://stackoverflow.com/questions/43711940/laravel-collection-using-map-and-contains | |
$list = collect($list)->map(function($x){ | |
return [ | |
'Name' => $x->fname. ' ' .$x->lname, | |
'Gender' => $x->gender, | |
'Designation' => $x->designation, | |
'Experience' => $x->exp_year, | |
'Preferred Location' => $x->preferred_location, | |
'Expected Salary' => $x->expected_salary, | |
'Resume' => $x->resume ? url('resume/'.$x->resume) : 'Not Available', | |
'Video Resume' => $x->resume_video_link ? 'https://www.youtube.com/watch?v=' .$x->resume_video_link : 'Not Available' | |
]; | |
})->toArray(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment