Laravel Mutator in query builder?
I’ve no idea how to define two field as one field using mutator in query builder
here’s my code
$model = LoanInformation::select(
'basic_information.first_name', 'basic_information.last_name',
'loan_information.id', 'loan_information.tenor'
)->join(
'basic_information', 'loan_information.user_id', '=', 'basic_information.user_id'
)->where(
'loan_information.status', 'funding'
)->paginate(9);
How can I make first_name and last_name define as name and add statement on it which return strtoupper(first_name)
and strtoupper(last_name)
from Laravel Questions and Answers https://laravelquestions.com/laravel/laravel-mutator-in-query-builder/
via Lzo Media
No comments:
Post a Comment