Eloquent HasManyDeep Package

Eloquent HasManyDeep Package

https://ift.tt/35HJziH

Eloquent HasManyDeep Package

The Laravel Eloquent HasManyDeep Package is an extended version of Laravel Eloquent’s HasManyThrough that allows relationships with unlimited intermediate models. It includes support for many-to-many and polymorphic relationships.

As an example of how this package is useful to pretend you have a setup where you want to get all comments for all posts, by users in a specific country. It might look something like this:

Country → hasMany → User → hasMany → Post → hasMany → Comment 

Granted this gets pretty complicated, but with this package, you can define the relationship like the following:

class Country extends Model { use \Staudenmeir\EloquentHasManyDeep\HasRelationships; public function comments() { return $this->hasManyDeep('App\Comment', ['App\User', 'App\Post']); } } 

Then you’ll be able to call Country::first()->comments to get all the comments which keeps the familiar Laravel syntax.

To take this a step further, Povilas Korop from Laravel Daily also created a review video covering this package:

If you’d like to find out more visit the staudenmeir/eloquent-has-many-deep on Github and the readme contains the full documentation.


Filed in: News


Enjoy this? Get Laravel News delivered straight to your inbox every Sunday.

No Spam, ever. We’ll never share your email address and you can opt out at any time.

programming

via Laravel News https://ift.tt/14pzU0d

December 20, 2019 at 11:01AM

Working Protosaber Blade

Working Protosaber Blade

https://ift.tt/2ECDaJC

Working Protosaber Blade

Link

While the idea of a real-world lightsaber sounds awesome, the amount of power required makes the idea impractical. But to celebrate the release of Star Wars: Jedi Fallen Order, The Hacksmith came up with the next best thing, a battery-powered version of the predecessor of the weapon, known as a Protosaber. Demo at 14:03.

fun

via The Awesomer https://theawesomer.com

December 19, 2019 at 05:49PM

G44: A Review of Glock’s First Rimfire Pistol as It Relates to the G19

G44: A Review of Glock’s First Rimfire Pistol as It Relates to the G19

https://ift.tt/2Z3KCqF

Would it be a single-stack .45 ACP? Maybe a commercial version of the Glock 47 Border Patrol variant? There was even buzz on forums that it would be — wait for it — an AR-style firearm. Then there were those who predicted it would be a .22 LR. My only guess is that it would be a Glock 44, but I had no idea about the caliber. My gut told me the model 44 would be next. After all, Glock is up to the G48 model. Why bypass the model 44? And so here we are, with the G44 pistol … a rimfire?

Chambered in .22 LR, the Glock 44 is billed as a gun for the entire family.

RELATED STORY

Glock 44: Manufacturer Unveils First-Ever Pistol in .22 LR

Glock G44 Details

With all the fanfare of a new product launch, Glock teased up the event with an email to its subscribers, telling them to tune in on Dec. 10. I received the same email — no doubt millions of other Glock website subscribers did too — but I also received a prior email from Glock’s marketing team. Was I interested in attending an event, they asked? A bit. The next thing I knew I was sitting front row, center stage.

In fact, it was the G44 that was announced on Dec. 10. And, to my surprise, Glock chambered it in .22 LR. Yep, Glock is now manufacturing rimfire pistols. Glock introduced the new pistols with the concept of “Adventure Awaits and the Legacy Continues.”

When I asked Dr. Gunter Gigacher, President of Glock, Inc., about the manufacturer moving from a provider of military and law enforcement pistols to producing pistols for the commercial market, he said, “It is the next step and the natural progression for the company. It has been a long road to develop and we won’t produce a product until it is completely ready.”

While the Glock 44 is very unique from a Glock perspective, it is also very much the same. It’s the same size as G19 and with other features you expect in a Glock pistol: striker-fire trigger, polymer frame, polymer magazine, and plastic sights. The G44 is super-lightweight at just 15.94 ounces unloaded. If this isn’t a 21st century “kit gun,” I don’t know what is.

Familiar Glock Design

The operating system is a simple blow-back mechanism similar to the G25 and G28 .380 Auto pistols built for foreign markets. All other Glocks, except for the G46, are short recoil-operated, locked-breech semi-automatic pistols. The power of the .22 LR is by far less than the centerfire calibers chambered by Glock. A blow-back system makes sense and all other .22 LR rimfire pistols on the market use a blow-back system. The engineering challenge is reducing the slide mass to reliably operate with .22 LR loads. Think for a minute about how many different .22 LR cartridges are available.

There are cartridges with at least 15 different bullets weights, ranging from 20 grains up to 60 grains. Let’s not forget the cartridges. Ever look at Aguila’s line of .22 LR ammo? Aguila corners the market in niche loads from subsonic 20-grain Colibri rounds to 60-grain Sniper subsonic rounds. Then include all the inexpensive plinker ammo, target and high velocity loads.

The slide is unique on the G44 since it is a combination of polymer and steel, which offers light weight and strength as well as the correct slide mass to cycle all the different types of .22 LR cartridges.

G19 Sized for Training

At the event, Glock had G19 Gen5 pistols on-hand so we could compare the the two pistols side by side. They are both 7.28 inches in length and are 5.04 inches height. The G44 is slightly less width at 1.26 inches; the G19 is 1.34 inches wide. I field-stripped the two pistols and tried to swap slides on frames and it was a no go. I later heard from William Carmichael, Manager of technical Services at Glock: “Very few of the internal components are the same between the G44 and G19. Most of the internal firing mechanism is unique to the G44 due to the 22 rimfire caliber.”

The magazine is also unique and with good cause. Since the G19 and G44 are nearly identical, so are the magazines. G44 magazines incorporate ridges on the back side of the magazine body. G19s have a smooth magazine body except for the witness holes. Those ribs offer the user a tactical feel, which immediately tells the user this is a rimfire magazine, not a centerfire magazine.

At the range we fired CCI Blazer 40-grain LRN ammo through the G44s. The magazines have a 10-round capacity, so those users in states with restrictive magazine capacity laws will exhale a sigh of relief.

Rounds Downrange

It’s hard to concentrate when you have Team Glock shooters like Shane Coley and Ashley Rhueark shooting next to you. Both of them show their mastery of the sport with a sure grip and stance. And they ran the G44s as fast as they could with little muzzle bounce due to recoil. In hand the G44 is super-lightweight. I pick it up and think G19, but the weight tells me different.

At 10 yards I was able to hit the 4.5-inch-by-3.5-inch reactive hit zone on a steel target in rapid fire. I have nowhere near the level or speed of Coley and Rhueark, but I was having fun. Steel targets — round and square shaped — were set out at 50 yards, which is well plinking range, and I was able to hit them once I was zeroed in. The trigger was typical Glock striker-fire, which is boringly consistent. And you don’t bust your thumb loading the magazine like you can with other .22 LR pistol magazines.

Glock has a new plinker, and my gut tells me this will also make a great, low-recoil training pistol. When moving up to the 9mm G19, the only thing users will noticed is increased recoil. Other than that the experience will be the same. My sample pistol is already at my dealer. All I need now is lots of inexpensive .22 ammo and few empty soda cans. For more information, visit glock.com.

The post G44: A Review of Glock’s First Rimfire Pistol as It Relates to the G19 appeared first on Personal Defense World.

guns

via Personal Defense World https://ift.tt/2Arq2GB

December 19, 2019 at 11:31AM

Refactoring To Lookup Tables

Refactoring To Lookup Tables

https://ift.tt/34tfvph

Caleb Porzio returns this week to provide an in depth review of lookup tables. Lookup tables are a lesser known, but extremely versatile and powerful little pattern. We’ll use them to clean up some long conditionals, and then explore how they can help us share backend business logic with the frontend.

View the source code for this episode on GitHub.

Published on Dec 17th, 2019.

programming

via Laracasts https://ift.tt/1eZ1zac

December 17, 2019 at 04:15PM

Learn and Practice SQL With This Game

Learn and Practice SQL With This Game

https://ift.tt/2r1cSxn

Ever tried to learn SQL, the query language that lets you poke at the innards of databases? Most tutorials start by having you create your own database, fill it with nonsense, and then run queries that will make your eyes glaze over (hooray, we can simulate the accounting department for a widget factory). The Knight Lab’s SQL Murder Mystery, however, makes things a bit more fun.

In the game, you know that a murder was committed, but you lost the police report describing it. Knowing only the date and location, can you sift through the information in the police database to figure out who the murderer was?

The scenario is a bit contrived, but it works as a puzzle because you have a question compelling you to dive through the data. My SQL is a bit rusty, so I immediately googled a bit of the syntax I’d forgotten, and started poking away. This is how we solve coding problems in real life, after all: Figure out what tools you need to answer the question you actually care about.

In the game, you start by getting your bearings—what tables are in this database?—and as you do, you find clues to follow up on. For example, it’s easy to find an entry for the police report, but it doesn’t mention the suspect; instead it just references two witnesses. In another table you can find witness interviews, and then follow up on clues (one witness remembers part of the culprit’s license plate, for example.)

I’ve worked with SQL databases before, and at first I was annoyed at how the database was set up. (I would have done it differently.) Then again, in real life you often have to extract information from a database that is oddly organized. There’s also no in-story explanation of why the police database also contains useful but disconnected information, like the local gym’s member check-ins. But while it may not make sense to encounter all of these things in the same database in the real world, it does give you an idea of how a piece of information (a license plate, a sighting at the gym) can get you access to a whole trove of further information if you can just find the right data source.

This game will take you maybe 10-15 minutes if you’re already good with SQL, or you can use it to guide a longer session if you’re still learning. (There is an accompanying walkthrough that teaches you as you go.) A bonus level at the end challenges you to find out who hired the hitman, and to do so with a three-table join (or at least that’s how I did it). Because if you really want to learn how to use a tool, you need to figure out how to ask and answer your own questions, not just run through a textbook.

geeky,Tech,Database

via Lifehacker https://lifehacker.com

December 17, 2019 at 01:08PM

Glock 44: In-Depth Review of Glock’s First .22 LR on TFBTV

Glock 44: In-Depth Review of Glock’s First .22 LR on TFBTV

https://ift.tt/38GFm0B

In this episode of TFBTV, @James Reeves brings you a FULL REVIEW of the NEW Glock 44 direct from the Glock Factory in Deutsch-Wagram, Austria. Here’s the complete rundown and range session.

Read more at: https://www.thefirearmblog.com/blog/2019/12/16/glock-44/

See also this FAQ shamelessly lifted from TFB Editor Pete’s article on the G44 @ https://ift.tt/2rzllYP

The GLOCK G44 is designed to mimic a full powered combat handgun while shooting a low recoil, inexpensive round that allows for an increased amount of training time. All without sacrificing functionality. These features in a real defensive pistol represent the holy grail for new shooters, trainees and anyone else looking for an enjoyable shooting experience.

Q: What’s a good G44 size comparison?

A: It’s a compact handgun. The G44 is indistinguishable in size from a Gen 5 G19.

Q: What is the G44 slide made of?

A. The G44 Slide is a hybrid steel polymer design (steel rails, polymer slide body).

Q. What is the GLOCK 44 magazine capacity?

A. These two G44’s use 10 round magazines, although there have been whispers of possible 15 round magazines in the future.

Q. Are there GLOCK 44 threaded barrel versions available?

A. Factory G44 threaded barrels will be available on the commercial launch date.

Q. GLOCK 44 ammunition recommendations?

A. While standard and high velocity ammunition might be somewhat preferable, outside of some ammo with manufacturing irregularities (velocity fluctuations) most quality ammo runs great in the G44.

Q. What does the GLOCK 44 trigger feel like?

A. The G44 trigger feels exactly like a Gen 5 G19.

Q. Tell me about the GLOCK 44 disassembly process.

A. The G44 field strips for cleaning and maintenance like any other commercially available GLOCK pistol.

Q. What GLOCK G44 holster and magazine carrier options are available?

A. Any holster or carrier designed for the Gen 5 G19 will work with the G44.

Q. What GLOCK G44 light and laser combinations are currently available.

A. Any weaponlight or laser designed to work with current accessory rail-equipped GLOCK pistols will work on the GLOCK 44.

Q. How much does the GLOCK G44 cost?

A. At the time of this writing, the unconfirmed MSRP of the G44 is $400 USD.

Q. What about GLOCK G44 sights?

A. The GLOCK 44 comes standard with basic polymer sights but can use any sights designed for the Gen 5 G19 pistols.

Q. What is the official GLOCK G44 website?

A. GLOCK USA G44 – https://ift.tt/36pGFz4

Q. Where is the GLOCK G44 manufactured?

A. The GLOCK 44 is made at GLOCK USA headquarters and factory in Smyrna, Georgia.

Q. What about a GLOCK G44 manual safety?

A. No, the GLOCK 44 uses the same Safe Action features found on their centerfire firearms.

««« GUN AND GEAR GIVEAWAYS »»»

PLEASE check out our Patreon and Subscribe Star pages if you enjoy our program, and consider helping us at TFBTV out! We give away hundreds of dollars of gear a month to our supporters! https://ift.tt/20aijRh https://ift.tt/2mNjr43 NOTE: These giveaways are not affiliated with, associated with, or in any way endorsed by YouTube and TFBTV is solely responsible for the giveaways mentioned in this video and this description. No purchase required for gear worth over $250.

««« FOLLOW US ON SOCIAL MEDIA »»»

https://ift.tt/2Ny4xaJ

https://ift.tt/2wqXNET

https://ift.tt/2THAj8m

««« GUNS IN THIS VIDEO »»»

-Glock 44

««« SPONSORS »»»

Please Support Them! They help make our videos possible.

– Ventura Munitions

– Federal Premium – Building the industry’s widest variety of ammunition and offering leading products for every facet of the shooting sports. https://ift.tt/P4n5jx

-Blue Alpha Gear: https://ift.tt/2hKMfnu

««« TFB CHAT ROOM »»»

Want to join the TFBTV chat room? Use our Discord Invite: https://ift.tt/2t6R69l #TFBTV



We are committed to finding, researching, and recommending the best products. We earn commissions from purchases you make using the retail links in our product reviews.

Learn more about how this works

.

guns

via The Firearm Blog https://ift.tt/2JX8W99

December 16, 2019 at 06:00PM

Scrum Poster Walkthrough

Scrum Poster Walkthrough

https://ift.tt/2PNxvpa

Earlier this year, I released the complimentary Scrum Poster with the goal to give Scrum Teams around the world a medium to see the Scrum Guide in visual form. Beside the guide itself, many text documents and presentations have flooded the various platforms and I felt a picture can express so much more. I also felt transparency was best supported by shipping the actual paper version so show support of Scrum in a team area. Beside the initial intend of making the rules, artifacts, events and roles visible, the poster became a learning tool in recent months during my Scrum classroom trainings. The poster triggered conversations among students, very often during breaks, that might otherwise been missed. We also began using the poster during Retrospectives and released a retrospective technique, called Scrum Value Pairs that makes use of the poster as well as the icons of the scrum values.

Today, I am releasing a very short 5-Min video, that aims to provide a quick walkthrough of the poster hitting the events, artifacts and roles within Scrum. A red dot symbolizes a you are here orientation while I am talking about the framework. I hope that this voice over video will provide an additional learning tool for everyone new to Scrum, or for teams that would like to watch an animated walkthrough alongside with the poster. 

scrum/agile

via Scrum.org Blog https://ift.tt/2TTJdzo

December 16, 2019 at 07:27AM

Glitter Bomb Trap 2.0

Glitter Bomb Trap 2.0

https://ift.tt/35ooiKJ

Glitter Bomb Trap 2.0

Link

After building an ingenious device to befuddle porch package thieves, Mark Rober is back with a new and improved version. Like the original, it shoots video of the thief, fires off glitter and fart bombs, but with a little help from his friend Sean Hodgins and Home Alone star Macaulay Culkin, this version is better in every way.

fun

via The Awesomer https://theawesomer.com

December 15, 2019 at 12:45PM

[VLOG] What Are the Scrum Product Owner Accountabilities

[VLOG] What Are the Scrum Product Owner Accountabilities

https://ift.tt/2rJG9gr

Hey awesome people. The Product Owner role is often underestimated. When an organisation is transitioning to use Scrum, it is not rare to see people perceive Product Owner as the business analyst or requirements engineer just managing the Product Backlog. It is also not rare to see the Product Owner who are just focused on the project lifecycle and delivering on time, on scope and on budget. And the Product Owner role is perceived as a low level tactical role because theScrum Guide does not explicitly write down other activities the Product Owner should do outside of Scrum, it is not rare to see an additional layer on top of the Product Owner called the Product Manager.

In today’s vlog, I share what is the Product Owner role is about and what is the broad accountabilities of the Product Owner. Being a Product Owner is not easy and as a Scrum Master I will do my best to serve the Product Owner so that they can do outstanding job as a Product Owner. Hopefully today’s vlog is helpful for those of you who are new to Scrum and Product Owner role.

 

 

scrum/agile

via Scrum.org Blog https://ift.tt/2TTJdzo

December 13, 2019 at 08:02PM