Skip to content

Commit

Permalink
agrega funcion para g¡crear tipos de expenses
Browse files Browse the repository at this point in the history
  • Loading branch information
mvdcreativo committed Nov 10, 2020
1 parent 425d856 commit 592289c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
9 changes: 9 additions & 0 deletions app/Http/Controllers/API/UserAPIController.php
Original file line number Diff line number Diff line change
Expand Up @@ -238,5 +238,14 @@ private function transformImage($image, $width, $height, $path)

}

public function properties_user($id)
{
$user = User::find($id)->properties_owner()->get();


return $this->sendResponse($user->toArray(), 'Account retrieved successfully');

}


}
4 changes: 3 additions & 1 deletion routes/api.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@

Route::group(['middleware' => 'auth:api'], function () {
Route::apiResource('expenses_properties_users', 'ExpensesPropertiesUsersAPIController');



Route::get('properties_user/{id}', 'UserAPIController@properties_user');
Route::get('expenses_properties_users/user/{id}', 'ExpensesPropertiesUsersAPIController@user_expenses_all');
});

Expand Down

0 comments on commit 592289c

Please sign in to comment.