Commit 97cd72cc by Angel MAS

Order by publication date

parent 5e121a18
...@@ -130,7 +130,7 @@ class AdminBlogController extends Controller ...@@ -130,7 +130,7 @@ class AdminBlogController extends Controller
public function getEntries() public function getEntries()
{ {
$entries = Entry::select(['id','title','slug', 'body','status', 'cover','tags','created_at', 'category_id', 'publication_date', 'views']); $entries = Entry::select(['id','title','slug', 'body','status', 'cover','tags','created_at', 'category_id', 'publication_date', 'views'])->orderBy('publication_date', 'desc');
return Datatables::of($entries) return Datatables::of($entries)
->addColumn('preview', function ($entry) { ->addColumn('preview', function ($entry) {
return "<p><b>$entry->title</b></p>". return "<p><b>$entry->title</b></p>".
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment