nativegallery/app/Controllers/Api/Images/Comments/Load.php

23 lines
477 B
PHP
Raw Normal View History

2024-07-05 11:51:14 +03:00
<?php
2024-07-06 09:57:51 +03:00
namespace App\Controllers\Api\Images\Comments;
2024-07-05 11:51:14 +03:00
use App\Services\{Auth, Router, GenerateRandomStr, DB, Json, EXIF};
use App\Models\{User, Vote, Comment};
2024-07-06 09:57:51 +03:00
class Load
2024-07-05 11:51:14 +03:00
{
public function __construct()
{
$comments = DB::query('SELECT * FROM photos_comments WHERE photo_id=:pid', array(':pid'=>explode('/', $_SERVER['REQUEST_URI'])[4]));
foreach ($comments as $c) {
$comm = new Comment($c);
$comm->i();
}
}
}