mardi 10 décembre 2019

How to display only date from datetime in laravel

I just write a query to fetch some data from a table in Laravel but in the frontend, I need to display only date not a time

            $table_lastRecords = DB::table($table_name)
                        ->join('lead_status', $status_dbvariable, '=', 'lead_status.status_id')
                        ->join('users', $user_dbvariable, '=', 'users.id')
                        ->select('enquiry_id','yourname',''.$table_name.'.phone','status_title as status','name', 'submitted')->where('name', $user_id)->get();

Where "submitted" store the DateTime but I only want to display the date in frontend. I can't do anything frontend because I use data tables and using loop I just get the data.

Any suggestion for query please let me know how can I achieve it thanks for your time.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire