Tina Hammar

@tinahammar

283 Points 12 Followers

7 Posts

0 Answers

User has not added any information in their about section.

Tina Hammar · 1 year ago

Conditionally apply Laravel Soft Deleting scope

Create an App state service class <?php namespace App\Services; class AppState { public bool $softDeletingScope = true; } Register the service in any service provider use App\Servi...
4

Tina Hammar · 1 year ago

Helper to detect if Laravel is running a job

Create a service class <?php namespace App\Services; class AppState { public bool $isProcessingJob = false; } Add these methods to any ServiceProvider use Illuminate\Queue\Events\...
5

Tina Hammar · 2 years ago

Laravel "doesnt_start_with" rule

Did you know that Laravel has an undocumented validation rule? As opposed to "starts_with" there is a "doesnt_start_with". Just add the translation key to validation.php...
5

Tina Hammar · 2 years ago

Adding translations to Laravel Spark 3 "Plans"

After buying an unlimited license of Laravel Spark v3, I discovered that it loads the subscription plans from a config file, which means that you don't have access to Laravels translation ma...
8

Tina Hammar · 3 years ago

Generate random color gradient background

When users fail to adhere to your imaginary design guide you need to arm yourself to keep the look you aimed for when creating your website. In this article I'll share one of my favourite se...
9

Tina Hammar · 3 years ago

Mixing Image and Map coordinates

I use Leafletjs for both, map (OSM) and image based positioning. I also need to store both types of coordinates in the same database columns. This article is not about how to use Leafletjs,...
5

Tina Hammar · 3 years ago

Dabbling with JSON, Object and Array conversions

This article mostly mentions working with JSON data, but the helpers we will create, are also very useful when you want to convert between stdClass objects and Arrays. The syntax for handli...
3

Loading More Content