Laravel Versions
How to find out what version of Laravel you have.
The difference between a laravel-framework update and a laravel skeleton update.
What is Laravel skeleton anyway ?
How to control when you get updates.
A Web Developer’s Blog
Posts from 2022
How to find out what version of Laravel you have.
The difference between a laravel-framework update and a laravel skeleton update.
What is Laravel skeleton anyway ?
How to control when you get updates.
Laravel’s routing and binding is nice
But when I got it wrong I didn’t get the kind of error I expected
Laravel automatically resolves Eloquent models defined in routes or controller actions whose type-hinted variable names match a route segment name.
use App\Models\User;
Route::get('/users/{user}', function (User $user) {
return $user->email;
});
I’m working on a PHP project and code review brought up some formatting issues in my CSS.
I wanted to added automated formatting of these files accessible to everyone in the team without them having to install node as this isn’t a JavaScript project.
We already use Docker so that seemed an obvious choice.
Code reviews are a real opportunity to learn from each other - we each write code a little differently and bring with us a range of experience. So much better to spend time on this than debating blank lines.
I’m also slightly dyslexic and find it hard to even see the issues some care passionately about.
I want to do the right thing for the team but going through code line by line and applying a strict set of rules is not something I am good at or enjoy.
Computers are good at following rules though.
Read more ...I used Drupal for years and recently I’m using Laravel for a project.
There is a lot to like about Laravel - but one thing that seems odd to me is the cookie handling.
I had a docker image and couldn’t find the Dockerfile but wanted to see what was in it
docker image history --no-trunc --format="{{.CreatedBy}}" imagename
How to get code coverage reports from PHPUnit to Sonarqube
I started already having an environment using docker-compose but without xdebug the unit tests couldn’t generate coverage reports.
Read more ...I wanted to borrow a commit from another branch
git cherry-pick -n some-commit
git reset
A common problem with Laravel seems to be getting 419 errors.
If you have fixed these except for during testing : disable caching.
Read more ...I love the extra security CSP brings - but it’s still a bit new to me and I hadn’t setup reporting because this is a static site and I didn’t think I had anywhere easy to send the errors.
However I use Sentry for another project and realised that it offers easy CSP reporting.
Read more ...