Google says you can now turn these 400 Macs, PCs into reliable Chromebooks

https://cdn.arstechnica.net/wp-content/uploads/2022/02/UPDATED-UI-SCREENS-01.png

Google Chrome OS Flex.

Enlarge / Google Chrome OS Flex.

Google today announced in a blog post that ChromeOS Flex, a version of its Chromebook operating system suitable for most hardware, has moved from early access to general availability. It also said it certified “over 400” devices, including systems from Apple, Dell, and HP, to run the OS smoothly and stably.

Google announced ChromeOS Flex in February, building upon its 2020 acquisition of CloudReady (CloudReady becomes ChromeOS Flex now that the latter is stable). Cloud OS Flex is downloadable to a USB drive for free, allowing you to install it on a Mac or Windows PC.

The most obvious use for ChromeOS Flex is to bring new life to a dated machine that may be too old to get software updates for its native OS. Our ChromeOS Flex beta review found the OS to be an interesting alternative for people content with doing most of their computing in a browser and for getting a budget-level Chromebook experience from an 8-to 9-year-old system.

In his blog post today, Thomas Riedl, director of Product, Enterprise and Education at Google, also highlighted enterprise potential for ChromeOS Flex, detailing 200 Nordic Choice hotels that reportedly used ChromeOS Flex to restore 2,000 computers in about two days after a ransomware attack.

In his blog, Riedl claimed that Google used ChromeOS Flex’s early access period to resolve “over 600 issues” and that the company will continue to certify more devices to run the OS. He said the hundreds devices already certified—including the Apple Mac Mini 7,1; Apple MacBook 7,1; Apple MacBook Air 5,1; and 1st Gen Lenovo ThinkPad X1 Carbon—will provide a “consistent and high-quality experience” while running ChromeOS Flex.

You can still install ChromeOS Flex on a device Google hasn’t certified, assuming it meets the minimum requirements (Arm chips, for example, aren’t supported), but, according to Google, the machine has to be certified for the following functions to be Google-guaranteed:

  • System UI and graphics
  • Installation
  • Wi-Fi
  • Ethernet
  • Internal display (if applicable)
  • At least one method each of audio input and output
  • Sleep and resume
  • Touchpad
  • Keyboard
  • USB
  • Non-infrared (IR) webcam (if applicable)

Even with ChromeOS Flex certification, however, there are some functions that Google says it tested but are “not necessarily guaranteed to work on every certified model.” They are:

  • Bluetooth
  • Touchscreen
  • Automatic screen rotation
  • Keyboard shortcuts and function keys
  • SD card slots

And there are numerous features and ports that Google says aren’t tested or supported on ChromeOS Flex at all, including fingerprint readers, optical drivers, IR webcams, proprietary connectors, stylus input, and Thunderbolt functionality.

In general, a non-Chromebook running ChromeOS Flex may not have lesser performance, including boot speed, battery life, and power savings, as a machine running ChromeOS, according to Google.

ChromeOS Flex’s certified devices list shows a broad range, but for those used to a different operating system, the transition won’t necessarily be seamless. Still, it remains a viable option for those who would rather have a low-power, makeshift Chromebook than more e-waste.

Ars Technica

Americans Have Every Right to Own So Called ‘Assault Weapons’

https://www.ammoland.com/wp-content/uploads/2022/05/AR15-pile-of-Guns-Rifles-SMG-iStock-FabrikaCr-949369336-500×334.jpg

Opinion

AR15 pile of Guns Rifles SMG iStock FabrikaCr 949369336
The Court would have ruled that “assault weapons” do fall within Second Amendment protection, and that would have saved the American people a lot of aggravation. iStock FabrikaCr

New York – -(AmmoLand.com)-

“I reiterate: All that we decide in this case is that the Second Amendment protects the right of law-abiding people to carry a gun outside the home for self-defense and that the Sullivan Law, which makes that virtually impossible for most New Yorkers, is unconstitutional.” ~ Closing paragraph of Part One of Justice Alito’s Concurring Opinion in Bruen

There are two key components of Bruen.

  1. One involves the test that Federal and State Courts must employ when they are called upon to review Governmental actions that impact the Second Amendment of the Bill of Rights.
  2. The second involves the matter of “proper cause”/ “may issue”, aka “justifiable need”, which is at the heart of the gun licensing regime of New York, and that was the central topic of concern at oral argument in Bruen. And Bruen impacts other jurisdictions around the country that have similar handgun licensing structures.

As we all know, the High Court in Bruen struck down the foundation of New York’s concealed handgun carry license regime—the salient constituent of which is the unrestricted concealed handgun carry license component.

Few people in New York “are privileged” to hold such valued and rare licenses, as those that have them can rely on handguns for self-defense in the public sphere, i.e., outside the home—a right denied to almost all New York residents.

First things first. We deal with the test that reviewing Courts must use when reviewing Governmental actions impacting 2A.

The U.S. Supreme Court did articulate in Heller the test to be utilized by the Federal and State Courts when reviewing Governmental actions impacting the Second Amendment, but all too many Courts demonstrated a barely disguised antipathy toward it or otherwise exhibited a tired apathy apropos of it. In either case, such jurisdictions resorted to their own case precedent.

The appropriate test to be employed—the Heller test—involves a two-step process.

The first step is easy or should be easy if a reviewing Court doesn’t make what is a simple matter difficult.

A reviewing Court first ascertains whether the Governmental action conflicts with the plain meaning of the Second Amendment. This means that the Court looks to see if the Governmental action affects the Second Amendment. If the Governmental action impacts on the individual right to keep and bear arms, then the first part of the test is met. The Government action is presumed unconstitutional, and the burden to prove that the action is constitutional rests on the Government, not on the individual asserting the right to be exercised—the right of the people to keep and bear arms.

Thus, in the second part of the test, the Government must prove that the action is consistent with the historical tradition of firearm regulation.

If the Government fails to establish historical precedent, then the regulation must be struck down.

Justice Thomas, writing for the majority, said this:

“We reiterate that the standard for applying the Second Amendment is as follows: When the Second Amendment’s plain text covers an individual’s conduct, the Constitution presumptively protects that conduct. The government must then justify its regulation by demonstrating that it is consistent with the Nation’s historical tradition of firearm regulation. Only then may a court conclude that the individual’s conduct falls outside the Second Amendment’s ‘unqualified command.’”

Pay close attention to the phrase “we reiterate” as utilized by Justice Thomas in the main Majority Opinion and as also utilized by Justice Alito in his Concurring Opinion.

In colloquial parlance, the word ‘reiterate’ means ‘to say something again or several times, typically for emphasis or clarity, and often alluding to a feeling of weariness for having to do so.’ Such is the reason for the term’s appearance in Bruen, and such is the profound frustration apparent in the Majority Opinion.

By using the word ‘reiterate,’ in Bruen, the High Court expressed its disdain for the lower Courts for continually failing to heed Heller. This may be due to antipathy, even spite, toward the Heller decision. Or it may be due to ignorance, apathy or sloppiness, philosophical leanings, or stubborn adherence to lower Court precedence. That it happens at all is a dreadful thing—thus the need for Bruen—and, still, we see the Federal Government and State Governments and State and Federal Courts contending with Heller and with McDonald and intending now to contend with Bruen, as well.

How many cases must the U.S. Supreme Court hear before Government gets the message: that the right codified in the Second Amendment of the Bill of Rights of the U.S. Constitution is a natural law right: fundamental, unalienable, immutable, illimitable, eternal, and absolute?

Heller laid out the test, and the Majority Opinion stated that fact explicitly.

—The point being that the High Court wasn’t positing a new standard of review of Second Amendment cases in Bruen, but it was merely confirming the test as promulgated in Heller that all too many lower Courts had heretofore failed to apply. And in that failure, the lower Courts were jeopardizing the sanctity of the fundamental right of the people to keep and bear arms, as an individual right unconnected with one’s service in a militia.

Justice Thomas, writing for the Court Majority, was telling those lower Federal and State Courts that had heretofore applied a ‘means-test analysis’ in Second Amendment cases—a test also referred to as an ‘interest-balancing approach’ or ‘interest-balancing inquiry,’ or, in Court vernacular, an ‘intermediate scrutiny test’ in testing the Constitutionality of a Governmental action—that those Courts had gotten it all wrong!

Those lower Courts were giving their imprimatur to Governmental actions that all was well and good when nothing was well and good with those actions as they infringed the clear intent of the Second Amendment. The Courts should have struck those actions down. They didn’t. And in affirming the constitutional correctness of unconstitutional acts, those Courts compounded their sin against the people and against the Divine Creator. For the Divine Creator had bestowed on man and in man the right of self-defense.

And the general sacred right of self-defense subsumes armed self-defense, which is but a species of the Divine Right of personal survival of body, mind, and spirit against those people or Governments that would dare to destroy or subjugate body, mind, or spirit to another’s will or to the will of the State over the Self.

There are several examples of this failure to heed Heller, but the starkest example is Friedman vs. Highland Park, 784 F. 3d, 406 (7th Cir. 2015), cert denied, 577 U.S. 1039 (2015).

The Friedman case is particularly noteworthy, especially today, because the Court had the opportunity to deal head-on with the issue of whether so-called “assault weapons” fall within the core of Second Amendment protection. Had the Court taken that case up, it would have ruled that “assault weapons” do fall within Second Amendment protection, and that would have saved the American people a lot of aggravation and heartache that is at present heaped on them by a treacherous and obstructionist Biden Administration, a treacherous, obstinate Democrat Party-controlled Congress, an obstreperous, perfidious legacy Press, and a painfully passive, acquiescent, obsequious, worthless Republican Party.

Of course, the expression ‘assault weapon’ is fiction. That’s all it ever was. It isn’t a military term of art, and never was a military term of art, and it isn’t and wasn’t ever used in the arms industry as such either.

Propagandists devised the term for politicians and a seditious Press for its effect on gullible members of the American public who allow the Government and the Press to do their thinking for them—seducing them through emotive words and images to sacrifice their God-Given Rights for nothing but an illusion of or false hope of security if they would but place their faith in the State to protect them, but from what is never made clear.

What is clear is that the State wishes to protect itself from the armed citizenry, as it is the end goal of the State to oppress the citizenry, not provide for the citizenry’s succor, much less its salvation. For salvation can only come from the Divine Creator anyway, not from the State—a false god, a fake, cardboard god.

Propagandists originally meant to ascribe the expression ‘assault weapon,’ to some but not all semiautomatic handguns, rifles, and shotguns. But, of late, especially with the latest Texas public school shooting incident—with the Biden Administration riding a wave of public anxiety and anger over public school shootings—the Administration has chosen to exasperate public anxiety rather than allay it, seeking to ban all semiautomatic weapons or placing them under the purview of the NFA and that means under the heavy hand of the ATF. And this is as we at AQ had predicted long ago and have mentioned several times since.

But this would all be a non-issue if the U.S. Supreme Court had a chance to rule on “assault weapons” in the years following the Heller decision. The Court certainly had the chance to do so in the Friedman case. And, God knows, Justice Thomas, for one, wanted to deal with this matter but obviously could not get support from the liberal wing of the Court, or from the Chief Justice, John Roberts, and from Justice Kennedy, both of whom had no stomach for establishing clearly and categorically the salient reason for the Second Amendment: which is that Government was created to serve the American people, not the other way around.

An armed citizenry signals to the Government that the people are Sovereign over the Government and over their Nation and that firearms provide the means by which Government must bow to the will and sovereignty of the people, whether Government reluctantly agrees to do so or not.

It is curious that the supporters of tyranny constantly complain about the firepower of modern semiautomatic weaponry, emphasizing in a hysterical way that such weapons are designed for the military—the standing army of the Federal Government.

To be sure, that weaponry of the American citizen is supposed to be military weaponry, designed for just such a cataclysm: to prevent an unrestrained Government and its standing army, its militarized police, and its vast intelligence apparatus that seeks to bend the citizenry to its will.

The right of the people, the people’s duty, and the people’s ability to resist Government oppression and subjugation are only feasible where the citizenry is armed and armed to the hilt and armed with military weapons.

In fact, it is not just the semiautomatic weapons that Americans have a fundamental right to possess then; it is the selective fire weapons and fully automatic personnel weapons that Americans have a God-Given right to wield. Of course, a tyrannical Government would attempt to prevent the citizenry from having access to just that sort of weaponry by which the people might succeed in resisting tyranny.

The NFA should be repealed; no question about that. Instead, the Harris-Biden Administration wants to extend its purview over semiautomatic weaponry and, of course, eventually over all weapons.

A dire confrontation between the citizenry and the Government is inevitable if the Executive and Legislative Branches do not soon come to their senses and acknowledge that those that serve in those Branches of Government owe their allegiance to the U.S. Constitution as written, and to the American people they have a duty to serve. It is not the American people that must bow down or defer to these Government servants, much less deify them.

It is they, the smug, sanctimonious, self-righteous servants of Government that need to be put in their place, and that place may well be the chopping block.


About The Arbalest Quarrel:

Arbalest Group created `The Arbalest Quarrel’ website for a special purpose. That purpose is to educate the American public about recent Federal and State firearms control legislation. No other website, to our knowledge, provides as deep an analysis or as thorough an analysis. Arbalest Group offers this information free.

For more information, visit: www.arbalestquarrel.com.

Arbalest Quarrel

AmmoLand Shooting Sports News

MySQL Router Restful API

https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3eCJjHzp1gfc2w1EMwqeveFtGwQajSbe6D4J_obUylvN_tCJLukRsC-M_YMepxvQCT8-Bdl3c5P0g3FcNyNivCY9_S67M5yyh4wi54MmQgLfsjTVWI28ULb2q_nH9HJAnjW9AiYvEkYXiKnxaj9ZgHWhC1FaChjni-LiN7EGJPBz4ahOTwk9InUMH/s320/routerSwagger.png

MySQL Router with InnoDB Cluster allows transparent routing access for application to backend MySQL Servers.  

Restful API (Http access) feature was added to MySQL Router since 8.0.17.

This article is written to provide a tutorial with Router Restful API.   It is tested with MySQL 8.0.29 release.

Setup& Assumptions

1. MySQL InnoDB Cluster 8.0.29 – Cluster Name as ‘mycluster’

2. Linux OS with MySQL Shell 8.0.29 installed

3. Restful API User : ‘myapiuser’

Router Configuration

Bootstrap is the process to create the Router configuration setup.   

e.g.

$> mysqlrouter –bootstrap admin:adminPassword@node1:node1Port –directory /tmp/myrouter –account routerfriend –account-create always

The /tmp/myrouter directory is created with the configuration, keys and scripts.   

The mysqlrouter.conf is defined with the following settings.  The rest API settings with 8443 is enabled by default.

[http_server]

port=8443

ssl=1

ssl_cert=/tmp/myrouter/data/router-cert.pem

ssl_key=/tmp/myrouter/data/router-key.pem


[http_auth_realm:default_auth_realm]

backend=default_auth_backend

method=basic

name=default_realm

[rest_router]

require_realm=default_auth_realm

[rest_api]

[http_auth_backend:default_auth_backend]

backend=metadata_cache

[rest_routing]

require_realm=default_auth_realm

[rest_metadata_cache]

require_realm=default_auth_realm


Router Account Setup

The authentication is configured as ‘backend=metadata_cache’ under the mysqlrouter.conf

[http_auth_backend:default_auth_backend]

backend=metadata_cache


The table mysql_innodb_cluster_metadata.v2_router_rest_accounts defines the user(s) which is allowed to access the Restful API.
The following steps provides the details about the user creation
1. Login to MySQL Server node (Primary node) with root or administrator with User Creation privileges and  Create User Account (for example : myapiuser) – It is a dummy account and it will be removed in step 3.
mysql> CREATE USER myapiuser IDENTIFIED BY  ‘myapiuser’;
2. Create the User Account Entry –  The password is the authentication string from mysql.user.  The following SQL is to create the user entry in router metadata table "v2_router_rest_accounts’.   User name = ‘myapiuser’ and Cluster Name = ‘mycluster’.  You can change according to your setup.
mysql> INSERT INTO  mysql_innodb_cluster_metadata.v2_router_rest_accounts 
( cluster_id, user, authentication_method, authentication_string, description, privileges, attributes) 
SELECT cluster_id, user, ‘modular_crypt_format’, authentication_string, ‘api user’,  null, null 
FROM  mysql_innodb_cluster_metadata.clusters, mysql.user 
WHERE user=’myapiuser’ and cluster_name = ‘mycluster’;

3. The user ‘myapiuser’ can be dropped.

mysql> DROP USER myapiuser;

Accessing Restful API via Browser (Chrome Browser as an example)

The Restful API http port is opened as 8443.   The swagger.json can be accessed via URL : https://<MySQL Router IP>:8443/api/20190715/swagger.json

/api/20190715/ – It is the API Base Path.

It also shows the list of "Paths" where you can access thru the API base path.

To get access to the details, user/password is required to get access to.

For example, to check with Router Status – https://Router IP:8443/api/20190715/router/status

Putting in user/password as created previously in Router Account Setup can access to the status as shown :

 

You can try other Restful API and getting connection, metadata and routes details.

Enjoy!

References:

https://dev.mysql.com/doc/mysql-router/8.0/en/mysql-router-rest-api-setup.html

https://dev.mysql.com/doc/mysql-router/8.0/en/mysql-router-innodb-cluster.html

https://dev.mysql.com/doc/relnotes/mysql-router/en/news-8-0-17.html

https://dev.mysql.com/doc/mysql-router/8.0/en/mysql-router-deploying-bootstrapping.html

Planet MySQL

Hasbro Will Now Let Anyone Turn Themselves Into an Action Figure

http://img.youtube.com/vi/b0eHpUR6F5I/0.jpg

Unless you’ve got access to loads of gamma radiation or some mystical stones, your chances of becoming a real life superhero are very slim. The easier way to achieve your heroic aspirations is through Hasbro’s new Selfie Series: collector-grade six-inch figures featuring a custom 3D-printed version of your own face digitally scanned using your smartphone.

Creating action figures based on real people isn’t an entirely new idea; a few years ago Hasbro and Formlabs actually ran a contest where five super fans were given the chance to create an action figure based on their own likenesses. At the time, limitations in 3D printing and digital scanning meant that Hasbro couldn’t offer every fan the chance to turn themselves into a figure, but the technology has improved enough since then that the Hasbro Selfie Series will now be open to anyone who wants to pony up $60 for a six-inch figure that looks exactly like the person staring back at them in the mirror every morning—but with a better costume.

Hasbro Selfie Series: Make Anyone a Hero With 3D Printing

Face scanning is done through the Hasbro Pulse mobile app available for iOS and Android, and fans will be able to base their action figure on “classic to current characters seen across popular films, television series and comics.” Initially, that will include costumes based on G.I. Joe, Ghostbusters, Power Rangers, Marvel, and designs inspired by Star Wars characters. You probably won’t be able to slap your face on Princess Leia’s body, or get a green face lift to become Yoda—but a provided press release did mention at the least an X-Wing pilot, so you can probably imagine what other kinds of generic bodies could be used.

The Hasbro Selfie Series is currently limited to collectors in the United States, and figures won’t actually ship out until sometime in the Fall. Hasbro hasn’t provided any details on how long it will actually take for a custom figure to be created and shipped out after a digital face scan is completed and submitted, but the company will be offering “a select number of fans” the chance to be the first to create their own figures at San Diego Comic-Con next week, but like everyone else, they’ll have to wait a few months for delivery.


Want more io9 news? Check out when to expect the latest Marvel and Star Wars releases, what’s next for the DC Universe on film and TV, and everything you need to know about House of the Dragon and Lord of the Rings: The Rings of Power.

Gizmodo

Apple’s New iOS 16 Photo Feature Is Straight-Up Magic

https://i.kinja-img.com/gawker-media/image/upload/c_fill,f_auto,fl_progressive,g_center,h_675,pg_1,q_80,w_1200/9ef6f576068ddcde9572afa57edf0286.png

There are a few features across Apple devices that remind me why I’m tied into their ecosystem. Universal Control lets my move between my Mac and iPad with using the same keyboard and mouse; AirDrop makes file sharing stupidly simple; Handoff allows you to copy and paste between devices with ease. And a new photo feature in iOS 16 is now part of that list, because it is way too cool.

The idea is simple: In iOS 16 you can quickly and accurately “lift” the subject out of any given photo by just dragging it away from the background. There’s no need to trace or cut out the subject ahead of time, or to use a special app or software. In fact, the feature works in multiple apps that display pictures, including Photos, Screenshot, Quick Look, Safari, and more.

In order to use the feature, though, you’ll need an iPhone with the A12 Bionic chip, which means an iPhone XS, XR or later. While iPhone 8, 8 Plus, and X will all run iOS 16, their A11 Bionic chips aren’t compatible with this photo feature—a reminder that not all iOS 16 features are available on all iPhones.

How to lift subjects out of photos in iOS 16

There are two ways to use the feature. The first, and the coolest, is to simply touch the subject of the photo, then drag it around with your finger. Your iPhone will instantly lift the subject from the photo and tie it to your finger as you move it around the screen. You can then use another finger to exit the photo or app and switch to another app, allowing you to drop in the image wherever you like. For example, you could paste it into a new document in Pages, or add it to a new iMessage to send to a friend.

The second way to use the feature is similar: Hold down on the subject for a half second then lift up. It may take a few tries to get the timing right (it’s faster than a simple tap, but not as long as a hard press), but when done successfully, iOS will highlight the subject, presenting two options above it: “Copy” and “Share.” Tap Copy to copy it to iOS’ clipboard, and you can paste it wherever you see fit. Share opens up the share sheet so you can choose exactly which app or which contact you want to send the subject to.

iOS 16 Hands-On: Top 5 New Features!

In my use, the feature is remarkably good at grabbing the subject or subjects of any given photo. Even in photos with harsh lightning and/or with two or three subjects together in a row, iOS 16 manages to wrangle the group together into one, liftable cutout. Sometimes it takes some trial and error to find the right part of the photo to press in order to trigger the feature, and other times, you might need to zoom in on the subject to give iOS enough to work with, true.

And when the photo presents a clear subject and background, this feature is so easy, it’s basically magic. While there are plenty of awesome quality-of-life improvements in iOS 16, some of them even hidden, this addition is the kind of thing big software updates are all about.

   

Lifehacker

How to Manage Complex Database Environments Effectively

https://www.percona.com/blog/wp-content/uploads/2022/07/Complexity-eBook-300×157.jpgdatabase complexity

database complexityDatabase complexity  is bad for business. 

It degrades customer experience, it threatens security, and it’s a drag on time to market. It’s also a giant tax on the effectiveness of your team who are trying to manage it all with inconsistent tools and no hiring budget. Meanwhile, developers and other stakeholders, who are also under pressure to deliver more quickly, are frustrated by your inability to meet their needs fast enough. They may even be going around you. 

In an attempt to address complexity, a lot of companies are throwing more and more resources at it, like beefier nodes. However, ad hoc approaches tend to cost more than making upfront investments to optimize your architecture. They also put a bandage on a much bigger issue, namely a fragmented environment that’s getting impossible to manage. 

The stakes are high for you, your team, and the business. Are you doing everything you can to get database complexity under control? Ask yourself these questions:

Do you know how database complexity hurts the business?

I mean, do you fully understand the real-world costs that complexity has not just on your team but on the bottom line? For example:

Add to these costs the risk of breaching Service Level Agreements (SLAs), which may involve penalties ranging from fee reductions to  customers terminating their contracts. 

Do you know what the options are to fix it?

There are several options for dealing with database complexity and operating your environment more efficiently, such as using a single kind of database, multiple kinds of databases, or moving to the public cloud. Clearly understanding the pros and cons of each is important for finding the right solution for your environment. 

For example, lots of organizations are moving to the public cloud thinking it will solve their complexity, cost, and staffing problems, but will it? Are there hidden fees? What about lock-in? Not knowing the answers to these questions can make relying on a public cloud provider for support a risky proposition. 

Do you know what to look for in a vendor?

For those considering the use of multiple types of databases, separating the good from the not-so-good vendors matters. That’s because choosing a vendor is not just about the database. It involves evaluating the quality of their entire platform, from support to service to tools. You need to know what to look for so you can be assured that whoever you choose offers a unified solution that supports your database environments on any infrastructure.. 

Take control of database complexity today

There’s a lot to tackle to solve database complexity, and it’s hard to know where to start. Our latest eBook, How to Manage Complex Database Environments Effectively cuts through the confusion, so you can start taking control of your databases today. 

Percona Database Performance Blog

Automatically add comments to all SQL queries made by Laravel

https://freek.dev/og-images/d3293079a26f4c03f9a8f3660c797df6/2279.png

We’ve released a new package called spatie/laravel-sql-commenter. This one can add comments to SQL queries. These comments allow you to easily pinpoint the origin of a query when looking at your query log.

When Laravel executes an Eloquent query, it will transform it to SQL and send it to the database. Here’s what such a simple SQL query looks like.

select * from users

Using our package, you can easily add comments like this one.

select * from "users"/*controller='UsersController',action='index'*/;

We didn’t come up with that particular way of formatting a comment. We’re using sqlcommenter formatting. This formatting is supported by tools and services that allow you to inspect queries.

We are currently building Mailcoach Cloud, a service to easily send bulk mailings, drip campaigns and more via your own AWS SES, Mailgun, Postmark, Sendgrid, … account. The database of Mailcoach Cloud will be administered via PlanetScale .

On PlanetScale, you can get detailed information about the executed queries on the query insights screen.

Here’s a screenshot of a slow query (we intentionally made it slow for this example using sleep). The comments we added to the query end up as nicely formatted tags.

sql comments insight

Using these tags, we can quickly pinpoint the source of the query and even for which client the query was executed.

Various other services, like Google Cloud Platform, will also use the comments in a similar way on their query insights pages.

You only need to install the package with Composer to add comments to all queries performed by Laravel.

composer require spatie/laravel-sql-commenter

All your queries will now have a comment that will tell you from which class, route, and/or job the query originated.

Publishing the config file can give you fine-grained control over what gets added.

php artisan vendor:publish --tag="sql-commenter-config"

Here’s what that published config file looks like.

return [
    /*
     * When set to true, comments will be added to all your queries
     */
    'enabled' => true,

    /*
     * These classes add comments to an executed query.
     */
    'commenters' => [
        Spatie\SqlCommenter\Commenters\ControllerCommenter::class => ['includeNamespace' => false],
        Spatie\SqlCommenter\Commenters\RouteCommenter::class,
        Spatie\SqlCommenter\Commenters\JobCommenter::class => ['includeNamespace' => false],
        Spatie\SqlCommenter\Commenters\FileCommenter::class => ['backtraceLimit' => 20],
        Spatie\SqlCommenter\Commenters\CurrentUserCommenter::class,
        // Spatie\SqlCommenter\Commenters\FrameworkVersionCommenter::class,
        // Spatie\SqlCommenter\Commenters\DbDriverCommenter::class,
    ],

    /*
     * If you need fine-grained control over the logging, you can extend
     * the SqlCommenter class and specify your custom class here
     */
    'commenter_class' => Spatie\SqlCommenter\SqlCommenter::class,
];

The classes in the commenters key are responsible for adding a comment to the query. By default, we’ll add where the query originated and who is the current user.

You can easily add commenters yourself to add a comment about an aspect that is important to you. A commentator is a class that returns zero, one or more comments. Let’s look at the FrameworkVersionCommenter that ships with the package.

namespace Spatie\SqlCommenter\Commenters;

use Illuminate\Database\Connection;
use Spatie\SqlCommenter\Comment;

class FrameworkVersionCommenter implements Commenter
{
    /** @return Comment|Comment[]|null */
    public function comments(string $query, Connection $connection): Comment|array|null
    {
        return Comment::make('framework',  "laravel-" . app()->version());
    }
}

When you create your own commenter, don’t forget the add its class name to the commenters key of the config file.

How it works under the hood

Laravel makes adding comments to queries that are about to be executed pretty easy. We can leverage the beforeExecuting method on the DB connection. In our package, we call that function in our service provider.

// in SqlCommenterServiceProvider

$this->app->get('db.connection')
    ->beforeExecuting(function (
        string &$query,
        array &$bindings,
        Connection $connection,
    ) {
        $sqlCommenter = app(SqlCommenter::class);

        $commenters = $this->instanciateCommenters(config('sql-commenter.commenters'));

        $query = $sqlCommenter->commentQuery($query, $connection, $commenters);
    });

You’ll notice that the query is preceded by &. This means that the query is passed by reference. This allows us to change the comment, the code that calls beforeExecuting will use the changed $query.

The comments are added to $query inside the commmentQuery method of the SqlCommenter class. This class will loop over all configured commenters to determine which comments should be added. If you’re interested in how this all works, head over the code of the SqlCommenter class.

In closing

We hope this package can help you make your query log more useful. spatie/laravel-sql-commenter was made by my colleague Rias and me. To learn more about the package, head to the the readme on GitHub.

To know more about Mailcoach Cloud, the service where we use this package ourselves, point your browser to the Mailcoach Cloud website.

This isn’t the first package that we’ve made. Our company website has a extensive list of packages our team has previously released. If you want to support us, consider picking up one of our paid products or premium courses.

Laravel News Links

8 PHP Frameworks That Make You Money as a Web Developer in 2023

https://s.w.org/images/core/emoji/14.0.0/72×72/1f30e.png

4.9/5 – (7 votes)

This article will show you the most interesting PHP frameworks to build your career on in 2023 and beyond.

Let’s start right away with a tabular overview of the income potential of the addressed PHP frameworks:

PHP Framework Developer Income Low ($/year) Income High ($/year)
General PHP Developer $44,000 $97,000
Laravel Developer $40,000 $150,000
Symfony Developer $68,000 $119,000
Laminas/Zend Developer $80,000 $143,000
CodeIgniter Developer $58,000 $117,000
CakePHP Developer $67,000 $98,000
FlightPHP Developer $70,000 $95,000
Lithium (li3) Web Developer $44,000 $97,000

Okay, ready to dive into the weeds?

General PHP Developer

Before we look at an individual PHP framework, you should know the basics of PHP. This may not yet be very profitable but it is the baseline skill you can use as a fundament of your whole career. So, don’t skip it!

The average annual income of a PHP Developer is $65,590 according to PayScale (source) ranging from $44k (10th percentile) to $97k (90th percentile).

If you decide to go the route as a freelance PHP Developer, you can expect to make between $20 and $35 per hour on Upwork (source). Assuming an annual workload of 2000 hours, you can expect to make between $40,000 and $70,000 per year.

A PHP Developer specializes in designing, testing, debugging, and implementing software code in the PHP programming language — mainly used for server-side applications to serve dynamic web content.

Do you want to become a PHP Developer? Here’s a step-by-step learning path I’d propose to get started with PHP:

🌎 Learn More: Read the full article with income and opportunity of this career path on the Finxter blog.

Laravel Developer

Let’s have a look at the definition from the official Laravel website:

“Laravel is a PHP-based web application framework with expressive, elegant syntax. […] Laravel strives to provide an amazing developer experience while providing powerful features such as thorough dependency injection, an expressive database abstraction layer, queues and scheduled jobs, unit and integration testing, and more.”

Ya, well, this is marketing speak for Laravel handles the back-end part when building websites with PHP.

The average annual income of a Laravel Developer in the United States is between $40,000 (25th percentile) and $150,000 (75th percentile) with an average of $92,000 per year according to Kinsta (source).

🌎 Learn More: Read the full article with income and opportunity of this career path on the Finxter blog.

Symfony Developer

Let’s have a look at the definition from the official Symfony website:

“Symfony is a set of reusable PHP components and a PHP framework for web projects.”

So, it’s a framework supporting your PHP backend development efforts.

The average annual income of a Symfony Developer in the United States is between $68,000 (25th percentile) and $119,000 (75th percentile) with an average of $96,000 per year according to Ziprecruiter (source). Top earners make $129,000 and more in the US!

🌎 Learn More: Read the full article with income and opportunity of this career path on the Finxter blog.

Laminas/Zend Developer

Let’s have a look at the definition from the official Laminas/Zend website:

“Zend Framework is a collection of professional PHP packages with more than 570 million installations. It can be used to develop web applications and services using PHP 5.6+, and provides 100% object-oriented code using a broad spectrum of language features.”

A Zend/Laminas Developer creates, edits, analyzes, debugs, and supervises the development of applications written in the former Zend and current Laminas programming framework based on the PHP programming language.

The average annual income of a Zend framework (Laminas) developer in the US is $90,000 with an expected range between $110,000 and $143,000. Top Zend/Laminas developers make $200,000 and more per year in the US.

Learning resources:

🌎 Learn More: Read the full article with income and opportunity of this career path on the Finxter blog.

CodeIgniter Developer

Let’s have a look at the definition from the official CodeIgniter website and the docs:

“CodeIgniter is a powerful PHP framework with a very small footprint, built for developers who need a simple and elegant toolkit to create full-featured web applications.

In particular, CodeIgniter is an Application Development Framework – a toolkit – for people who build web sites using PHP. Its goal is to enable you to develop projects much faster than you could if you were writing code from scratch, by providing a rich set of libraries for commonly needed tasks, as well as a simple interface and logical structure to access these libraries. CodeIgniter lets you creatively focus on your project by minimizing the amount of code needed for a given task.”

The average annual income of a CodeIgniter Developer in the United States is between $58,000 (25th percentile) and $117,000 (75th percentile) with an average of $90,635 per year according to Ziprecruiter (source). Top earners make $142,000 and more in the US!

🌎 Learn More: Read the full article with income and opportunity of this career path on the Finxter blog.

CakePHP Developer

Let’s have a look at the definition from the official CakePHP website and the docs:

“CakePHP is a free, open-source, rapid development framework for PHP. It’s a foundational structure for programmers to create web applications.

CakePHP takes the monotony out of web development. They provide you with all the tools you need to get started coding what you really need to get done: the logic specific to your application.

Instead of reinventing the wheel every time you sit down to a new project, check out a copy of CakePHP and get started with the real guts of your application.”

The average annual income of a CakePHP Developer in the United States is between $67,000 (25th percentile) and $98,000 (75th percentile) with an average of $84,000 per year according to Ziprecruiter (source). Top earners make $123,000 and more in the US!

🌎 Learn More: Read the full article with income and opportunity of this career path on the Finxter blog.

FlightPHP Developer

Let’s have a look at the definition from the official Flight PHP website:

Flight is a fast, simple, extensible framework for PHP. Flight enables you to quickly and easily build RESTful web applications.

A Flight PHP developer creates web apps in PHP. According to ZipRecruiter, freelance PHP developers make an average of $89,000 per year or $43 per hour. Codementor reports that freelance PHP developers make on average $61-80 per hour. (source)

🌎 Learn More: Read the full article with income and opportunity of this career path on the Finxter blog.

Lithium (li3) Web Developer

Let’s have a look at the definition from the official Lithium website:

li₃ is the first and only major PHP framework built from the ground up for PHP 5.3+, and the first to break ground into major new technologies, including bridging the gap between relational and non-relational databases through a single, unified API.

A Lithium developer is a PHP developer. Thus, our estimation for the average annual income of a Lithium Developer is $65,590 according to PayScale (source) ranging from $44k (10th percentile) to $97k (90th percentile).

🌎 Learn More: Read the full article with income and opportunity of this career path on the Finxter blog.

Summary

The most profitable PHP framework is Laravel — if you have mastered it you can expect to earn up to $143,000. The easiest PHP framework to make a relatively high amount of money with on the low end is Laminas (Zend) due to its unique business value for many companies. Per comparison, a general PHP developer makes between $44,000 and $97,000 per year.

Here’s the overview table again:

PHP Framework Developer Income Low ($/year) Income High ($/year)
General PHP Developer $44,000 $97,000
Laravel Developer $40,000 $150,000
Symfony Developer $68,000 $119,000
Laminas/Zend Developer $80,000 $143,000
CodeIgniter Developer $58,000 $117,000
CakePHP Developer $67,000 $98,000
FlightPHP Developer $70,000 $95,000
Lithium (li3) Web Developer $44,000 $97,000

Finxter