The poll from The Associated Press-NORC Center for Public Affairs Research found that while 67% of Americans plan to get vaccinated or have already done so, 15% are certain they won’t and 17% say probably not. Many expressed doubts about the vaccine’s safety and effectiveness.
The poll suggests that substantial skepticism persists more than a month and a half into a U.S. vaccination drive that has encountered few if any serious side effects. Resistance was found to run higher among younger people, people without college degrees, Black Americans and Republicans.
Of those who said they definitely will not get the vaccine, 65% cited worries about side effects, despite the shots’ safety record over the past months. About the same percentage said they don’t trust COVID-19 vaccines. And 38% said they don’t believe they need a vaccine, with a similar share saying that they don’t know if a COVID-19 vaccine will work and that they don’t trust the government.
Let’s recap the situation.
We’ve been told that the vaccine doesn’t stop you from catching or transmitting the virus.
We’ve been told that after you get the vaccine you still have to (double) mask and socially distance.
We’ve been told that despite mass vaccination, the lockdowns will continue and we’re still unable to return to normal.
We know the vaccine has been rushed to market faster than any other in history and that we cannot sue the pharmaceutical companies if we have bad reactions.
What’s the selling point of getting vaccinated.
I’m curious as to why more people are not skeptical.
I’m not an anti-vaxxer. I’ve had all my shots. So have my kids. I get my flu shot every year.
But those have decades of clinical history.
We don’t know if a year from now one in ten people who got the vaccine will end up with cancer or uncontrollable burning rectal discharge.
That is where the reticence comes from.
Not to mention that the handling of the COVID has been so bad I can’t fault anyone who doesn’t trust the government.
“The governor who killed most of the old people in his city then defied a court order stopping him from hiding that fact, a Congressman who got trapped by a Chinese honeypot, and a President with signs of dementia and a millionaire crackhead son trading on daddy’s name say you have to get a vaccine, that doesn’t allow you to take off your mask and live a normal life. And if the side effects cripple you, you get nothing.”
Make Your Own Electronic Target with freETarget Open Source Targets
https://ift.tt/3tRvrzw
freETargetis an open-source program that allows the average joe to build his very own electronic rifle or pistol target right at home without needing to go to an advanced shooting facility that contains such devices. Almost all modern competitions are making use of Electronic Targets so why not give yourself the same advantages and systems you’d use during a competition? If anything, these Electronic Targets make it easier and faster for shooters to get some solid practice in without constantly walking to check on targets.
freETarget – The Free Open Source Electronic Target
What is freETarget?
Virtually all competitions are now held on electronic targets. They have the advantage of providing instantaneous feedback without the necessity of peering through a scope or scoring with a plug gauge. Unfortunately, they are expensive and outside of the means of most shooters.
So what to do?
Given the success of various open source projects such as Linux or Open Office, it seems to make sense that somebody try to make an open source electronic target.
freETarget – Free E Target
FreETarget is an opensource project where the parts to make the target, electronics, and visualization software is available online and can be assembled by anybody.
Who can use freETarget?
freETarget is open source, so anybody who has the technical expertise to install software on a PC should be able to make their own freETarget.
Advanced amateurs
4H Clubs
Scout troops
Commercially available targets are awesome, but for most of us, who has the money. freeETarget is an international collaboration of people providing the skills needed to make an affordable Electronic Target
Ways you can use freETarget
You can access the GIT HUB (github.com/ten-point-nine/freETarget) for the detailed technical content. You will find the circuit and mechanical drawings, low level driver software, and the source to the PC application. Download and join the team.
You can purchase the assembled and tested circuit boards and build your own housing to start shooting electronically.
Join the team. Expanding skills are needed to move the project to the forefront of competitive shooting.
The system is made up of 3 major elements which include the target sensor and acquisition electronics, the target housing, and the PC visualization software. There is a complete list of where to get these items and how to assemble your own freETarget for use at your local club. This is a great example of everyday shooters using their ingenuity to meet the standards of the more professional shooting world without having to spend the money on official electronic target systems.
From what I have read on their blog, the group is making boards for people to purchase to use in their own builds; however, there is currently a waiting list for these limited production boards. All of the software, circuit assemblies, and mechanical design are being handled worldwide by a team of dedicated shooters who want everyone to have access to these advanced systems. Would you build your own freETarget for yourself or even for your local shooting club?
Products Designed for Shabbat Let You Perform Certain Tasks Without Technically Performing Them
https://ift.tt/3tSUkv5
For strict adherents of Judaism, Saturdays can be tough days. On Shabbat, whish lasts from sundown each Friday to sundown on Saturday, Jewish law (Halacha) prohibits melakha, which loosely translates to "work;" in practice it means one cannot push an elevator button, turn an appliance on or off, or open a bottle of soda, as some examples.
The laws are pretty specific; for instance, you can open a refrigerator, but if the light inside the ‘fridge visibly illuminates, you’ve broken Halacha. As a workaround, some Jews will disconnect the bulb prior to Shabbat; others will cover the bulb in black tape. There are also interpersonal workarounds: You can ask a non-Jewish person to turn an air conditioner on for you, for instance.
Because some of these workarounds are inconvenient, a company called Kosher Innovations sells an entire line of products that are rabbi-approved and allow you to perform certain tasks without technically violating Halacha. Some examples:
"Do you like having a light in your refrigerator all week but need a way to keep the light off during Shabbos or Yom Tov?
"That is what the Kosher Fridg-eez is for. It’s designed to hold down the fridge light switch in order to keep the light turned off. When Shabbos or Yom Tov is over, simply pull the plastic tab to remove it, letting the fridge light shine again."
"Did you forget to open your soda bottles before Shabbos? Not to worry–the Shabbos Bottle Opener can be used to open plastic soda bottles on Shabbos! It allows you to remove the plastic cap including the plastic ring, without tearing it.
"Normally, the action of unscrewing the bottle cap causes the perforated ring to tear. This is fine for during the week but on Shabbos/Yom Tov, falls under the category of the melacha of Makeh B’Patish (Act of Completion). By separating the ring from the cap, it finishes the cap, allowing it to be removed from the bottle.
"The Shabbos Bottle Opener grips the bottle cap and removes both the cap and the perforated plastic ring at the same time, without tearing the ring. Thus it avoids the melacha of Makeh B’Patish. In fact, one can still replace the cap with the perforated ring still attached, back onto the bottle. One would just need to use the Shabbos Bottle Opener a second time to remove it again."
I find this category of product design completely fascinating. You can check out more of these here.
The Falcon and the Winter Soldier Trailer Wins the Super Bowl
https://ift.tt/3oYcrvG
Trailer FrenzyA special place to find the newest trailers for movies and TV shows you’re craving.
I don’t know from sports, but I know my supes, and as far as I’m concerned, the Super Bowl was between the New York City Falcons and the Brooklyn Bucky-neers. They both won and so did we.
In a new spot aired during the Super Bowl, we got a new look at the upcoming Disney+ show starring Anthony Mackie and Sebastian Stan, and co-starring Daniel Brühl, Wyatt Russell, and Emily VanCamp (hopefully this show will do Sharon Carter at least mildly less dirty than the movies—Peggy’s niece deserves better).
The Falcon and the Winter Soldier drops, at last, on Disney+ March 19.
For more, make sure you’re following us on our Instagram @io9dotcom.
AlmaLinux Releases Beta of Their CentOS/RHEL 8 Fork
https://ift.tt/3ruC20S
AlmaLinux describes itself as "an open-source, community-driven project that intends to fill the gap left by the demise of the CentOS stable release." And now AlmaLinux "has announced their beta release of their CentOS/RHEL 8 fork," writes Slashdot reader juniorkindergarten. AlmaLinux will be getting $1 million a year in development funding from CloudLinux (the company behind CloudLinux OS, a CentOS clone with over 200,000 active server instances). Their CEO stresses that AlmaLinux "is built with CloudLinux expertise but will be owned and governed by the community. We intend to deliver this forever-free Linux distribution this quarter." And they’ve committed to supporting it through 2029. Their press release touts AlmaLinux as "a 1:1 binary compatible fork of RHEL 8, with an effortless migration path from CentOS to AlmaLinux. Future RHEL releases will also be forked into a new AlmaLinux release." From the AlmaLinux blog:
We’ve collected community feedback and built our new beta release around what you would expect from an enterprise-level Linux distribution…inspired by the community and built by the engineers and talent behind CloudLinux. Visit https://almalinux.org to download the Beta images. With the Beta release deployed, we’d like to ask the community to be involved and provide feedback. We aim to build a Linux distribution entirely from community contributions and feedback. During AlmaLinux Beta, we ask for assistance in testing, documentation, support and future direction for the operating system. Together, we can build a Linux distribution that fills the gap left by the now unsupported CentOS distribution. On Wednesday they’ll be hosting a live QA webinar with the AlmaLinux team. And there’s also a small AlmaLinux forum on Reddit.
Automation testing is a software technique to compare the actual outcome of software with the expected outcome.
You may need to use test automation software to automate repetitive tasks and other testing tasks that are difficult to perform manually. You can do this by either writing automation test scripts or using an automation testing tool.
Test automation software has started to apply artificial intelligence and machine learning (AI/ML) to offer more advanced capabilities for optimization as well as intelligent test generation, execution, and reporting.
Here are some tools best poised to take advantage of these trends.
Selenium is the industry standard for test automation. It’s a free, open-source, automated testing framework used to validate web applications across different browsers and platforms.
Selenium is not just a single tool but a suite of software, each offering a different approach to align with the testing needs of an organization. It has three major components:
WebDriver: Uses browser automation APIs to control the browser and run tests. This is as if a real user is operating the browser
IDE (Integrated Development Environment): The tool you use to develop your Selenium test cases. It’s an easy-to-use Chrome and Firefox extension and is generally the most efficient way to develop test cases
Grid: Allows you to run test cases in different machines across different platforms
To use Selenium effectively, users have to possess advanced programming skills and need to spend considerable time to build the automation frameworks and libraries necessary for automation.
Appium is free to use and open-source test automation framework that is mainly intended for mobile applications. The type of applications it serves include:
Native apps: Written using the iOS, Android, or Windows SDKs
Mobile web apps: Accessed using a mobile browser (Appium supports Safari on iOS and Chrome or other built-in browsers on Android)
Hybrid apps: Which use a wrapper around a web view—a native control that enables interaction with web content
Appium was designed to meet mobile automation philosophies as outlined by the following tenets:
1. You Shouldn’t Have to Recompile Your App or Modify It in Any Way in Order to Automate It:
Appium achieves this by using vendor-provided automation frameworks under the hood, which include:
iOS 9.3 and later: Apple’s XCUITest
iOS 9.2 and earlier: Apple’s UIAutomation
Android 4.3+: Google’s UiAutomator/UiAutomator2
Windows: Microsoft’s WinAppDriver
2. You Shouldn’t Be Locked In to a Specific Language or Framework to Write and Run Your Tests:
Appium tackles this by wrapping the vendor-provided frameworks in the WebDriver API. It’s a client-server architecture and the client, written in any language, can be used to send the appropriate HTTP requests to the server.
3. A Mobile Automation Framework Shouldn’t Reinvent the Wheel When It Comes to Automation APIs:
Appium has not created a new automation standard for testing mobile applications. Instead, it extends the existing W3C WebDriver by adding extra API methods for mobile automation.
You can learn more about Appium’s core features and how to get started using its official documentation.
Katalon Studio is a powerful and comprehensive automation solution for testing API, web, mobile, and desktop applications. It also has a rich feature set for this testing and supports multiple platforms including Windows, macOS, and Linux.
Katalon Studio offers a wide range of features:
Smart Wait: Resolve problems with the wait feature in Selenium WebDriver
Desktop testing: Supports testing desktop apps in Windows 10
Test artifacts sharing: Share test cases, test objects, and keywords among team members
Comprehensive data-driven testing: Custom data sources and enhanced capabilities to develop test cases with data-driven practices
WebDriver Event Listener: Use this enhanced listener to handle events triggered by WebDriver
You can get a detailed understanding of all these features in Katalon Studio’s official documentation.
Katalon Studio offers a free edition and two paid editions, which you can select based on your project size and needs.
TestComplete is an automated testing environment for a wide range of application types and technologies, including (but not limited to) Windows, .NET, WPF, Visual C++, Visual Basic, Delphi, C++Builder, Java, and web applications and services.
TestComplete has four major components:
TestComplete Platform: It powers TestCompleteDesktop, mobile automated testing tools, and web which will help you build solid automated tests across multiple devices, platforms, and environments smoothly and instantly
TestCompleteDesktop Module: TestComplete Desktop, powered by TestComplete Platform, allows you to run unit testing languages such as TestNG, PyUnit, Ruby, PHPUnit, Junit, and NUnit
TestCompleteWeb Module: The TestCompleteWeb Module helps you create functional tests for websites and automated Graphical User Interface (GUI), web apps, and mobile applications
TestCompleteMobile Module: It allows you to create robust automated tests for web, native, web, or hybrid mobile Android applications
TestComplete comes with out-of-the-box integrations for CI/CD tools like Jenkins and Jira, popular open-source frameworks, and tools like Selenium and SoapUI.
It gives you the ability to run tests in parallel across 1500+ remote test environments, including browsers, operating systems, and devices.
TestComplete offers a 30-day free trial in addition to its paid plans.
LambdaTest enables you to perform end-to-end automation tests on a secure, reliable, and scalable Selenium infrastructure.
The key features of the LambdaTest include:
Automated cross-browser testing with Selenium scripts on 2000+ browsers and operating systems environments
Integration with various CI/CD tools like Circle CI, Jenkins, and Travis CI
LambdaTest uses IP2Location to determine your geolocation, based on which you are routed to the nearest data center. This way you get the best possible performance every time
Automated screenshot testing will help you capture up to 25 screenshots of different configurations of browsers and OS in a single session facilitated by instrumented UI test cases to help you realize how seamlessly your web app renders through different screen sizes using different browsers
LambdaTest offers a lifetime free plan with limited features. It also offers some paid plans for more enterprise-level testing features.
The choice of selecting the right tool not only depends on the size and nature of your project but also on the potential trends and improvements the tool has to offer.
Automation testing is a hot space and it’s evolving constantly and incorporating emerging trends like AI and machine learning. The increasing need for codeless testing will create more opportunities for existing tools and give rise to new players in the automation testing space.
Who doesn’t love beef jerky? Seriously, beef jerky may be the most delicious food on the face of the planet.
But it’s also expensive.
Working the price of beef jerky (or any other type of mouth-watering meat jerky) into my limited snack budget is no easy feat.
Honestly, my main goal in life is to become so successful that I can just snatch bags off the convenience store rack without batting an eyelash.
Thankfully, making jerky at home is relatively easy, much less expensive, and insanely delicious.
If you crave dried meat as I do, but rage at the cost of that fancy, overpriced packaged stuff, I have the answer to your protein-packed prayers.
I’m going to walk you through the jerky-making process. You’ll be eating like a king (or queen) in no time.
Table of Contents
Loading…
What is Jerky?
In its most basic form, jerky is simply dried meat.
It was invented by early humans as a means to keep protein sources edible for longer periods of time. By dehydrating the meat from large kills (usually in the sun), our 20x great-grandparents (who had no access to the modern Frigidaire) were able to prevent bacterial and fungal enzymes from reacting with their food source. This process helped preserve the meat, increasing the amount of time it could be safely eaten.
Jerky is also a lightweight, and highly portable food source, making it perfect for early nomadic cultures, not to mention modern backcountry hikers.
There is archeological evidence of dried meat in Egyptian tombs that dates back to 1338 BC. However, there is some version of dried meat traditional to nearly every culture on the face of the planet.
What Type of Meat to Dry?
The biggest factor in making fabulous-tasting jerky is the cut of meat you use. If you plan to make traditional beef jerky, you can’t go wrong with a big beautiful flank steak. I know it’s a little more expensive, but your tastebuds will thank you later.
If you can’t bring yourself to fork out the dough for flank steak, London broil, eye of round, sirloin, and top or bottom round also work well. Go as lean as possible. Avoid cuts with lots of marbling (intramuscular fat), and trim off any visible outer fat before you begin.
Fat is a fast-track ticket to moldy, rancid jerky. It is the enemy. Avoid it as much as possible.
Because lean meat makes great jerky, game meat like elk, deer, and moose are terrific options for homemade jerky. Just be careful. Since drying concentrates flavors, ditch the meat that may have gotten a little gut juice on it in the field. Trust me, gut juice is not the flavor you want to intensify.
Making the Cut
Starting with a large cut of meat that can be easily sliced into thin strips will make your jerky-making much easier. So if you’re sourcing your meat from a grocery store, start with a large roast rather than pre-cut steaks.
Popping your meat in the freezer for an hour or so will make it easier to slice. And you definitely want to use a sharp knife.
Like wood, muscle meat has a grain. The grain is simply long lines of muscle fiber that run in parallel lines. When carving up a piece of meat for steaks, you always, always, ALWAYS slice perpendicular to the grain.
However, when making jerky, you can make your cuts either with or against the grain. Strips cut perpendicular to the grain will be softer and easier to chew. Cut them parallel to the grain, and your jerky will be tougher and super chewy.
Most commercial jerky is made with strips cut against the grain. However, some people prefer to suck on their jerky like a lollipop through an afternoon hike. Others like to wear down their teeth on their jerky.
If you’re one of those people, feel free to (literally and figuratively) butcher that backstrap by cutting parallel to the muscle fibers. Just be aware that I’m silently judging you.
To ensure your jerky pieces dry evenly, you want to cut uniformly thin steaks. Your strips should be between ⅛” and ¼” thick. Some people prefer thick-cut jerky. It definitely makes for a hearty, satisfying snack. However, when done right, paper-thin jerky feels like a melt-in-your-mouth luxury.
Grind It Out
You can also make ground-meat jerky. This works particularly well if you’re using less-than-stellar cuts of meat.
To make ground-jerky meat sticks, you’re going to need a good grinder. Don’t waste your time with the old-fashioned crank grinders…unless you like a good arm workout. If that’s the case, knock yourself out. But you might want to chug a pre-workout before you get started.
A quality electric meat grinder will make the process a zillion times easier. And they last practically forever.
After you’ve trimmed away all the fat, toss your meat in the grinder and run it through the smallest grinder plate possible. Then when you’re done, run it through the grinder again.
Season it up and stuff it in a jerky gun, and you’re on your way to the best Slim Jim knock-offs this side of wherever Slim Jims are made.
Once you have your meat prepared, you’ll want to add some seasonings to spice things up. There are a ton of marinade recipes out there floating around the internet. The most common ingredients are black pepper, garlic, onion powder, soy sauce, Worcestershire sauce, and red chili flakes.
Finding the perfect marinade recipe depends on your personal tastes. There are some that are sweet, spicy, salty, or some combination of all three.
That said, here is my favorite jerky marinade. I like mine a little sweet and spicy, so be advised. The recipe makes enough to flavor about two pounds of meat.
½ cup soy sauce
2 Tablespoons Worcestershire sauce
¼ cup brown sugar
2 teaspoons red pepper flakes
1 teaspoon ground black pepper
1 teaspoon garlic powder
1 teaspoon onion powder
1 teaspoon paprika
If you aren’t skilled in the culinary arts, you can always purchase pre-made jerky seasoning. I’ve tried Jim Melton’s Jerky Marinade and it makes pretty tasty jerky. Plus, if you follow the directions, this method is basically idiot-proof.
For best results, toss your marinade into a large Ziploc bag with your meat strips. Give it a few good squishes to make sure all the strips make contact with the marinade.
Then, leave it in the refrigerator for at least an hour, but not more than 24. Give the bag a few firm squeezes from time to evenly distribute the flavor during the marinating process.
The longer you let it marinate, the more flavor your jerky will have.
The Cure
No, I’m not talking about the 80s English rock band (Gawd, I am showing my age). I’m talking about adding “cure” to your homemade jerky.
The cure (sometimes called curing salts or Prague Powder) acts as an additional preservative for the jerky. This is an optional step that makes the end product more shelf-stable.
Humans have been drying meat since our ancient ancestors killed their first woolly mammoth. Traditionally, meat was hung in the sun to dry. However, if you’ve ever seen road kill baking in the late July sun, you probably understand why we might want to try a slightly more modern method.
Modern jerky chefs leave the sun-drying for roadkill and use more hygienic drying methods, like ovens, smokers, and dehydrators.
The Oven Method
Since pretty much everyone has an oven in their kitchen, oven-drying is the simplest way to make jerky. All you have to do is drape your meat strips on a clean oven rack and turn the oven down to 160 degrees. (If your oven doesn’t go that low, you can prop the oven door open to keep the interior temperature from getting too hot.)
In about three hours, you’ll be devouring mouth-watering homemade jerky.
When making jerky, you can’t really set a timer. Instead, you’ll need to keep an observant eye on your drying meat. The jerky is done when it is dry and firm, yet still pliable enough to chew. When you bend a piece, it should bend and crack without snapping.
The USDA recommends heating meat to an internal temperature of 160 degrees to murder dangerous microbes like salmonella and E. coli.
The Smoker Method
Smoking meat is all the rage these days, and it is a surefire way to add some really intense flavors to your jerky. Wood-fired pellet grills are perfect for making jerky.
To make jerky in a smoker, first, pat your marinated strips with a paper towel to remove excess moisture. Lay your strips evenly across the grill grates, making sure none of your strips are touching.
You’ll need to smoke your strips for four to five hours to complete the drying process. Be sure to keep the temperature of your smoker between 160 and 200 degrees to kill off harmful bacteria and prevent spoiling.
The Dehydrator Method
Don’t be intimidated by the modern dehydrator. It is basically just a low-heat oven that circulates air to dry your jerky.
I’ve been using a relatively cheap dehydrator from RedHead for nearly a decade. I’ve made a butt-ton of jerky in it (totally an accurate measurement), and it has never let me down. The customer ratings are kind of low, so apparently, not everyone has enjoyed the same jerky-making success.
To make jerky in a food dehydrator, lay your marinated meat strips in a single layer on the dehydrator trays. To ensure proper air circulation, make sure the strips aren’t touching each other.
Follow the directions in your model’s owner’s manual for the best results. Most dehydrators take anywhere from 7 to 10 hours to finish the drying process.
Storing Your Jerky
Once your jerky has cooled, it’s time to package it up. Moisture is the enemy when it comes to safely storing your homemade jerky. You may want to keep your jerky in a plain paper sack for a few days to expel any lingering dampness in the finished product.
Most dried meat aficionados store their jerky in airtight containers like zip-lock storage bags or Mason jars. To keep your jerky fresh, toss a food-grade oxygen absorber into your container. This will help prevent bacteria from taking up residence inside your packaging and spoiling your snacks.
To maintain the quality of your homemade jerky, store your packages in a cool, dry place. Most jerky kept at room temperature will last about a week (up to two weeks if you’re lucky). If you can’t eat it all in that time, it will keep longer (3-6 months) in the refrigerator.
Or if you’ve made a huge batch of jerky, it can keep for up to a year in the freezer, although freezing can alter the flavor and texture of your jerky.
Conclusion
Jerky is a classic snack enjoyed by muscle-bound gym rats and lazy couch potatoes alike. It’s also perfect for munching while hunting, backpacking, or just studying for that tough final exam.
Plus, honing your jerky-making skills now could potentially save your skin in a long-term emergency situation…or maybe woo some lucky guy, gal, or pal?
For now, my jerky-making motivation is to save some cash. At least until I hit the big time and the cost of beef jerky no longer makes my head spin.
Do you have your own jerky recipe you’d like to share? Or maybe you just want to sing the praises of this protein-packed snack? Tell us all about it in the comments below! Are you preparing for the end of the world or another inconvenient lock-down? Check out our article detailing How To Stockpile Food & Water for Emergencies.
Learn how to store JSON in a MySQL database and how to select and update them easily with Eloquent.
First of all, you should check if your MySQL version is equal to or greater than 5.7.8 version, otherwise will not be compatible.
MySQL supports the native JSON data type since version 5.7.8.
In these examples I will use the information of the furniture used in the Habbo game, which is served in JSON by means of this url.
Furniture data
As you can see, the data is in json format segmented in two categories: room item types and wall item types. We will get that information and we will store it in a table of our database to make some examples with the JSON data.
Creating the migration
First of all we need to make a migration to create the items table and be able to store our data
As you have noticed, we have marked furni column as json.
Did you know?
When creating a migration with the make:migration artisan command you don’t need to specify the migration name with low bars and without spaces, you only need to do it like this:
php artisan make:migration "create items table"
Fetching the data
To fetch the data from the furni data resource I have crafted a tiny command that will export It to the items table.
First of all make sure to create the Item model:
php artisan make:model Item
Then, we proceed with the command that looks like this:
As you can see, we get the furni data URL and then we iterate through the items to store in our database. Remember to encode the JSON information as we do in this example when adding new rows to the table!
By executing this command we will have our items table full of data in a few seconds.
Processing the data
Let’s see the JSON information of the first furniture through a simple select:
This is what is included in the first row of our items table in the furni column. As you can see, there are a lot of properties that are stored in a single column!
Casting JSON to array
It’s possible to transform JSON into array with no need of using json_decode by casting the column. All we need to do is adding this in our Item model.
protected $casts = [
'furni' => 'array'
];
Now, every time we fetch data from the furni column, we will get an array response.
Using JSON Where Clauses
Imagin you only want to query the iced furniline items, how could be it done?
Laravel eloquent provides JSON where clauses which will help us to fix this quickly:
As you can see, we only need to query a JSON column using the -> operator.
Query JSON arrays by their length
What if we want to query the furnis that have three colors? This can be done through the whereJsonLength method, thath will check how many items does the array have.
In my opinion, store and process JSON data is very easy to handle with Laravel. From selecting a simple JSON value to updating massively some JSON data. I hope these tricks have been helpful to you.