Преглед изворни кода

Update AdminModeratedProfileResource

Daniel Supernault пре 8 месеци
родитељ
комит
dcddc72c86
1 измењених фајлова са 3 додато и 2 уклоњено
  1. 3 2
      app/Http/Resources/Admin/AdminModeratedProfileResource.php

+ 3 - 2
app/Http/Resources/Admin/AdminModeratedProfileResource.php

@@ -2,9 +2,9 @@
 
 
 namespace App\Http\Resources\Admin;
 namespace App\Http\Resources\Admin;
 
 
+use App\Profile;
 use Illuminate\Http\Request;
 use Illuminate\Http\Request;
 use Illuminate\Http\Resources\Json\JsonResource;
 use Illuminate\Http\Resources\Json\JsonResource;
-use App\Profile;
 
 
 class AdminModeratedProfileResource extends JsonResource
 class AdminModeratedProfileResource extends JsonResource
 {
 {
@@ -17,11 +17,12 @@ class AdminModeratedProfileResource extends JsonResource
     {
     {
         $profileObj = [];
         $profileObj = [];
         $profile = Profile::withTrashed()->find($this->profile_id);
         $profile = Profile::withTrashed()->find($this->profile_id);
-        if($profile) {
+        if ($profile) {
             $profileObj = [
             $profileObj = [
                 'username' => $profile->username,
                 'username' => $profile->username,
             ];
             ];
         }
         }
+
         return [
         return [
             'id' => $this->id,
             'id' => $this->id,
             'domain' => $this->domain,
             'domain' => $this->domain,