🐘 PHP Digest

100 result(s) for β€œclass”

1
clsid2/mpc-hc

Media Player Classic

Trendshift β–² 76 clsid2 7d ago ⚠ Safety
2
PHPStan custom rules

Recently I discovered that this code passed our PHPStan level 10 checks: use http\Exception\InvalidArgumentException; // ... throw new InvalidArgumentException; I was surprised as http\Exception\InvalidArgumentException is not a class in our system. While cooling, I discovered t…

Blogs akrabat.com πŸ’¬ 2 Rob 4mo ago
3
Git Action Icons for PHPStorm

Today I wanted to have buttons for some Git features in my PHPStorm toolbar. Unfortunatley it doesn’t have icons for all the essential Git features, which results in empty buttons. Doesn’t look very nice. So I created some icons on my own. Use them if you like. Class…

Blogs christianscheb.de πŸ’¬ 10 Christian Scheb 138mo ago
4
Composing Music with PHP

I’m not an expert on probability theory, artificial intelligence, and machine learning. And even my Music 201 class from years ago has been long forgotten. But if you’ll indulge me for the next 10 minutes, I think you’ll find that even just a little knowledge can yield impressiv…

Blogs zaemis.blogspot.com πŸ’¬ 9 Timothy Boronczyk 159mo ago
5
GetSet Methods vs. Public Properties

I was recently having a debate with a coworker over the utility of writing getter and setter methods for protected properties of classes. On the one hand, having getters and setters seems like additional boilerplate and programming overhead for very little gain. On the other han…

Blogs blog.everymansoftware.com πŸ’¬ 7 Josh Adell 174mo ago
6
Phar Flung Phing

One of the cooler features of PHP 5.3 is the ability to package up a set of PHP class files and scripts into a single archive, known as a PHAR ("PHp ARchive"). PHAR files are pretty much equivalent to Java's JAR files: they allow you to distribute an entire library or applicatio…

Blogs blog.everymansoftware.com πŸ’¬ 5 Josh Adell 179mo ago
7
Interfaces and Traits: A Powerful Combo

If you're not using interfaces in PHP, you are missing out on a powerful object-oriented programming feature. An interface defines how to interact with a class. By defining an interface and then implementing it, you can guarantee a "contract" for consumers of a class. Interfaces…

Blogs blog.everymansoftware.com πŸ’¬ 3 Josh Adell 167mo ago
8
Command Invoker Pattern with the Open/Closed Principle

Over on DZone, Giorgio Sironi demonstrates the "Open/Closed Principle on real world code". The pattern demonstrated is similar to the Command Pattern, and the post does a good job of introducing a class that is open for extension but closed for modification. Giorgio mentions tha…

Blogs blog.everymansoftware.com πŸ’¬ 2 Josh Adell 176mo ago
9
A Unicode fgetc() in PHP

In preparation for a presentation I’m giving at this month’s Syracuse PHP Users Group meeting, I found the need to read in Unicode characters in PHP one at a time. Unicode is still second-class in PHP; PHP6 failed and we have to fallback to extensions like the mbstring extension…

Blogs zaemis.blogspot.com πŸ’¬ 1 Timothy Boronczyk 132mo ago
10
Laracon US 2026

Laracon US 2026 is the flagship Laravel conference, returning to the East Coast on July 28-29, 2026 at the SoWa Power Station in Boston, Massachusetts. Join Laravel and PHP developers from around the world for two days of world-class talks, hands-on learning, and community conne…

Blogs php.net Webmaster 1mo ago
11
Route Metadata Support in Laravel 13.17

Laravel 13.17.0 adds first-class route metadata support, Postgres transaction pooler integration, a dev:list command, and a Should Not Retry exception handler for queue jobs. The post Route Metadata Support in Laravel 13.17 appeared first on Laravel News. Join the Laravel Newsle…

Blogs laravel-news.com Paul Redmond 9d ago
12
Turn PHP Attributes Into Docs With Signal

Signal is a PHP library that reads attributes on your classes and methods and turns them into Markdown and JSON documentation through a single command. The post Turn PHP Attributes Into Docs With Signal appeared first on Laravel News. Join the Laravel Newsletter to get all the l…

Blogs laravel-news.com Yannick Lyn Fatt 6d ago
13
Selectively ignore lines in git diff

I have a things-as-code project that outputs mostly text-based formats, but a lot of them. To keep an eye on consistency, I rebuild all the outputs and dump them into a local git repository so I can very easily diff to spot any changes – which was fine until we added a bui…

Blogs lornajane.net <span class='p-author h-card'>lornajane</span> 4mo ago
14
Git renames are not renames

I consider myself pretty git-confident, I&#8217;ve worked with it a lot, taught it, been a git consultant, run engineering and various things-as-code teams. This week I had a spectactular git problem where merging one branch into another produced changes that didn&#8217;t exist …

Blogs lornajane.net <span class='p-author h-card'>lornajane</span> 5mo ago
15
Manage Diagrams in AsciiDoc on GitHub

I use a lot of asciidoc these days for work documentation (and I love it) and I&#8217;ve been so happy that GitHub renders it when you view a repository in the web browser, just like it does for Markdown and ReStructuredText. BUT what GitHub does not do is render the image types…

Blogs lornajane.net <span class='p-author h-card'>lornajane</span> 5mo ago
16
Tag Kinds in OpenAPI 3.2

OpenAPI tags have always been annoying: user-supplied arbitrary data for endpoints should be a fabulous feature &#8211; but the documentation tools seem to think that tags are only for them so it becomes more difficult to use tags for other purposes. In fact it is very useful to…

Blogs lornajane.net <span class='p-author h-card'>lornajane</span> 6mo ago
17
Nested tags in OpenAPI 3.2

OpenAPI has always had support for simple tags, but the OpenAPI 3.2 release brought in some serious tag upgrades including a summary field, a &#8220;kind&#8221; field with registry, &#8211; and the ability to nest tags which is the focus of today&#8217;s post. If one level of or…

Blogs lornajane.net <span class='p-author h-card'>lornajane</span> 7mo ago
18
Notification Contexts Matter

Like many of you, my days are dominated by notifications. Emails from project management systems, source control systems, calendar invitations, ticket updates, and message about messages on other platforms. I&#8217;ve noticed that some people use notifications as a power tool, w…

Blogs lornajane.net <span class='p-author h-card'>lornajane</span> 7mo ago
19
Quick local API docs with Scalar

Today I&#8217;m sharing a quick-and-dirty script to take an OpenAPI description, spin up a docs server locally, and copy the URL into your clipboard. I also use a bit of glob expansion in my script to find the right folder, because I have a lot of APIs with long and formulaic di…

Blogs lornajane.net <span class='p-author h-card'>lornajane</span> 9mo ago
20
API Specificity with Overlays and Enums

The more I work on API standards, the more I realise how few teams understand that they can adopt the standards and, without breaking any contract, adapt them to make a strong interface for their own application. One of my favourite examples is to add enums where a standard inte…

Blogs lornajane.net <span class='p-author h-card'>lornajane</span> 11mo ago
21
PHP Internals News: Episode 100: Sealed Classes

PHP Internals News: Episode 100: Sealed Classes Thursday, March 24th 2022, 09:04 GMT London, UK In this episode of "PHP Internals News" I talk with Saif Eddin Gmati (Website, Twitter, GitHub) about the "Sealed Classes" RFC that he has proposed. The RSS feed for this podcast is h…

Blogs phpinternals.news Derick Rethans 52mo ago
22
PHP Internals News: Episode 94: Unwrap Reference After Foreach

PHP Internals News: Episode 94: Unwrap Reference After Foreach Thursday, August 26th 2021, 09:22 BST London, UK In this episode of "PHP Internals News" I chat with Nikita Popov (Twitter, GitHub, Website) about the "First Class Callable Syntax" RFC. The RSS feed for this podcast …

Blogs phpinternals.news Derick Rethans 59mo ago
23
PHP Internals News: Episode 92: First Class Callable Syntax

PHP Internals News: Episode 92: First Class Callable Syntax Thursday, July 22nd 2021, 09:20 BST London, UK In this episode of "PHP Internals News" I chat with Nikita Popov (Twitter, GitHub, Website) about the "First Class Callable Syntax" RFC. The RSS feed for this podcast is ht…

Blogs phpinternals.news Derick Rethans 60mo ago
25
When to declare classes final

TL;DR: Make your classes always final, if they implement an interface, and no other public methods are defined In the last month, I had a few discussions about the usage of the final marker on PHP classes. The pattern is recurrent: I ask for a newly introduced class to be declar…

Blogs ocramius.github.io 139mo ago
26
ProxyManager 1.0.0 release and expected 1.x lifetime

Today I finally released version 1.0.0 of the ProxyManager Noticeable improvements since 0.5.2: Windows path length limitations are now mitigated Proxy classes are now re-generated when the library version changes Documentation has been moved to github pages (Markdown documentat…

Blogs ocramius.github.io 140mo ago
27
Cleaning Code As You Go

by Yitzchak Schaffer (@yitznewton) As one of the first steps in a major new feature we are working on for EasyBib, we needed to introduce some polymorphism into the application. The polymorphic class was already implemented in another product; all that we needed to do was refact…

Blogs dev.imagineeasy.com yitznewton-blog 148mo ago
28
A diagram of the Ruby Core object model

I am a visual learner. A picture is worth a thousand words. When I started learning Ruby, I could not find a decent diagram that would just sum up the Ruby classes, modules, and their hierarchy. So I made mine. By hand. On an A4 sheet. Here is the result (click for a full size v…

Blogs jeromedalbert.com Jerome Dalbert 155mo ago
29
Python Data Classes make it easy to fetch database rows as objects

Python-oracledb rowfactories are a powerful way for Oracle Database queries to alter the representation of fetched rows, reducing the amount of application boilerplate code and data copying. This blog shows how easy it is to use a Python Data Class with a rowfactory to transform…

Blogs medium.com Christopher Jones 9mo ago
31
PHP Attributes in Laravel 13: The Ultimate Guide (36 New Attributes!)

New Laravel 13 went all-in on PHP attributes. Properties like `$fillable`, `$guarded`, and `$hidden` that you've been defining on models for years can now be declared as class-level attributes: `#[Fillable]`, `#[Guarded]`, and `#[Hidden]`. The same applies to job configuration, …

Blogs laraveldaily.com Povilas Korop 3mo ago
32
Inner Classes in PHP Concept

I&rsquo;d like to present my concept of inner classes for PHP based on other languages and PHP limitations. What are those inner classes? Nested Inner Class UML In object-oriented programming (OOP), an inner class or nested class is a class declared entirely within the body of a…

Blogs brzuchal.com MichaΕ‚ Brzuchalski 116mo ago
34
A Stimulus Controller for the Bulma Navbar Component

Recently I migrated this blog away from Tailwind to [Bulma](https://bulma.io) CSS framework, which uses a more semantical approach to CSS classes. Since this blog is a modern Symfony project, it uses Symfony Encore for providing frontend resources, and Symfony UX with the Hotwir…

Blogs beberlei.de Benjamin 27mo ago
35
A simple, responsive feature per plan table using CSS Grids

For a long time I was extremely unhappy with the unresponsiveness of the features list in Tideways. The landingpage is using Bootstrap 3 since the beginning and its table-responsive class is supposed to help here, but requires visitors to scroll and loose context. See a screensh…

Blogs beberlei.de Benjamin 83mo ago
36
P++ is a bad idea for non-technical reasons

Last week the idea of changing PHP to include two languages &quot;PHP&quot; (Classic) and &quot;P++&quot; was proposed on the internals mailing list by Zeev and in more detail by a FAQ answering questions. For context, Zeev is one of the original authors of the Zend Engine in PH…

Blogs beberlei.de Benjamin 83mo ago
37
API Platform 3.3

API Platform 3.3 is out and adds nice improvements once again! Many new options added to the Metadata classes, an increased focus on RDF at the heart of API design and a target to make API Platform more Laravel friendly. Many thanks to every contributor that made API Platform mo…

Blogs soyuka.me 26mo ago
38
Myth #29: People are rational

People don&rsquo;t make purely rational decisions based on careful analysis of cost and expected utility, despite what classical economics taught us. Research findings confirm that our decisions are driven more by our emotions than logical and conscious thinking. However, our ir…

Blogs uxmyths.com 188mo ago
39
Why Final Classes make Rector and PHPStan more powerful

Final classes bring much more value than `extends` it lacks. It teaches composition over inheritance, makes upgrades easier, and [even mocking](/blog/2019/03/28/how-to-mock-final-classes-in-phpunit) is fine. If you're lazy like me, you can [automate the `final` keyword addition]…

Blogs tomasvotruba.com Tomas Votruba 18mo ago
40
How to add visibility to 338 Class Constants in 25 seconds

In PHP, we have classes with methods inside them. Would making all your methods `public` be a good idea? No, because some of them should be used only by the class they're in and not anywhere else. What about class constants?

Blogs tomasvotruba.com Tomas Votruba 25mo ago
41
Finalize Classes - Automated and Safe

Final classes have [many](https://ocramius.github.io/blog/when-to-declare-classes-final/) [great](https://tomasvotruba.com/blog/2019/01/24/how-to-kill-parents) [benefits](https://matthiasnoback.nl/2018/09/final-classes-by-default-why/) for future human readers of your code. They…

Blogs tomasvotruba.com Tomas Votruba 28mo ago
42
CSS character escape sequences

When writing CSS for markup with weird class or id attribute values, you need to consider some rules. For example, you can’t just use ## { color: #f00; } to target the element with id="#". Instead, you’ll have to escape the weird characters (in this case, the second #). Doing so…

Blogs mathiasbynens.be Mathias 175mo ago
44
My thoughts after migrating content-centric websites from Next.js to Astro

Context Around four years ago, I started to use Next.js in some projects, including this blog. These projects were not applications, but simple landing pages and documentation sites, where content written in markdown was a first class citizen. I remember that I was looking for a…

Blogs alejandrocelaya.blog 32mo ago
45
Dispatch REST-like requests with a single controller class in Zend Expressive

I was digging into Zend Expressive and how to use controllers that allow me to share dependencies between different routes, instead of having to use different middlewares every time. Abdul wrote a great article on this subject that you can find here, which also became part of Ex…

Blogs alejandrocelaya.blog 122mo ago
46
Using StackPHP middleware in Laravel 5

TLDR; Want StackPHP middleware in Laravel 5.0? Try barryvdh/laravel-stack-middleware Middleware and Laravel 4 In version 4.1, Laravel introduced compatibility with StackPHP middleware. As Laravel uses the Symfony HttpFoundation and the Application class implements the HttpKernel…

Blogs barryvdh.nl 138mo ago
47
Default constructors

Consider the following code: class Animal { protected $what = &quot;nothing&quot;; function sound() { echo get_class($this).&quot; says {$this-&gt;what}&quot;; } } class Cow extends Animal { protected $what = &quot;moo&quot;; protected $owner; public function __construct($owner)…

Blogs php100.wordpress.com Stas 141mo ago
48
Modular Application Architecture - Inheritance

This is the fourth post from a series of posts that will describe strategies to build modular and extensible applications. In this post we will start looking how to use "inheritance" to create a plugin based application. Inheritance is a characteristic offered by many class/obje…

Blogs goetas.com Asmir Mustafic 104mo ago
49
What Does OO Afford?

I've been thinking about the affordances of programming languages. A Little Background In my previous post, Breaking Up the Behemoth, I posited an explanation for why OO apps so often evolve a few, disproportionally large, unmaintainable, condition-filled classes. Unfortunately,…

Blogs sandimetz.com Sandi Metz 101mo ago
50
The Shape at the Bottom of All Things

I've been teaching a fair amount, which means I've been revisiting my 'class problems' regularly.&nbsp;&nbsp;When I chose the problems, I thought that I understood them completely (hubris, I know) but now that I've worked them repeatedly I'm seeing new and surprising things. The…

Blogs sandimetz.com Sandi Metz 143mo ago
51
Ruby Case Statements and `kind_of?`

You’re an object – Stand up straight and act like one! Imagine you have this code: Code 1: class MyView attr_reader :target def initialize(target) @target = target end def double case target when Numeric then target * 2 when String then target.next # lazy example fail when Array…

Blogs sandimetz.com Sandi Metz 207mo ago
52
[extension] mspirkov/yii2-db

Yii2 DB Extension Installation Components A package of helper classes for working with databases in Yii2. Installation ¶Run php composer.phar require mspirkov/yii2-db or add "mspirkov/yii2-db": "^0.3" to the require section of your composer.json file. Components ¶ AbstractReposi…

Blogs yiiframework.com max-s-lab 8mo ago
53
[wiki] Yii3 - How to start

Don't forget to like and subscribe :-) Intro ¶ Git Docker PSR Standards by Framework Interoperability Group Dependency injection + container 135 packages by Yii invoke() Theory around __invoke(): Hash annotations for class attributes Running the demo application Disclaimer Addin…

Blogs yiiframework.com rackycz 1mo ago
54
Rails serialize JSON with symbolize_names

Haven&#8217;t found a better solution class Something &lt; ActiveRecord::Base class JsonSymbolized def self.load(string) JSON.parse(string, symbolize_names: true) end def self.dump(object) object.to_json end end serialize :field, JsonSymbolized end

Blogs rarestblog.com Slava Vishnyakov 140mo ago
55
grucrawler - simple crawler for Ruby

Released a generic Redis-based crawler for Ruby today. Very alpha. Use at your own risk. Has throttling, concurrency and some limits, but that&#8217;s about it. An example to parse a lot of Italian websites: require 'grucrawler' require 'colorize' class ItalianCrawler def option…

Blogs rarestblog.com Slava Vishnyakov 141mo ago
60
Codeception 2.4 released

Hello everyone! We’d like to announce the immediate availability of Codeception 2.4.0. This follows up the PHPUnit release and mostly contains compatibility fixes for PHPUnit 7. Internal usage of PHPUnit in Codeception was switched to new namespaced class names. This doesn’t bre…

Blogs codeception.com Michael Bodnarchuk 101mo ago
61
Codeception 2.3

Today the Codeception 2.3 sees the world. This is a stable release with almost no breaking changes but with new features you will probably like. At first, we need to say “thank you” to Luis Montealegre for bringing PHPUnit 6.0 support to Codeception. This is done by using class …

Blogs codeception.com Michael Bodnarchuk 110mo ago
62
Working with PHPUnit and Selenium Webdriver

In this post we will explore some basics of user acceptance testing with Selenium. We will do this with classical unit testing framework PHPUnit, web browser Firefox, and with new php-webdriver library recently developed by Facebook. Selenium allows us to record user actions tha…

Blogs codeception.com Michael Bodnarchuk 153mo ago
63
Documenting the system under test in PHPUnit

Documenting the system under test in PHPUnit You are working in a code base you inherited from someone else or have not touched in years. Customers have repeatedly asked for a feature or demanded that you fix a bug. You already know which class or classes you need to change, but…

Blogs localheinz.com Andreas Möller 40mo ago
64
Extending PHPUnit with its new event system

Extending PHPUnit with its new event system You can extend phpunit/phpunit by creating and using abstract test classes and traits - or by using the event system of phpunit/phpunit. As one of the contributors to the new event system of phpunit/phpunit, I will give you an overview…

Blogs localheinz.com Andreas Möller 41mo ago
65
Avoiding imports and aliases in PHP

Avoiding imports and aliases in PHP PHP 5.3, released on June 30, 2009, introduced namespaces as well as imports and aliases. Developers quickly adopted these features. Where previously a class was named Foo_Bar_Baz_Qux, namespaces allow calling it Foo\Bar\Baz\Qux. Imports With …

Blogs localheinz.com Andreas Möller 74mo ago
66
Writing code that feels native to Laravel

Once you become familiar with Laravel, certain patterns start to stand out. Classes get resolved out of the container through facades, you can swap out instances inside of tests, entry points are predictable, configuration lives in familiar places. Laravel does this on purpose, …

Blogs ryangjchandler.co.uk 2mo ago
67
Registering global arguments and options in Laravel Zero

I recently ran into a scenario where I wanted to register a couple of global options inside of a Laravel Zero project. These options need to be available for all commands inside of my project, but I didn't want to extend a custom base Command class. I tried a couple of things an…

Blogs ryangjchandler.co.uk 15mo ago
68
Adding dark mode to my website

After absolutely zero demand, I've added dark mode to my website. The front end is all styled with Tailwind so it didn't take too long, thankfully. Add a couple of dark: classes in various Blade templates and it just works. The one issue I did have was with syntax highlighted co…

Blogs ryangjchandler.co.uk 20mo ago
69
Autocomplete Tailwind classes inside of Blade class directives

Tailwind's Intellisense plugin for Visual Studio Code is great, but as somebody who uses Laravel Blade I am slowed down massively when writing Blade components or dynamic CSS class lists with the @class directive. If you open up your settings.json file inside of Visual Studio Co…

Blogs ryangjchandler.co.uk 33mo ago
70
PHPStan remembered types from constructor

Over the last few days I am working on a new PHPStan capability, which allows PHPStan to use type information from analyzing a class-constructor with the goal to improve results when later on analyzing instance methods or property hook bodies. This feature will be available star…

Blogs staabm.github.io Markus Staab 14mo ago
71
Don't skip `else` with octane

I came across a subtle Octane but last week. We needed to disable Inertia&rsquo;s history encryption in some places in the app. By default, it&rsquo;s enabled everywhere. So we added a route check to the middleware to turn it off. class HandleInertiaRequests { public function ha…

Blogs sebastiandedeyne.com Sebastian De Deyne 10d ago
72
AI Will Squeeze SaaS Margins

In this brave new world, your margin is AI&#8217;s opportunity. When software becomes 10x easier to build, the classic &#8220;build vs. buy&#8221; calculation shifts dramatically. SaaS (Software as a Service) margins won&#8217;t disappear overnight, but it&#8217;s just a matter …

Blogs vancelucas.com vlucas 4mo ago
73
Introduction to Delegated Types

Back in 2024, the 37signals folks released Writebook, another cool product under their ONCE line of products. Writebook ("the easiest way on earth to publish a book online") features one of my favorite patterns: Delegated Types, which is a way to represent class hierarchies in A…

Blogs tighten.com Tony Messias, Tony Messias 4mo ago
74
WordPress Theme Releases for 3/19

Cazuela is a neutral colored theme. Ilisa is a clean and minimal theme that can be easily used as a personal portfolio or a business website. Partition has a light, lively, colorful, yet professional and classic appearance.

Blogs weblogtoolscollection.com James 161mo ago
75
Decapitation

Classy day. So this bug I was about hunt down is around the last couple of days. Almost gave up many times, not because I wanted to, it's just the way project managers try to kill the last happy moment of your life. And then, out of a sudden there are accusations. All sorts of t…

Blogs itarato.blogspot.com Anonymous 159mo ago
76
Drupal 11.1.0 is now available

New in Drupal 11.1 The first feature release of Drupal 11 improves the recipe system, introduces support for hooks written as classes, makes Workspaces more flexible and enhances performance. Recipe system improvements The Recipe system allows packages to be configured with depe…

Blogs drupal.org gábor hojtsy 18mo ago
77
Concept2 - Drupal & Drupal Commerce Decoupled

Completed Drupal site or project URL:&nbsp;https://www.concept2.com/DIGITAL TRANSFORMATION IN ECOMMERCE Concept2 Rising above the competition — Pursuing superior digital commerce in the fitness industry. Digital Transformation for a World-Class Fitness Manufacturer This case stu…

Blogs drupal.org acro-jeff 23mo ago
78
Formatting Exception Messages

Over the last couple years, I’ve started putting my Exception messages inside static methods on custom exception classes. This is hardly a new trick, Doctrine’s been doing it for the better part of a decade. Still, many folks are surprised by it, so this article explains the how…

Blogs rosstuck.com Ross Tuck 130mo ago
79
Mermaid View: first-class Mermaid support for Obsidian

I've been using **[Obsidian](https://obsidian.md/)** for a couple of years now, and it has become my go-to companion for notes, data tracking, and knowledge management. Before landing on Obsidian, I went through quite the journey of note-taking tools: **Evernote**, then **Notion…

Blogs simonecarletti.com 4mo ago
81
Benchmarking PHP 8.2

The PHP team has released PHP 8.2.0 on 8 Dec 2022. This version contains many new features like readonly classes, Disjunctive Normal Form (DNF) types, new "Random" extension, constants in traits, etc. I was curios to benchmark the execution time of this release compared with the…

Blogs zimuel.it Enrico Zimuel 43mo ago
82
StaticShowdown 2014

My Very First Hackathon Rob, a classmate and good friend of mine, invited me to work with him and a few coworkers on their StaticShowdown team. He sent me the link, and I almost immediately replied yes. I'd never done a hackathon before, and this one looked especially fun, takin…

Blogs jpbetley.com Phil Betley 139mo ago
84
Introducting the Tappable trait to use 'tap' with any class

As you might know, the Laravel framework comes with a handy tap method which allows you to call the given closure with the given value and then return the value. Sounds confusing? It probably is until you've seen it! Let's take a look at this example: Lately we've used a Tappabl…

Blogs pascalbaljet.dev 86mo ago
85
Convert accented characters with a Laravel helper function

Besides the famous Collection class that Laravel provides it also has a Str class that has lots of great functions to work with strings. Some of these functions are available through helper functions and others you have to find in the API documentation. Last week we were working…

Blogs pascalbaljet.dev 111mo ago
86
Working with the Validator instance in Form Requests

One undocumented gem I found today in the Laravel Framework is the withValidator method on a FormRequest class. If this method exists on your request class, this method gets called with the Validator instance as first argument. It allows you to interact with the validator instan…

Blogs pascalbaljet.dev 115mo ago
87
Getting the class name from an object instance

I was recently assigned to work on a node.js project — a first, for me. I discovered that it comes with a neat CLI debugger built in, which is very handy when diving into an unknown codebase. However, when inspecting a variable, it doesn’t show me its type; only its...

Blogs scribu.net 157mo ago
88
Pictures of You

When I was pretty young, maybe 13, I was interested in The Cure because my brother was interested in them. I think he had a big poster from one of the 80s classics &#x2013; maybe for Boys Don&apos;t Cry? 1080p fast encode made from 4k original Screenshots from HQ 4k Version. Dow…

Blogs funkatron.com Funkatron 18mo ago
89
PHP Design Patterns Game : The Adapter Pattern

Welcome to our series of articles on PHP Design Patterns Games! In this article, we&#8217;ll be exploring the Adapter Pattern. This structural pattern allows incompatible interfaces to work together by wrapping the interface of an existing class with a new interface. The Adapter…

Blogs phpmagazine.net Hatem Ben Yacoub 39mo ago
90
Get More Content Into Your Ember Apps

Working is extremely nice once you have a grasp on the basic concepts. But, one of the coolest promises (some pun intended) is the ability to use the render view helper. At its core, the render object lets you render a template with a view class wrapping it. However, the real po…

Blogs ryantablada.com 148mo ago
92
How to set up Prettier On a Laravel App, Linting Tailwind Class Order and More

It may seem silly, but it's important to me that my Tailwind classes are orderedly consistently, and I don't want to have to manage that manually. Frustratingly, I've never found a solution that gives me exactly what I want&mdash;until now. Here's my must-have list: Works in CLI…

Blogs mattstauffer.com Matt Stauffer 28mo ago
93
Real-time (automatic) Facades in Laravel 5.4

Laravel 5.4 introduced a new feature called “real-time facades”, which provide the convenience of facades, defined real-time instead of in classes. Taylor tweeted about it, but I wanted to explain what they are and how they work. A quick introduction to facades in Laravel Alread…

Blogs mattstauffer.com Matt Stauffer 107mo ago
94
Eloquent Query Classes Pattern

Learn how to use Eloquent Query Classes to organize important database logic in Laravel without adding a full repository layer. Read more

Blogs freek.dev Freek Van der Herten 10d ago
95
Feature Flags in Laravel with Pennant

How we use class-based Laravel Pennant features, with a kill switch on every flag and a config-driven path to general availability. Read more

Blogs freek.dev Freek Van der Herten 14d ago
96
Evals in Laravel: How to Prove Your AI Output Is Actually Good

Your Agent::fake() tests prove your Laravel AI feature runs — not that its output is any good. This evals a real ticket classifier with the AI SDK: a golden dataset for the fields you can check, an LLM-as-judge for the free text you can't, and a regression gate that catches a ba…

Blogs freek.dev Freek Van der Herten 24d ago
98
Interface HowTo

Interface HowTo A great intro to refresh the basics In short: an interface defines what functionality you need in a class you depend on (while not caring about the implementation). It helps in designing the code and allows deferring implementation details, so they don’t get in t…

Blogs softonsofa.com 74mo ago
99
New Features in the Couchbase Java Client 1.1-dp4

Introduction The latest Java Developer Preview (dp4) is hot off the press, and therefore I thought it would be a good idea to show you how to use some of the brand-new features that are now available. This post will show you how to use the new ComplexKey class for view queries a…

Blogs nitschinger.at 166mo ago
100
ElasticSearch and SQL Server are sitting in a tree...

Motivation With modern NoSQL datastores on the rise, classical relational databases with their rigid data model get challenged every day. Nonetheless, they still own the market and therefore every developer needs to have solid skills in working with them in a reliable and perfor…

Blogs nitschinger.at 168mo ago