Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Merklin's avatar

Best practise for features that an app should have

Hi all. Could you share your opinion about features that can be considered good practice to be implemented in a Laravel project?

For, in a project of mine ,I have

  1. Roles implemented
  2. Policies for models
  3. Email verification
  4. To enhance the user accounts, I have implemented an additional feature, that requires a confirmation when a user email is changed (send an email to the old/current email account that a request to change has been made and the user can either confirm or deny the change)

It is not necessary to provide a code, just suggestions or something that you regularly do in your projects. Or The first thing I do when setting up a Laravel projects is ...

0 likes
10 replies
Snapey's avatar
  • Tests
  • Validation
  • Logs viewer for Admin
  • actual application !
Merklin's avatar

@Snapey

  1. Test: Yes, I am working on them and keep track of the coverage
  2. I am using filament, so my front end is built with Livewire components using the filament tables/forms, so I think the validation is covered.
  3. I've implemented rmsramos/activitylog which is a Filament plugin built upon Spatie/Laravel-activitylog. It allows the admins to view all actions taken upon a given model, what is the action and who has executed the action. Also, in case of an update, it also shows which fields are updated with their old and new value. Is that the kind of logs you are talking about?

P.S.: I am using Filament to create a dedicated panel for Administrators/Moderators, and I do not have a dedicated panel for the front end as my theme is quite custom and not very suited for implementation alongside a filament panel.

Sinnbeck's avatar

@Merklin 2. You still need to set validation up in the form() for each field.

Merklin's avatar

@Sinnbeck You mean like setting string(), email(), required etc.? Yes, I have that. The only thing I have not tuned yet is to set the allowed length for strings. Anyway, my forms, tables, infolists etc. are refactored into a trait for each model and I used the trait whenever and wherever needed so this will be no issue as a final touch.

martinbean's avatar

@merklin You should add features to your app that your app actually needs; not just adding features for the sake of it.

1 like
Merklin's avatar

@martinbean True, but @Snapey's proposal to add the ability to look at the error log within the application was spot-on. I found this package.

Also, it is not said that I will add/implement everything that is proposed. You can learn something every day even in a casual talk.

martinbean's avatar

True, but @Snapey's proposal to add the ability to look at the error log within the application was spot-on. I found this package.

@Merklin I use things like Sentry for viewing errors logs; not routes in my own application.

1 like
jlrdw's avatar

Each app will be different. Even authentication and authorization has to be tweaked to suit a custom application.

1 like

Please or to participate in this conversation.