Preview Laravel’s migrations with the pretend flag

Here is the command to preview your Laravel migrations without running them: Laravel’s migrations give us the power to easily version control our database schema creations and updates. In a recent task at work, I needed to find out why a particular migration was failing. This is when I discovered the simple but super-useful flag –pretend, which will show you the queries that Laravel will run against your database without actually running the migrations.

Setup and version control — Financy

Financy is split into two codebases — both of which will be hosted on Github. Version control My idea is to do proper release versions of this as and when new features are released. And to keep the release versions of both the frontend and backend linked. I’d like to also make a point of saying that I don’t want this to be some kind of “saas” thing. I don’t want to build something for other people to subscribe to.…

Financy — blogging a new side project build

A few months back I started building a personal finance planner for planning finances and running particular scenarios depending on whether I bought different things at different times. I ended up leaving it but really want to get back into it.I have also decided to try to start blogging my progress with it as I make certain design decisions and as I learn new things. It may turn into a bunch of messy braindumps but we’ll see how it goes.…

Giving a flatpak program access to home directory on Linux

List out all of your installed Flatpaks and copy the “Application ID” for the Flatpak you want to give home directory access to. Let’s assume we want to give the program “Insomnia” access to our home directory when it is used. The second column is the Application ID. The application ID for Insomnia is rest.insomnia.Insomnia. To give Insomnia access to your home directory, run the following: Notes My knowledge of Flatpaks is limited so apologies if I end up being…

How to easily set a custom redirect in Laravel form requests

In Laravel you can create custom request classes where you can house the validation for any given route. If that validation then fails, Laravel’s default action is to redirect the visitor back to the previous page. This is commonly used for when a form is submitted incorrectly – The visitor will be redirected back to said form to correct the errors. Sometimes, however, you may wish to redirect the visitor to a different location altogether. TL;DR (Too long; didn’t read)…

Laravel Blade push and stack

Laravel’s blade view compiler is second to none. I’ve used a couple of different templating engines and blade is by far my favourite. Including Partials The way in which we include partials of views within our main views is as follows:@include(‘partials.my-first-partial’)It will inject that partial’s content in the specified place. Defining Sections Within our views, we define “sections” with the following syntax: @section(‘section_name’) The section’s content within here @stop And we can define as many sections as we need for…