Laravel Online Migration Generator
https://ift.tt/3aTAJ3w
Generate laravel migration file from SQL table schema
Author: Harun
programming
via Laravel News Links https://ift.tt/2dvygAJ
March 19, 2020 at 09:24AM
Just another WordPress site
Laravel Online Migration Generator
https://ift.tt/3aTAJ3w
Generate laravel migration file from SQL table schema
Author: Harun
programming
via Laravel News Links https://ift.tt/2dvygAJ
March 19, 2020 at 09:24AM
Laravel Routing – 8 Advanced Tips: Languages, APIs, Groups, Validation
https://ift.tt/3ddoVel
Try new QuickAdminPanel 2019 generator version! Theme choice, Auto-deployment and more:
programming
via Laravel News Links https://ift.tt/2dvygAJ
March 19, 2020 at 09:24AM
Pickett’s Mill Armory 16″ .5.56 NATO Upper Assembly 13″ PMA Keymod Rail $151.99 CODE
https://ift.tt/3b93Y2d
Editors Note: With the Chinese Virus run on guns and gun parts we have expanded our deals search to some new and smaller shops. Pickett’s Mill Armory being not as well known has decent inventory all built with some brand name parts you all know and love.

USA – -(Ammoland.com)- Pickett’s Mill Armory has a sale on their 16″ .5.56 NATO Upper Assembly 13″ PMA Keymod Rail that you can make even cheaper after coupon code “LOCKDOWN” in the cart at check out all in for $151.99. This price is a barreled complete upper, no BCG or charge handle. This is a great price when you compare to similar uppers here or here and even here. (note the code seems to work on everything over $150.00)
Pickett’s Mill Armory 5.56 NATO AR15 Upper Receiver. This upper features a unique Pickett’s Mill Armory Keymod Free Float Rail system.
Specifications:
- -M4 Feed Ramp Flat Top Receiver.
- -Black anodized mil-spec finished upper receiver.
- -Feed ramps on the barrel extension and upper.
- -16″ 4150 Chrome Moly Vanadium Barrel
- -Phosphate barrel finish
- -Chambered in 5.56 NATO 1-8 Twist
- -.750″ diameter at gas block
- -1/2-28 Thread Pattern
- -Steel Low profile gas block with carpenter 158 screws
- -Carbine length gas system
- -A2 Muzzle Device
- -13″ PMA Keymod Rail
PMA uppers are built with the highest quality materials and test fired prior to shipping.
Related Videos, not the exact product:
Picketts Mill Armory 16″ .5.56 NATO Upper Assembly Deal Cart Check 03/19/2020:

Daily Gun Deals are short-term bargains that will often expire or sell out fast! The AmmoLand News Team publishes these deals that are available from our trusted partners and well-known industry retailers. AmmoLand does not stock inventory or have a shopping cart, we simply bring you up-to-date information on deals as a way to help you the reader get the most bang for your buck. As always we try and bring you the best information possible but these are fast-moving deals and details change quickly so be sure and check prices and product information for yourself by following the above links
.
Ammoland Editors are scouring the web to find you the deal that will save you money. So good are these deals that they do not last long so pay attention to the publish date and do not delay, take advantage of this deal as soon as we publish it for our readers.
Consider checking our Gun Deals Coupon page and our past featured Daily Gun Deals page for additional savings from your favorite industry partners. Thank you very much for your support and I hope we save you some money by highlighting these sweet daily deals. Enjoy!
The post Pickett’s Mill Armory 16″ .5.56 NATO Upper Assembly 13″ PMA Keymod Rail $151.99 CODE appeared first on AmmoLand.com.
guns
via AmmoLand.com https://ift.tt/2okaFKE
March 19, 2020 at 10:34AM
All the Free Streaming Services That Just Might Be What You’re Looking For
https://ift.tt/33ttay1
Many of us right now are spending more time at home than we normally do, hunkering down as we shelter-in-place or limit the amount of time we traditionally spend outside of our homes. And there’s a good chance we may be turning to our various streaming services to keep ourselves occupied—Nielsen estimates that staying inside can lead to a nearly 60 percent increase in the amount of content consumers watch. But if you’re like me, you may have already exhausted the good stuff worth watching on your regular go-to services.
Before you pony up for yet another service to tear through, consider any of a number of free services at your disposal—and there are a lot. Some, like Disney+ and Apple TV+, offer a year for free to Verizon customers and new Apple devices users, respectively. Many popular platforms offer free trials that can range from anywhere between seven days to three months, including the soon-to-launch mobile-first service Quibi. Others are always free, and may be just what you need to switch up your options. Whatever your need, Gizmodo has compiled a lengthy but in no way exhaustive list of options to keep you busy.
For you live television die-hards, Sling TV is a service that offers live programming on the super-cheap, with a ton of customization and bundle options. Sling TV typically starts at around $30 per month, but the service this week introduced a free, ad-supported version of its service that includes free movies and TV as well as ABC News Live. It’s available on Chrome, Safari, Edge, and through apps on Roku, Amazon, or Android devices.
Kanopy is a sleeper hit for high-quality free films and documentaries, typically with a focus on independent filmmaking, foreign films, and classic cinema. Gizmodo named Kanopy the best free streaming service you can subscribe to, but the catch is that it’s not available everywhere (like New York City, unfortunately). The service is available through participating universities and libraries, so you’ll either need a school login or library card to sign up. Kanopy is available on iOS, Android, Android TV, Chromecast, Roku, Fire TV, and select smart TVs.
This streaming service is another Gizmodo favorite, and you may have access to it for free if you’re an Optimum or Suddenlink subscriber. CuriosityStream is a fantastic hub for documentaries and educational content as well as originals—so this is a service to consider if you’ve maxed out on garbage television and are looking for something a little more informative. If you’re not a customer of either of those ISPs, however, CuriosityStream is very, very affordable, starting at just $3 per month or $20 for the whole year. The service is available on the web, Fire TV, Roku, Chromecast, Android, Android TV, iOS, Apple TV, Xbox One, and select smart TVs.
Verizon customers who are on unlimited data plans or Fios can still snag a 12-month subscription to Disney+, the digital vault for all of Disney’s catalog, plus National Geographic, Marvel, Pixar, and Star Wars. Disney+ is fairly cheap too, at $7 per month after a seven-day free trial. The service is available on Fire TV, Android TV, Apple TV, Chromecast, Roku, select smart TVs, Mac OS, PC, Chrome OS, Android, iOS, PS4, and Xbox One.
Apple TV+ is another you have free access to if you’ve recently purchased a new Apple product. The service is $5 per month, but you can binge its originals for free during a seven-day free trial. Apple’s originals are pretty meh, but horror fans may enjoy Servant. Apple TV+ is available on the web, Apple devices, streaming platforms, and select smart- and AirPlay-enabled TVs.
This often-overlooked streaming service available on web and Fire TV actually has a pretty decent roster of free movies and series. Don’t expect to see a ton of new releases, but you will get a nice mix of Hollywood blockbusters you’ve yet to watch.
YouTube has plenty of free documentary content from channels like Vice or Frontline documentaries from PBS you can subscribe to and build out a nice portfolio of free content. But YouTube also offers free, ad-supported movies as well. Just head to the Movies & Shows tab and select “Free to watch.” Be forewarned: The selection here isn’t great, but you might find something of interest if you don’t mind combing through the garbage—and reader, there is a lot of it here.
Vudu, a Walmart-owned service, actually has a pretty decent selection of content in its catalog of free, ad-supported movies section. As with other free services, you may have to dig a bit to find something of interest, but there’s a good mix of old and new here to choose from. Vudu is available on the web, Roku, Chromecast, Tivo, Playstation, Xbox One, Nvidia, iOS, Android, and select smart TVs.
Pluto TV is a pretty good option for folks looking for a good selection of live programming for free, as this service has more than 250 channels to surf. There’s some on-demand content as well, which is great, but the service is ad-supported. Pluto TV is available on Fire TV, Android, Chromecast, iOS, Playstation, Roku, and select smart TVs.
Tubi is a stellar ad-supported service with a ton of quality movies and series. Again, it’s ad-supported with breaks every 12 to 15 minutes—so this won’t be a service for someone who minds interruptions. But overall, it’s a great service if you’re just looking for something to put on, and a favorite of many of our Gizmodo readers. Tubi is available on Roku, Apple TV, Fire TV, Xbox, Chromecast, Tivo, Android, Xfinity X1, and Cox Contour.
Keep in mind that most major streaming services have trials that run anywhere from a week to several months. Quibi, which launches April 6, is currently offering a three-month free trial to users who pre-order the app. Streaming giants like Hulu, HBO, YouTube TV, and Netflix all offer free seven-day trials as well, if you’re not currently a subscriber (or mooching off a friend or family member’s account). CBS All Access is also a trial to consider, as it’s got great originals like Star Trek: Picard and Jordan Peele’s The Twilight Zone. And, if you’re an anime fan, don’t sleep on the 14-day free Crunchyroll trial—one of the longer trial periods for premium services that have been around awhile.
geeky,Tech
via Gizmodo https://gizmodo.com
March 19, 2020 at 09:00AM
God To Ignore Quarantine And Continue Being Everywhere
https://ift.tt/2UeNL4M
HEAVEN—The CDC now recommends for everyone to stay home and avoid going out as much as possible. Despite this, reports are that God is breaking quarantine and going absolutely everywhere.
Hospitals, nursing homes, prisons — wherever He is needed, God is going. He is reportedly visiting everyone and checking on everyone in this time of need and not using any amount of social distancing. God is said to be following the absolute best practices, though, and is at no risk of making people sick but only making people better.
“We have absolutely no control over the guy,” said CDC spokesman Jim Wells, “which is extremely frustrating. We want to remind you, though, that you’re not God, so please stay put in small groups.”
God is also reportedly trying to get people to stop hoarding toilet paper and instead put their treasures in Heaven. Treasures that don’t include toilet paper.
Many of you told us you wouldn’t subscribe until we offered Paypal as a payment option. You apparently weren’t bluffing, so we finally caved and added Paypal. Now — like the unbeliever faced with God’s invisible qualities displayed in nature — you are without excuse.
fun
via The Babylon Bee https://babylonbee.com
March 18, 2020 at 11:49AM
Hot Rolling Steel
https://ift.tt/2UlnYb6
Ever wonder how they make coils of sheet metal? This fascinating footage captured by Sweden’s Dalarna University at the SSAB hot rolling mill shows how a giant slab of steel is heated, then cleaned, roughed, and rolled through a series of machines into gradually thinner and thinner layers.
fun
via The Awesomer https://theawesomer.com
March 18, 2020 at 01:15PM
Demo: Laravel Video Portal and DB Schema Generator [Video + Github]
https://www.youtube.com/watch?v=iv1QHwWMSz4
Free demo-project of Youtube collection with channels.
programming
via Laravel News Links https://ift.tt/2dvygAJ
March 18, 2020 at 09:03AM
On using arrow functions in PHP 7.4
https://ift.tt/2QaEvO0
In PHP 7.4 a widely requested feature landed: arrow function. In this blogpost I’d like to show you how I like to use them.
Let’s start with an example from the Oh Dear codebase I tweeted out a few days ago.
In Laravel 6 and PHP 7.3 you could do this:
public static function boot() { static::boot(); static::creating( function (Team $team) { return $team->webhook_signing_secret = Str::random(32); } ); }
In Laravel 7 and PHP 7.4 you can rewrite it to this:
public static function booted() { static::creating(fn (Team $team) => $team->webhook_signing_secret = Str::random(32)); }
In the code snippet above, a short closure is used. It’s a bit beyond the scope of this post, but in Laravel 7, the booted lifecycle method was introduced, which will, unsuprisingly, be called we the model has booted. Using that method, you can lose the static::boot(); call from the initial code snippet.
A lot of people seemed to like it. Some didn’t, and that’s ok. When introducing new syntax, I don’t think there’s a single thing where all programmars will agree on. A comment I agree on however, is the line length. Luckily this can be easily fixed by moving the closure itself to it’s own line.
public static function booted() { static::creating( fn (Team $team) => $team->webhook_signing_secret = Str::random(32) ); }
To make the line length shorter, you could opt to remove the typehint. You could even rename the $team variable to $t, this is pretty common practice in the JavaScript. Personally I live typehints and full variable names, so personally I stick to the code snippet above.
I think it would be silly to blindly switch to short closures wherever it is technically possible. The question you should keep in mind when converting a closure to a short one is: “Does this make the code more readable?”. Of course, the answer is subjective. When in doubt, I recommend just asking your team members, they’re the ones that will have to read your code too.
If you use PhpStorm you can easily switch between a normal and a short closurse, so you can quickly get a feel of how it reads.
.
Let’s end by taking a look at an example where I think short closures really shine: in collection chains (thanks for the example, Liam).
Take #2 pic.twitter.com/ulNp019yvg
— Liam Hammett (@LiamHammett) March 7, 2020
programming
via Laravel News Links https://ift.tt/2dvygAJ
March 18, 2020 at 09:03AM
How to Scrape SERP with the now free and open source Laravel Scavenger
https://ift.tt/2WkgBDD
Web scraping is nothing new and often times we find ourselves with the need to scrape a few pages. Enter Laravel Scavenger, the package allows you to scrape and save Search Engine Result Pages (SERP) for analysis and processing later. Let’s look at how we can get up and running with this. For this example we will scrape SERP from Bing.
Scavenger can be installed via composer as follows:
composer require reliqarts/laravel-scavenger
After which you must publish the configuration file with the following command:
php artisan vendor:publish --provider="ReliqArts\Scavenger\ServiceProvider" --tag="scavenger-config"
We must create an eloquent model to serve as your scraped entity. We will create a BingResult model with the following migration and class:
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateBingResultsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('bing_results', function (Blueprint $table) {
$table->increments('id');
$table->text('link');
$table->text('description');
$table->integer('position')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('bing_results');
}
}
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class BingResult extends Model
{
}
In your /config/scavenger.php file we need to create a target. We will use this the following for our setup. See: Target Breakdown for a full list of available options.
<?php
$bing = [
'example' => false,
'serp' => true,
'model' => BingResult::class,
'source' => 'https://bing.com',
'search' => [
'keywords' => ['dog'],
'form' => [
'selector' => 'form#sb_form',
'keyword_input_name' => 'q',
],
],
'pager' => [
'selector' => '.sb_pagN',
],
'pages' => 5,
'markup' => [
'__result' => '.b_algo',
'title' => 'h2 a',
'description' => '.b_caption p',
'link' => '__link',
'position' => '__position',
],
];
This configuration tells scavenger to go to bing.com, enter “dog” as a search term and scrape the results from the first 5 pages. In the markup section of the config we explain to Scavenger how each item should be transformed into the different attributes of our BingResult class. Again, these config keys are explained in detail here.
Note: __result, __link and __position are special markup keys which literally refer to the result item, link, and position in the result page list respectively. Meaning the item with __position = 5 appeared 5th in the bing results list.
With this target in place our complete configuration file looks something like this:
<?php
$bing = [
'example' => false,
'serp' => true,
'model' => \App\BingResult::class,
'source' => 'https://bing.com',
'search' => [
'keywords' => ['dog'],
'form' => [
'selector' => 'form#sb_form',
'keyword_input_name' => 'q',
],
],
'pager' => [
'selector' => '.sb_pagN',
],
'pages' => 3,
'markup' => [
'__result' => '.b_algo',
'title' => 'h2 a',
'description' => '.b_caption p',
'link' => '__link',
'position' => '__position',
],
];
return [
// debug mode?
'debug' => false,
// whether log file should be written
'log' => true,
// How much detail is expected in output, 1 being the lowest, 3 being highest.
'verbosity' => 1,
// Set the database config
'database' => [
// Scraps table
'scraps_table' => env('SCAVENGER_SCRAPS_TABLE', 'scavenger_scraps'),
],
// Daemon config - used to build daemon user
'daemon' => [
// Model to use for Daemon identification and login
'model' => \App\User::class,
// Model property to check for daemon ID
'id_prop' => 'email',
// Daemon ID
'id' => '[email protected]',
// Any additional information required to create a user:
// NB. this is only used when creating a daemon user, there is no "safe" way
// to change the daemon's password once he has been created.
'info' => [
'name' => 'Scavenger Daemon',
'password' => 'pass',
],
],
// guzzle settings
'guzzle_settings' => [
'timeout' => 60,
],
// hashing algorithm to use
'hash_algorithm' => 'sha512',
// storage
'storage' => [
'log_dir' => env('SCAVENGER_LOG_DIR', 'scavenger'),
],
// different model entities and mapping information
'targets' => [
'bing' => $bing,
],
];
With this in place it is now time to hop over to artisan and begin scraping our SERP.

In the end Scavenger gives a comprehensive summary:

Our SERP have been successfully inserted into the database:

And, that’s it! ![]()
We have 25 dog-based links scraped from bing on which we may perform any analysis/actions we desire.
programming
via Laravel News Links https://ift.tt/2dvygAJ
March 18, 2020 at 09:03AM
How butterfly wings get blacker than black
https://ift.tt/3d1tEQh

Researchers have figured out the mystery behind ultra-black butterfly wings.
Some butterflies have ultra-black wings that rival the blackest materials made by humans, using wing scales that are only a fraction as thick.
Set against a piece of black construction paper, the wings of the male cattleheart butterfly look even blacker than black.
“Some animals have taken black to an extreme,” says Alex Davis, a graduate student in the lab of Duke University biologist Sönke Johnsen.
The butterflies they study are 10 to 100 times darker than charcoal, fresh asphalt, black velvet, and other everyday black objects. As little as 0.06% of the light that hits them is reflected back to the eye.
That approaches the blackest black coatings humans have made to help solar panels absorb more energy from the sun, or that line telescopes to reduce stray light.

Yet they achieve this light-trapping effect using wing scales that are only a few microns deep, just a fraction as thick as the blackest synthetic coatings.
In a study in Nature Communications, researchers report that ultra-black butterflies from disparate regions of the globe appear to have converged on the same trick.
The secret to making blacks this dark and lightweight, they say, isn’t a surplus of melanin—the pigment responsible for a crow’s feathers or a black cat’s fur. It’s an optical illusion created by the 3D structure of the butterflies’ wing scales.
Light goes into their scales, but very little of it bounces back out.
In the study, the researchers used high resolution scanning electron microscopy and computer simulations to examine the microscopic structures on the wings of 10 species of ultra-black butterflies and four regular black or dark brown butterflies from Central and South America and Asia.

Butterfly wings may look smooth to the naked eye. Up close it’s a different story. Magnified thousands of times, butterfly wings are covered in scales with a mesh-like surface of ridges and holes that channel light into the scale’s spongy interior. There, pillar-like beams of tissue scatter light until it is absorbed.
Until recently, the explanation for the incredible light-absorbing properties of some black butterflies was that it was due to a honeycomb-like pattern in the tiny holes on the scales’ surface.
But the new study suggests “that doesn’t matter,” Johnsen says. Looking at butterflies from four subfamilies—the widest range of ultra-black butterflies that have been examined to date—the team found that other ultra-black butterflies suck up similar amounts of light using holes with a variety of shapes and sizes, from honeycombs and rectangles to a chevron pattern.

It turns out the key differences between ultra-black and regular black scales lie elsewhere. When they looked at the butterflies’ wings under an electron microscope, they found that both ultra-black and regular black scales have parallel ridges on their surface and pillars within. But the ridges and pillars are deeper and thicker in ultra-black scales compared to “normal” black scales.
When the team mimicked different wing scales in computer simulations, scales lacking either the ridged surface or interior pillars reflected up to 16 times more light. That would be like going from ultra-black to dark brown, Davis says.
This 3D architecture is so good at swallowing light that the ultra-black scales still looked black even when coated with gold.

“You almost can’t make them shiny,” Davis says.
Similar deep blacks have popped up in other animals, such as peacock spiders and birds of paradise, which are known to reflect as little as 0.05% of visible light.
None of these natural beauties is quite as dark as the blackest synthetic blacks on record, which absorb more than 99.99% of incoming light using tightly packed “forests” of carbon nanotubes around 10 to 50 microns high. But what makes butterflies interesting, the researchers say, is they rival the best light-trapping nanotechnology, using structures that are only a fraction as thick.
Ultimately, the findings could help engineers design thinner ultra-black coatings that reduce stray light without weighing things down, for applications ranging from military camouflage—for stealth aircraft that can’t be seen at night or detected by radar—to lining space telescopes aimed at faint, distant stars.
Why ultra-black coloration has popped up again and again across the butterfly family tree is still unclear, Johnsen says.
The blackness on the wings of many male butterflies is darker than it is on their female counterparts, so one theory is it helps them show off to potential mates. The black regions always border white, colored, or iridescent patches, so the idea is they might work like a dark picture frame to make the brighter blotches pop.
“Artists have known for a long time that the same color can look very different on different backgrounds,” Johnsen says.
The next step, Davis says, is to figure out how many times butterflies have evolved ultra-black wings, and determine whether those species have anything in common that might help explain what favored the change.
“Why be so black?” Davis says. “We think it’s likely some sort of signal to mates or maybe a predator. But there’s a host of other possibilities, and we’re hoping to clear that up.”
Support for the research came from the Duke University biology department and a Sigma Xi Grant-in-Aid.
Source: Duke University
The post How butterfly wings get blacker than black appeared first on Futurity.
via Futurity.org https://ift.tt/2p1obR5
March 17, 2020 at 02:11PM