this is my code :
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Article;
class ArticleController extends Controller {
public function show($id){
$article=Article::findOrfail($id);
return view('article', ['article' => $article]);
}
public function list() {
$articles=Article::all();
return view('articles', ['articles'=>$articles]);
}
}
and this is the date forming code but i don't know where to paste it, in my code:
date('d-m-Y', strtotime($articles->from_date));