Contributing

November 17, 2025 ยท View on GitHub

Contributions are welcome. Please make all pull requests against the development branch and NOT master which is only for releases.

We accept contributions via Pull Requests on Github.

Working on your first Pull Request? You can learn how from this free series How to Contribute to an Open Source Project on GitHub

Commits

Commit Title Standard

Please use the following title schema.

  • prefix: Title

Examples:

  • update: French Translations
  • fix: French Translations
  • security fix: French Translations
  • remove: French Translations
  • add: French Translations
  • revert: French Translations
  • refactor: French Translations

https://www.conventionalcommits.org/en/v1.0.0/

Pull Requests

PR Title Standard

Please use the following title schema.

  • (PREFIX) Title

Examples:

  • (Update) French Translations
  • (Fix) French Translations
  • (Security Fix) French Translations
  • (Remove) French Translations
  • (Add) French Translations
  • (Revert) French Translations
  • (Refactor) French Translations

Code Style

PSR-2 Coding Standard

  • Check the code style with $ ./vendor/bin/pint . --test and fix it with $ ./vendor/bin/pint ..
  • Prettier is also used to format Blade, SCSS, and JS: $ ./node_modules/.bin/prettier . --write.

Follow Laravel naming conventions

WhatHowGoodBad
ControllersingularArticleControllerArticlesController
Routepluralarticles/1article/1
Route namesnake_case with dot notationusers.show_activeusers.show-active, show-active-users
ModelsingularUserUsers
hasOne or belongsTo relationshipsingulararticleCommentarticleComments, article_comment
All other relationshipspluralarticleCommentsarticleComment, article_comments
Tablepluralarticle_commentsarticle_comment, articleComments
Pivot tablesingular model names in alphabetical orderarticle_useruser_article, articles_users
Table columnsnake_case without model namemeta_titleMetaTitle; article_meta_title
Model propertysnake_case$model->created_at$model->createdAt
Foreign keysingular model name with _id suffixarticle_idArticleId, id_article, articles_id
Primary key-idcustom_id
Migration-2017_01_01_000000_create_articles_table2017_01_01_000000_articles
MethodcamelCasegetAllget_all
Method in resource controllertablestoresaveArticle
Method in test classcamelCasetestGuestCannotSeeArticletest_guest_cannot_see_article
VariablecamelCase$articlesWithAuthor$articles_with_author
Collectiondescriptive, plural$activeUsers = User::active()->get()active,active, data
Objectdescriptive, singular$activeUser = User::active()->first()users,users, obj
Config and language files indexsnake_casearticles_enabledArticlesEnabled; articles-enabled
Viewkebab-caseshow-filtered.blade.phpshowFiltered.blade.php, show_filtered.blade.php
Configsnake_casegoogle_calendar.phpgoogleCalendar.php, google-calendar.php
Contract (interface)adjective or nounAuthenticationInterfaceAuthenticatable, IAuthentication
TraitadjectiveNotifiableNotificationTrait
Trait (PSR)adjectiveNotifiableTraitNotification
EnumsingularUserTypeUserTypes, UserTypeEnum
FormRequestsingularUpdateUserRequestUpdateUserFormRequest, UserFormRequest, UserRequest
SeedersingularUserSeederUsersSeeder

Use Laravel helpers when possible and not facades - auth(), info(), cache(), response(), ext. Laravel Helpers

Use shortened syntax when possible - Example: [] and not array().

Common syntaxShorter and more readable syntax
Session::get('cart')session('cart')
$request->session()->get('cart')session('cart')
Session::put('cart', $data)session(['cart' => $data])
$request->input('name'), Request::get('name')$request->name, request('name')
return Redirect::back()return back()
is_null($object->relation) ? null : $object->relation->idoptional($object->relation)->id (in PHP 8: $object->relation?->id)
$request->has('value') ? $request->value : 'default';$request->get('value', 'default')
App::make('Class')app('Class')
->orderBy('created_at', 'desc')->latest()
->orderBy('age', 'desc')->latest('age')
->orderBy('created_at', 'asc')->oldest()

CSS

CSS should follow the BEM methodology and the 7-1 SCSS Architecture.

Any new pages should use the existing component styles unless a new block, element and/or modifier is being added. It is highly discouraged to add new components when an existing one will do.

Other

  • Document any change in behavior - Make sure the README.md and any other relevant documentation are kept up-to-date.

  • Create feature branches - Don't ask us to pull from your master branch.

  • One pull request per feature - If you want to do more than one thing, send multiple pull requests.

Happy coding!