|
@@ -19,10 +19,15 @@ class PlatformContentRepository
|
|
|
|
|
|
public function index($request)
|
|
|
{
|
|
|
- $this->platformContent = $this->platformContent
|
|
|
- ->where('id',$request['id'])->orderBy('id', 'desc')->first();
|
|
|
+ if (isset($request['id'])){
|
|
|
+ return $this->platformContent
|
|
|
+ ->where('id',$request['id'])->orderBy('id', 'desc')->first();
|
|
|
+ }
|
|
|
|
|
|
- return $this->platformContent;
|
|
|
+ $this->platformContent = $this->platformContent
|
|
|
+ ->orderBy('id', 'desc')->get();
|
|
|
+
|
|
|
+ return $this->platformContent;
|
|
|
}
|
|
|
|
|
|
}
|