Skip to content

Instantly share code, notes, and snippets.

@brainlet-ali
brainlet-ali / gist-01-dap.lua
Created April 11, 2026 14:03
PhpStorm to LazyVim — full config for every replaced feature (dap, test runner, REST client, database, git, Laravel navigation, LSP)
return {
{
"Weissle/persistent-breakpoints.nvim",
lazy = true, -- Only load when DAP is used
opts = {
load_breakpoints_event = nil, -- Don't auto-load on BufReadPost
},
},
{
"mfussenegger/nvim-dap",

Format Dates with Carbon in Laravel

Introduction

Carbon is a PHP library that provides a simple API extension for DateTime. It provides a fluent, easy-to-use API for creating and manipulating dates and times.

Installation

@brainlet-ali
brainlet-ali / web.php
Last active December 3, 2022 11:45
if conditions in PHP and Laravel
$condition = 'false'; // string length is evaluated to true
if ($condition) {
// true
}
$condition = ''; // string length is zero, so it is evaluated to false
if ($condition) {
// false
}