https://assets.amuniversal.com/8c3f79c01343013a7fd8005056a9545d
Thank you for voting.
Hmm. Something went wrong. We will take a look as soon as we can.
Dilbert Daily Strip
Just another WordPress site
https://assets.amuniversal.com/8c3f79c01343013a7fd8005056a9545d
Thank you for voting.
Hmm. Something went wrong. We will take a look as soon as we can.
Dilbert Daily Strip
http://img.youtube.com/vi/_S6ErypDAtk/0.jpgToday I’m answering one question from the comments, with a demo example. In my experience, it’s no big deal to have 10-20 extra fields in the Users table. What is your experience?Laravel News Links
https://protone.media/img/header_social.jpg
It’s an easy-to-use deployment tool to deploy your Laravel apps containerized with Docker. Launcher is remarkably easy, and still, you can fully customize it to your needs. Start launching your sites in just minutes using our free 14-day trial.
This year, the Laravel team announced a new release schedule for major Laravel versions. Instead of a major version every six months, we now get a major release every 12 months. This change didn’t stop the team from improving the current release, Laravel 8. Over the last 14 months, it got so many great updates that you might have lost track of it.
I’ll release a series of blog posts to highlight some of the best features and improvements since the release of v8 back in September 2020. In total, I’ve gathered over 100 code examples, so I’ll split this blog post into five or six posts and group them by topic. Let’s start with Collections!
I got most code examples and explanations from the PRs and official documentation.
The pipeInto method creates a new instance of the given class and passes the collection into the constructor:
// Before:
Category::get()->pipe(function (Collection $categories) {
return new CategoryCollection($categories);
});
// After:
Category::get()->pipeInto(CategoryCollection::class);
Split a collection into a certain number of groups, and fill the first groups completely.
$array = collect([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]);
// will return 3 chunks of sizes 4, 3, and 3.
$array->splitIn(3);
Determine if the collection contains a single element.
collect([])->isSingle(); // false
collect([1])->isSingle(); // true
collect([1, 2])->isSingle(); // false
Get the first item in the collection, but only if exactly one item exists. Otherwise, throw an exception.
$collection = collect([
['name' => 'foo'],
['name' => 'bar'],
['name' => 'bar'],
]);
// $result will be equal to: ['name' => 'foo']
$result = $collection->where('name', 'foo')->sole();
// $result will be equal to: ['name' => 'foo']
$result = $collection->sole(function ($value) {
return $value['name'] === 'foo';
});
// This will throw an ItemNotFoundException
$collection->where('name', 'INVALID')->sole();
// This will throw a MultipleItemsFoundException
$collection->where('name', 'bar')->sole();
Create chunks representing a “sliding window” view of the items in the collection.
collect([1, 2, 3, 4, 5])->sliding(2);
// [[1, 2], [2, 3], [3, 4], [4, 5]]
$collection = collect([1, 2, 3, 4, 5]);
$collection->pop(3);
// [5, 4, 3]
$collection->all();
// [1, 2]
$collection = collect([1, 2, 3, 4, 5]);
$collection->shift(3);
// [1, 2, 3]
$collection->all();
// [4, 5]
Determine if any of the keys exist in the collection.
// This example would return true:
collect(['first' => 'Hello', 'second' => 'World'])->hasAny(['first', 'fourth']);
// While this would return false:
collect(['first' => 'Hello', 'second' => 'World'])->hasAny(['third', 'fourth']);
In the next blog post, I’ll take a look at the Database and Eloquent improvements!
Laravel News Links
https://cdn0.thetruthaboutguns.com/wp-content/uploads/2021/11/Screen-Shot-2021-11-03-at-12.06.43-PM.png
As promised, TTAG assembled a who’s who of Second Amendment legal minds to give their highly educated opinions and analysis of this morning’s arguments in the New York Second Amendment case before the Supreme Court. See below for brief descriptions of the participants.
The discussion lasted about 40 minutes and was ably lead by our own LKB. Here’s video . . .
Joseph Greenlee, Firearms Policy Coalition senior attorney and Director of Constitutional Studies.
Dave Kopel, Research Director of the Independence Institute, Associate Policy Analyst at the Cato Institute, and adjunct Professor of Advanced Constitutional Law at the University of Denver’s Sturm College of Law. Follow him at davekopel.org.
Eugene Volokh, Gary T. Schwartz Distinguished Professor of Law at UCLA and proprietor of the popular Volohk Conspiracy blog at Reason.com.
Cody Wisniewski, Director of the Mountain States Legal Foundation’s Center to Keep and Bear Arms.
The Truth About Guns
https://blog.devart.com/wp-content/uploads/2021/08/dbforge-studio-for-mysql-download.png
The article covers the key performance metrics available in MySQL that can help users improve and optimize query performance in MySQL databases. In addition, there is a brief overview of some MySQL performance monitoring tools. MySQL is an open-source relational database that a lot of users prefer to utilize in their work and daily operations […]
The post MySQL Performance Monitoring Tools and the Most Important Metrics to Monitor appeared first on Devart Blog.
Planet MySQL
https://assets.amuniversal.com/89f17b901343013a7fd8005056a9545d
Thank you for voting.
Hmm. Something went wrong. We will take a look as soon as we can.
Dilbert Daily Strip
https://www.thefirearmblog.com/blog/wp-content/uploads/2021/10/00-FEATURED-180×180.jpg
We all love a big boom. The thump of a .308 into your shoulder and the smack of a 175-grain chunk of metal on a steel target are thrilling. Sometimes, though, a large caliber is too much for the job. Small, swift, and effective, the .22 LR cartridge is a classic for a reason. Though […]
The post TFB Review: The .22 LR Ruger American Rimfire Rifle appeared first on The Firearm Blog.
The Firearm Blog
https://assets.amuniversal.com/86e742401343013a7fd8005056a9545d
Thank you for voting.
Hmm. Something went wrong. We will take a look as soon as we can.
Dilbert Daily Strip
https://laravelnews.imgix.net/images/larastan.png?ixlib=php-3.3.1
After initially writing about Larastan back in 2018, we are pleased to see the release of Larastan v1.0 this week, a package to help analyze Laravel application code:
Larastan is a development dependency that adds static analysis to Laravel, improving developer productivity and code quality. At the core, it’s a PHPStan wrapper for Laravel and helps you find errors in your code through static analysis. It helps catch bugs before you even write tests for the code:
You can use Larastan to analyze application code as well as use it to analyze your Laravel packages.
Getting started in your new or existing Laravel project is as easy as installing the package and configuring PHPStan:
1composer require nunomaduro/larastan --with-dependencies --dev
2
3# after setting up a `phpstan.neon` file in the root
4# of your project, you can analyze your code:
5./vendor/bin/phpstan analyse
If you find this package useful, consider sponsoring the developers Nuno Maduro and Can Vural on GitHub. The Larastan project page has links to all the ways you can sponsor their work.
You can learn more about this package, get full installation instructions, and view the source code on GitHub. I’d recommend checking out the rules specific to Laravel applications, with configurable options.
You can see the complete list of new features and updates below and the diff between v0.7.15 and v1.0.0. Also, the following release notes are directly from the changelog:
Enumerable::filter in #981
rescue parameter of rescue function now accepts the Throwable by @sebdesign in #989
CheckJobDispatchArgumentTypesCompatibleWithClassConstructorRule rule in #991
non-empty-string types in stubs. c5b81cf
Laravel News
https://gunfreezone.net/wp-content/uploads/2021/11/FDHKc66UYAErVDI.jpeg
The upside of social media is that the professional media no longer has a monopoly on information.
The media is trying to do its best to George Zimmerman Kyle Rittenhouse.
Social media has done its homework.
This is the skateboarder who Kyle canoed.
None of that expressly justified shooting him, but it makes it harder to believe that Huber was the good guy trying to help people.
This information also has a way of swinging jury opinions.
Good.
I shed no tears over a wife beater who got split in half by a 223.