Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Guideline membuat helper yang benar #1

Open
uyab opened this issue May 22, 2019 · 0 comments
Open

Guideline membuat helper yang benar #1

uyab opened this issue May 22, 2019 · 0 comments

Comments

@uyab
Copy link
Contributor

uyab commented May 22, 2019

Page: https://laravolt.dev/docs/snippets/membuat-helper/

Masukkan ke section Guideline: Helper

Kriteria:

  • Helper disimpan ke dalam folder helpers
  • Helper-helper yang sejenis dikelompokkan dalam file tersendiri
  • Nama fungsi dalam helper harus memakai prefix sesuai nama helper. Contoh, app_helper.php, maka nama fungsinya harus ada prefix app_something()

Contoh

// helpers/date_helper.php
function date_ymd_to_indonesia($param);
function date_indonesia_to_ymd($param);
function date_range_to_indonesia($param);

// helpers/rupiah_helper.php
function rupiah_to_decimal($param);
function rupiah_from_decimal($param);

// helpers/app_helper.php
function app_format_jabatan($param);
function app_kuartal_ke($param);
function app_semester_ke($param);
@uyab uyab changed the title Lengkapi tutorial tentang membuat helper Guideline membuat helper yang benar Nov 24, 2020
@uyab uyab added the Guideline label Nov 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants