Skip to content
Advertisement

Change column name in Laravel equivalent

I am beginner in Laravel. I have this code:

JavaScript

This is work fine.

I need change my columns result: begin_date as start_date and end_date as finish_date

How can I change it?

Advertisement

Answer

You can write it like this one

JavaScript

Or by editing it in select method

JavaScript
User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement