I Am trying to retrieve only the date part from date representation. My database server is phpmyadmin and i retrieve data through laravel controller. I need to get only the date part, for example 2022-01-24 instead of 2022-01-24T18:30:00.000000Z from created_at column.
My web.php path is,
Route::get('/fetch/curriculumVitaes', [App\Http\Controllers\Admin\CurriculumVitaesController::class, 'index']);
I fetch the data through laravel controller and my function is index(),
public function index()
{
$curriculumVitaes = CurriculumVitaes::where('deleted', '=', '0')->get();
return $curriculumVitaes;
}
And I retrieve the data in frontend vue.js,
<tr v-for="(curriculumVitae, index) in curriculumVitaes" :key="index">
<td class="text-center">{{ index + 1 }}</td>
<td class="text-center">{{ curriculumVitae.created_at }}</td>
</tr>