Set up billing profile

This commit is contained in:
Peter Papp
2021-05-06 09:15:37 +02:00
parent 070a3aaba4
commit 69deafeda0
13 changed files with 553 additions and 43 deletions

View File

@@ -17,10 +17,17 @@ class InvoiceProfileController extends Controller
*/
public function show()
{
return response(
new InvoiceProfileResource(Auth::user()->invoiceProfile),
200
);
$user = Auth::user();
if ($user->invoiceProfile) {
return response(
new InvoiceProfileResource($user->invoiceProfile),
200
);
}
return response("Profile didn't exists", 404);
}
/**