$this->set(compact('software'));
$this->set('_serialize', 'software');
}
+ /**
+ * @param null $id
+ */
+ public function reviewsSoftware ($id=null){
+
+ $software = $this->Softwares->get($id,
+ ["contain" =>
+ [
+ 'Reviews'=> [
+ 'strategy' => 'select',
+ 'queryBuilder' => function ($q) {
+ return $q->order(['Reviews.created' =>'DESC']);
+ },
+ 'Users' => [
+ 'fields' => [
+ 'id',
+ 'username',
+ 'logo_directory',
+ 'photo',
+ 'description'
+ ]
+ ]
+ ]
+ ]
+ ]);
+
+ $this->set(compact('software'));
+ $this->set('_serialize', 'software');
+ }
+
public function backersSoftware ($id=null){
$this->set(compact('software'));
$this->set('_serialize', 'software');
}
-
- /**
- * @param null $id
- */
- public function reviewsSoftware ($id=null){
+ public function contributorsSoftware ($id=null){
$software = $this->Softwares->get($id,
["contain" =>
[
- 'Reviews'=> [
+ 'Contributorssoftwares'=> [
'strategy' => 'select',
'queryBuilder' => function ($q) {
- return $q->order(['Reviews.created' =>'DESC']);
+ return $q->order(['Users.username' =>'ASC']);
},
'Users' => [
'fields' => [