mirror of
https://github.com/claradex/nativegallery.git
synced 2024-12-23 17:11:17 +03:00
20 lines
460 B
PHP
20 lines
460 B
PHP
<?php
|
|
|
|
namespace App\Controllers\Api\Admin;
|
|
|
|
|
|
|
|
use App\Services\{Auth, Router, GenerateRandomStr, DB, Json, EXIF, Date};
|
|
use App\Models\{User, Vote, Photo};
|
|
|
|
|
|
class LoadNews
|
|
{
|
|
public function __construct()
|
|
{
|
|
$news = DB::query('SELECT * FROM news ORDER BY id');
|
|
foreach ($news as $n) {
|
|
echo '<div class="card mb-3"><div class="card-body">' . Date::zmdate($n['time']) . '<br>' . $n['body'] . '</div></div>';
|
|
}
|
|
}
|
|
}
|