alexeymezenin / laravel-best-practices

Laravel best practices
11.37k stars 2.38k forks source link

Make use of helpers function and remember to make add_debug true on production #153

Open Masei25 opened 2 years ago

Masei25 commented 2 years ago

Some more contribution.

Just a contribution to the document, ensuring the app_debug is always set to true after deployment.

Using the helper function available on the Illuminate/Support instead of making a new custom helper function

spekulatius commented 2 years ago

I wouldn't consider setting the debug mode to false on prod as a best practice but more as a general requirement. Best practices cover parts where there are options to choose from while leaving debug on true would be simply wrong.

On the string function, I agree it's something to consider. But it's already covered in the DRY section for my feeling. What do you think?

Masei25 commented 2 years ago

I feel the DRY section talks more about reusing code you've written within the application and not really about making use of the built-in functions available in Laravel. As Laravel has numerous methods available globally within the applications that can be called anywhere within the application