Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
gibmyx committed Mar 15, 2020
1 parent 5e3737f commit c919ee6
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion app/Http/Controllers/proyectosController.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public function store(Request $request)
'user_id' => $user->id,
'estado' => 'activo'
];
$object = (new guardarProyecto())->save($params);
(new guardarProyecto())->save($params);
} catch (\Exception $e) {
throw new \Exception("Ah ocurrido un error");
}
Expand Down
4 changes: 2 additions & 2 deletions app/modulos/proyectos/servicios/guardarProyecto.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ public function __construct()
public function create($params)
{

return proyecto::saved([$params]);
proyecto::create($params);
}

public function update($params)
{
return '';
//..
}
}
8 changes: 4 additions & 4 deletions app/modulos/servicios/guardar.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,17 @@ public function __construct()
public function save($params = [])
{
if(isset($params['id']) && !empty($params['id'])){
return $this->update($params);
$this->update($params);
}

return $this->create($params);
$this->create($params);
}

public function create($params){
return $params;
$params;
}

public function update($params){
return $params;
$params;
}
}

0 comments on commit c919ee6

Please sign in to comment.