Laravel Reset Password Email With Extra Data
I needed to send password reset emails from Laravel with additional data so that depending on how the password reset is triggered the email content varies.
A Web Developer’s Blog
I needed to send password reset emails from Laravel with additional data so that depending on how the password reset is triggered the email content varies.
You may not need this, if you can manage multiple types of user via roles and permissions it will be much the simpler route to follow.
In my case I wanted user with different: properties, relationships, routes, password rules, timeouts, and more.
It was worth the pain of setting up two authenticatable models.
Laravel is very flexible and well documented, but the further you stray from what most people do - the less obvious it is and a few of these steps took me a while to figure out.
Read more ...InertiaJs does a great job of helping me build React apps on Laravel. The form help does a great job - especially with displaying validation messages.
But I couldn’t figure out how to change data and save the form in one action.
The Laravel database validation rules are more powerful and flexible than I realised at first.
Looking at the Available Validation Rules we can see that Exists and Unique both have the suffix (Database)
This is because the both implement the DatabaseRule trait which offers more power than might be expected.
My Laravel site was working just fine yesterday but after a code-only update today I was seeing 502 errors on some pages
upstream sent too big header while reading response header from upstream, client:
While the solution was hard to find it was easy to implement.
Yesterday I thought I’d fixed my https links on Laravel running in Kubernetes - but I had a nagging feeling that I’d just followed some random blog posts and missed something …
Unfortunately what I had looked for was force laravel to use https
When what I really needed was Configuring Trusted Proxies
Read Laravel HTTPS Behind a Proxy instead
The post below is wrong
This doesn’t seem to be well documented - I cant find anything about it in the official docs.
Thanks to Md Obydullah at shouts.dev
My Laravel site runs in kubernetes where TLS encryption happens in a proxy layer and I need Laravel to server content with https links.
Read more ...As a backend developer I’m a big fan of Bootstrap it is a framework that lets me quickly put together user interfaces with consistent components using Modals, Alerts, Toasts and more - things that I don’t want to have to learn how to make work and add design to.
It seems like Laravel used to use Bootstrap by default but has migrated to Tailwind CSS
Laravel has some really good features for setting database connections - but oddly this isn’t spelled out in the documentation.
Databases (especially in Docker containers) often come by default with a single, powerful, user account.
As a result all too often people run Laravel without considering the principle of least privilege.
By following a few simple steps we can enhance security.
Laravel’s database migrations is a great system and makes it easy for the development team to stay in sync with schema changes as well as ensuring tests can run against a defined database state.
It also makes great use of transactions to efficiently roll back changes after each test
But what if you have some large tables of fairly static data that you don’t want to reload on every test run …