changed avatar url in both old and new EDIT APIs| removed db raw from road items report| changed url in Randd

This commit is contained in:
2024-10-01 13:12:12 +00:00
parent bc4ae8d3a8
commit 7678ed9298
8 changed files with 17 additions and 14 deletions

View File

@@ -16,6 +16,7 @@ use Illuminate\Support\Facades\Storage;
use Illuminate\Support\Facades\Auth;
use App\Models\RandDVoting;
use Illuminate\Support\Str;
use Illuminate\Support\Facades\URL;
use App\Models\RandDVotingPaperAnswer;
class NewRandDCtrl extends Controller
@@ -125,7 +126,7 @@ class NewRandDCtrl extends Controller
$item->setAttribute('Voting', true);
$getVote = RandDVoting::where('project_id', $item->id)->where('status', '2')->first();
if (! RandDVotingPaperAnswer::where('vote_id', $getVote->id)->where('user_id', Auth::user()->id)->first()) {
$url = 'https://rms.rmto.ir/randd/voting/' . $getVote->id;
$url = URL::to('/randd/voting') . '/'. $getVote->id;
$item->setAttribute('urlVoting', $url);
$item->setAttribute('allowVoting', true);