i have a data and want to parsing at view .
this Table name is 'training'
id | name | user_id | no_training| date| created_at| updated_at|
and parsing view like this
1| software dev| 3| 198734-2445| 2018-06-20| 2019-06-19 19:30:40| 2019-06-19 19:30:40|
and i want to parsing at the view 'date' not = 2019-06-19 , but i want to view like , 19-June-2019 or 19-Juni-2019 (indonesian(id) Time)
what i need to add for my Controller or model ?
My Model :
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Training extends Model
{
protected $table = 'training';
protected $fillable = [
'user_id','name','no_training','date',
];
public function users()
{
return $this->belongsTo(\App\User::class ,'user_id');
}
}
my Controller :
public function training()
{
$training = Training::with('users')->get();
return view('admin.training',['training' => $training]);
}
from Newest questions tagged laravel-5 - Stack Overflow http://bit.ly/2Y4BOzv
via IFTTT
Aucun commentaire:
Enregistrer un commentaire