Top Hosting Providers for PHP and Laravel

https://ashallendesign.ams3.cdn.digitaloceanspaces.com/public/blog/136/Top_hosting_providers_for_php_blog_banner (1)-min.png

Disclaimer: Some of the links in this article are affiliate links. This means that if you sign up using one of my links, I’ll get a tiny kickback that helps to support the blog.

Introduction

It can sometimes be pretty difficult to decide which platform to use for hosting your PHP and Laravel applications. There are a huge number of hosting providers available (with each provider offering an equally huge number of services). So it can be daunting having to decide how and where to host your applications, especially if it’s your first time having to do it.

For example, if you’re a freelance web developer and want to host your small blog (like myself), you’ll likely opt for a completely different hosting option than if you’re a large company with a high-traffic website.

Generally, I like to stick with the most popular options that other developers are using. This usually means if I get stuck with something, it’s more likely that I can reach out to the community for help than if I was to use an obscure hosting platform that no one has ever heard of.

So I made a poll on Twitter and asked the PHP and Laravel community which hosting provider they use for their own PHP projects. I also asked them to comment if they use a provider that wasn’t listed in the poll. I was really pleased to see that we had 1292 votes!

In this Quickfire post, we’re going to take a look at the results of the poll and the most popular hosting providers.

The Tweet

Here’s the tweet that I posted:

The Results

Poll answers chart

The votes were as follows:

  • Digital Ocean – 40.6%
  • AWS – 25.9%
  • Hetzner – 16.6%
  • Other – 16.9%

1. Digital Ocean

According to the poll, the most popular hosting provider for PHP applications is Digital Ocean, with 40.6% of the votes.

I actually use Digital Ocean myself for hosting my Laravel projects (and this very blog you’re reading right now) and I’m more than happy with the service.

Not only do I use their “Droplet” app servers, but I also use their “Spaces” object storage for storing my assets (such as images and videos).

One of the biggest reasons for me using Digital Ocean was that I found it nice and simple to use in comparison to AWS. DevOps and infrastructure aren’t my strong points, and they aren’t something I have a huge amount of interest in. I mainly love to work on code and build cool features. So I chose to use Digital Ocean because I felt like it was really easy to set up and get started.

In particular, it’s even easier to use when you use a tool like Laravel Forge to provision and manage the servers.

Personally, if any developer starting out in the PHP world asked me which hosting provider they should use, I’d probably recommend Digital Ocean. Of course, you may want to use something like AWS once the project starts to grow and you need access to more advanced features. But for a large number of PHP and Laravel projects, Digital Ocean is a great choice.

You can sign up to Digital Ocean and get $200 of credit by using my referral link. Even if you’re not in a position to use it right now, it could be a great chance for you to browse around the Digital Ocean dashboard and see what cool features they have on offer.

2. AWS

The second most popular hosting provider for PHP applications is AWS, with 25.9% of the votes.

In all honesty, I expected AWS to be the most popular hosting provider. I think this is because AWS is so popular in the tech world, and it’s the one that I hear about the most.

AWS is a great platform with a huge range of features. You can use it for hosting your small Laravel blog, all the way up to your large enterprise applications that require complex infrastructure.

I’ve used AWS in the past, but I’ll admit that I found it pretty overwhelming because there’s so much to learn. I think it’s a really powerful tool, but it’s definitely not for the faint-hearted! However, there are some awesome tutorials out there that can help you get started with AWS.

If you pair AWS with Laravel Forge, you can have a really powerful setup for your PHP and Laravel apps. You can have access to the infrastructure and DevOps features of AWS, but you can also have the simplicity of Forge to manage your servers. So it means that most of the time, you’ll be using Forge to interact with AWS and won’t actually need to use the AWS dashboard. As a result, it can make AWS a lot easier to use and give you the ability to scale up your infrastructure if needed.

Similarly, depending on the type of application you’re building, you may also want to pair up your AWS account with something like Laravel Vapor. This gives you the ability to deploy your Laravel apps in a serverless environment which can be really powerful, especially for applications that experience spikes in traffic.

3. Hetzner

Hetzner was the third most popular hosting provider for PHP applications, with 16.6% of the votes in the poll.

Hetzner is a German hosting provider that provides a range of different hosting options (such as dedicated servers, cloud servers, and managed servers). They were founded way back in 1997, so they have a lot of experience in the hosting world!

I’ve personally never used Hetzner itself. However, I have worked on Laravel projects for clients that use Hetzner for their hosting. I never ran into any issues with it, and it seemed to work really well.

From hearing other developers talk about Hetzner, it seems like it’s a great option for hosting your PHP and Laravel apps. In comparison to some other providers, you can often get more performant servers for lower prices. I’ve been hearing it mentioned in conversations more and more recently, so it seems like it might be something for me to check out in more depth at some point.

Laravel Forge also has the option to provision and manage servers on Hetzner. So if you’re looking for a simple way to manage your Hetzner servers, Forge could be a great option.

4. Vultr

Vultr was another popular hosting platform that was regularly mentioned in the poll’s comments.

Vultr is a cloud hosting provider that offers a range of different hosting options. At the time of writing this article, they have 31 worldwide locations, so there’s a great range of options for where you can host your applications.

I’ve never personally used Vultr for hosting real-life applications, but I have given it a spin to see what the experience of using it was like. In general, I found it really easy to use and get set up. You can also provision and manage your Vultr servers directly from Laravel Forge, which is really handy.

You can sign up for Vultr using my referral link and I’ll get a small commission that helps support the blog.

5. Akamai (previously Linode)

Akamai (previously known as Linode) was another popular hosting provider that I saw mentioned in the comments of the poll.

Akamai is a cloud hosting provider that offers a range of different hosting options. They have a huge number of worldwide locations so that you can host your applications in the location that’s closest to your users.

Similar to Vultr, I’ve never used Akamai (or Linode) to host any real-life projects. But I have given it a spin in the past to see what it was like. I found the dashboard interface really easy to understand and use.

Just like with all the other hosting providers, you can provision and manage your Akamai servers directly from Laravel Forge.

You can sign up for Akamai and get $100 free credit to play around with the platform and I’ll get a small commission that helps support the blog.

6. Other

There were also a few other honourable mentions that I saw in the comments of the poll for hosting Laravel and PHP applications. These were:

  • Siteground (for hosting older WordPress projects)
  • Heroku
  • Contabo
  • Upcloud

Limitations

It’s important to remember that these results are by no means a representation of the entire PHP community. The poll was only open for 24 hours and was on Twitter. I’m usually interacting with the Laravel community on Twitter, so I’d probably make a guess that a large portion of the answers were given by Laravel developers.

So there’s a possibility that these results could be skewed towards a certain type of developer. If I was more active in other PHP communities, such as Symfony or WordPress, the results might have looked different.

But I do still think they gave a good indication of the most popular hosting providers, even if the numbers aren’t 100% accurate.

Laravel News Links

Frozen Pizza Factory

https://theawesomer.com/photos/2023/05/pizza_factory_t.jpg

Frozen Pizza Factory

Link

While we prefer fresh-made pizza, a frozen pizza can satisfy hunger in a pinch. Wondastic Tech takes us inside a factory that mass-produces frozen pizzas. First, huge quantities of dough are flattened and cut. One machine squirts out tomato sauce, while others shred mozzarella and drop on toppings. Stick around for a look at a factory that makes honey candies.

The Awesomer

What Is Tubi? The Best Free Streaming Service You’re Not Using

https://static1.makeuseofimages.com/wordpress/wp-content/uploads/2021/04/tubi-free-streaming-service-logo.jpg

When it comes to binge-watching movies or shows, most of us are content to log on to Netflix and work our way through an entire series. Well, there’s another streaming service you should check out—Tubi.

But what exactly is Tubi TV? In short, it’s a streaming service that offers thousands of movies and TV shows—all for free. With a library that includes everything from cult classics to recent Hollywood hits, Tubi TV has quickly become a must-have for anyone looking to stream content for free.

MAKEUSEOF VIDEO OF THE DAYSCROLL TO CONTINUE WITH CONTENT

But how does it work? And what makes Tubi TV stand out? Let’s find out.

What Is Tubi TV?

Tubi is a free streaming service owned by Fox Corporation. It has over 20,000 HD movies and TV shows. Not only this, but it’s also available on every major smart TV platform and all the popular streaming devices.

It features content from major studios, including MGM, Paramount, Lionsgate, as well as independent filmmakers. While it may not have the same buzz or extensive library as its competitors, it’s a great option for those looking for free streaming content.

To get started, you’ll need to sign up for Tubi with your email address or Google account. Next, you can create a watch list of your favorite movies, docuseries, TV shows, and more. You can access the service across Android and iOS devices, desktops, gaming consoles, and on the web as well.

Download: Tubi TV for Android | iOS | Web (Free)

What Content Can You Watch on Tubi TV?

From timeless classics to the latest releases, Tubi TV offers a diverse array of content. From anime series to TV shows to docuseries, it has an extensive library to cater to a variety of user preferences. It’s chock-full of age-appropriate entertainment available to keep kids engaged and entertained.

If you’re into action flicks or crime dramas, comedy or sci-fi flicks—you name it—you can find it on the site. It offers a vast collection of movies spanning various genres, including action, comedy, drama, horror, romance, and so on.

The content itself comes under several categories, including “Cult Classics,” “Award Winners and Nominees,” “Pre-School,” “Kids Shows,” “Highly Rated on Rotten Tomatoes,” and more.

How to Set Up and Use Tubi TV

To get started with Tubi, you’ll need to register for an account. Once you’ve signed in, open the app and hit Browse to bring up the main menu with the list of available titles, sub-categories, or channels.

With an interface similar to that of Netflix, each movie expands into its own viewer. This gives you more information about the film, including reviews, cast, and more. When you find one that interests you, just click it and start watching.

If you have a Roku streaming device or video game console like an Xbox One, just search for the native Tubi TV app using your device’s built-in search function.

In case you haven’t already, you’ll be prompted to create an account with your email address and password before browsing through available channels. You can always access Tubi TV on your web browser as well.

Since Tubi is supported in limited regions, such as the US, Canada, Mexico, Australia, and New Zealand, you can connect to a VPN and connect to US servers to view its content. We recommend checking out these privacy-friendly free VPNs to access geo-restricted content.

If you’re a parent, you can use the Parental controls feature to control what your children can watch on the app. It also allows you to edit how your subtitles appear, so you can customize the caption fonts and sizes to your liking.

Tubi is a tad different from other popular streaming services such as Netflix and Amazon Prime. First off, these services charge a hefty subscription fee for access to content, while Tubi is completely free.

Moreover, Tubi’s selection of titles is unique in that it focuses on providing obscure movies and foreign films that you may not have heard of or seen before.

Thirdly, Tubi TV is widely available across a range of devices, including Roku, Android TV, Amazon Fire TV Stick, Xbox One, Xbox Series S, Xbox Series X, smart TVs, Chromecast, Amazon Echo Show, Google Nest Hub, Blu-ray players, and HiSense TVs. This allows you to watch your favorite content from anywhere as long as you have an internet connection.

Tubi TV: Get a Huge and Free Collection of Movie Titles

While there are plenty of other sites that offer free content, Tubi TV is quickly rising through the ranks as one of the top-rated sites in this space.

Regardless of your streaming preferences, you should keep Tubi at the top of your list. Yes, it has advertising, but unlike other free providers who interrupt programming with ads, Tubi TV can offer content with minimal interruptions and fewer ad loads, which can truly improve your entertainment experience.

MakeUseOf

Let’s build a ChatGPT Plugin with Laravel

https://barreto.jp/assets/images/chatgpt-plugin-with-laravel/7-local-plugin-ip.png

Starting last week (May 12), OpenAI rolled out the plugins for ChatGPT plus users. This means that we can not only use the plugins from their store but also create our own plugins.

In this article, we will go through the process of creating a plugin for ChatGPT using Laravel.
The plugin will be a very simple web browser that will fetch the HTML content of a given URL, but this concept can be applied to any other use case.

Why a browser? Because it’s a simple example.

TL;DR: The code is available at github.com/juampi92/chatgpt-plugin-in-laravel.

Step 0 – Setup

Start by creating a new laravel project

composer create-project laravel/laravel chatgpt-browse-plugin
composer require guzzlehttp/guzzle

We will need the guzzlehttp/guzzle package to make HTTP requests using the Laravel HTTP Client.

Step 1 – Plugin configuration

ChatGPT requires us to have a plugin manifesto. This file is a JSON file that contains information about the plugin, such as the name, description, logo, etc.
We will need to locate it in the following URL localhost:8000/.well-known/ai-plugin.json.

For reasons that will be explained later, we will create the file inside resources/ instead of public.

mkdir resources/.well-known
touch resources/.well-known/ai-plugin.json
{
    "schema_version": "v1",
    "name_for_human": "My Local Web Browser Plugin",
    "name_for_model": "MyLocalWebBrowser",
    "description_for_human": "Plugin for browsing the web locally in the name of ChatGPT.",
    "description_for_model": "Plugin for browsing websites locally and getting their content.",
    "auth": {
        "type": "none"
    },
    "api": {
        "type": "openapi",
        "url": "http://localhost:8000/openapi.yaml",
        "is_user_authenticated": false
    },
    "logo_url": "http://localhost:8000/logo.png",
    "contact_email": "support@example.com",
    "legal_info_url": "http://www.example.com/legal"
}

Notes:

  • If you decide to use a different port, make sure to update the url fields (api.url and logo_url).
  • Also, if you decide to use a different name, make sure name_for_model doesn’t have any spaces.

To make the file available to the public, we need to do two things:

  1. Update the routes in routes/web.php:
Route::get('.well-known/ai-plugin.json', fn () =>
    File::get(resource_path('.well-known/ai-plugin.json')));
  1. Update config/cors.php to have 'paths' => ['*'],.

The reason why we can’t use the /public directory is because
the plugin will be hosted on a different domain and the browser
will block the request due to CORS.
If you intend to host the plugin on a server, you can use
the /public directory and configure apache/nginx to allow
CORS on static files.

Step 2 – Making it browse

Now we need to create the API that will be used by ChatGPT to browse the web.

Let’s create a new controller:

php artisan make:controller BrowseController

And the content of the controller should look something like this:

use Illuminate\Support\Facades\Http;

public function __invoke(Request $request): JsonResponse
{
    ['url' => $url] = $request->validate([
        'url' => 'required|url',
    ]);

    $response = Http::withHeaders([
            'User-Agent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.45 Safari/537.36',
        ])
            ->get($url);

    return new JsonResponse([
        'response' => $response->body(),
    ]);
}

Add the controller to routes/api.php:

Route::get('/browse', BrowseController::class);

Step 3 – API Documentation

In order for ChatGPT to understand how to use our plugin,
we need to generate an OpenAPI specification.
GPT will read the specification and decide when and how to use your endpoints,
so it’s important that the API is clear.

To generate the actual yaml file, we will use the zircote/swagger-php package.

composer require zircote/swagger-php --dev

Now we need to update the Controller using the OpenApi Annotations:

/**
 * @OA\Info(title="MyLocalWebBrowserAPI", version="0.1")
 */
class BrowseController extends Controller
{
    /**
     * @OA\Get(
     *     path="/api/browse",
     *     summary="Get HTML content of an URL",
     *     @OA\Parameter(
     *         name="url",
     *         in="query",
     *         description="URL to fetch the HTML from",
     *         required=true,
     *         @OA\Schema(
     *             type="string",
     *             example="http://example.com"
     *         )
     *     ),
     *     @OA\Response(
     *         response=200,
     *         description="HTML content of the URL",
     *         @OA\JsonContent(
     *            type="object",
     *            required={"response"},
     *            @OA\Property(
     *              property="response",
     *              type="string",
     *              description="Raw HTML content of the URL"
     *           )
     *         )
     *     )
     * )
     */

To generate our OpenAPI specification, we run the following:

./vendor/bin/openapi app -o resources/openapi.yaml

And, for the same reasons mentioned before, add
the following route to routes/web.php:

Route::get('openapi.yaml', fn () =>
    File::get(resource_path('openapi.yaml')));

Step 4 – Serving

To run our plugin, simply call

php artisan serve --port=8000

Step 5 – Installing the plugin

Now that we have our plugin ready, we need to install it in ChatGPT.
When creating a new GPT-4 chat, you can click on the “Plugins” button and then go to the Plugin store.

GPT-4

From there, we go to the Plugin Store, and at the bottom, we click on Develop your own plugin.

Plugin Store

Here we are presented with a form to fill in the domain of our plugin. We input localhost:8000 (if you changed the port, make sure to use the correct one).

Enter Website Domain

If everything went well, you will see the following screen:

Found Plugin

New Plugin Selected

Step 6 – Using the plugin

Now that we have our plugin installed, we can use it in our chat.

ChatGPT will decide when to use your plugin depending on your description and OpenAPI specification,
so in the case of our browser plugin, simply giving a URL will do.

You might be wondering: why not just use WebPilot, the plugin that comes with ChatGPT?

The truth is that you can use WebPilot. The only difference is that
WebPilot uses a hosted server to browse. A server that can be rate-limited by websites, and you can’t customize.

This is an example using WebPilot:
WebPilot IP

And here is with our plugin:

WebPilot IP

Conclusion

In this simple article, we saw how to create a plugin for ChatGPT using Laravel.

If you would like to see the whole code, you can find it here: juampi92/chatgpt-plugin-in-laravel. I added a few more features, like transforming the content into markdown, so there is less content to send to ChatGPT, and so hitting the characters limit less often.

Laravel News Links

DOD Recommends Private Gun Registration, Centralized Storage & Min Age-to-Buy On Bases

https://www.ammoland.com/wp-content/uploads/2019/11/USA-flag-wooden-door-locked-padlock-border-wall-immigration-iStock-fermate-641331942-500×294.jpg

USA flag wooden door locked padlock border wall immigration IMG iStock/fermate 641331942
iStock/fermate 641331942

USA –

“Finding ‘common ground’ with the thinking of evil men is a fool’s errand” ~ Herschel Smith

As we witness our Armed Forces recruitment efforts repeatedly falling drastically short of even minimum maintenance goals, DOD in its infinite wisdom, now cynically manufactures yet another significant reason for young Americans not to enlist!

Under the laughable pretext of “lethal-means reduction,” a new DOD report, “Preventing Suicide in the U.S. Military: Recommendations from the Suicide Prevention and Response Independent Review Committee” [embedded below], consists of a demand for active-duty troops to “register” all privately-owned guns, even those troopers who are in possession of valid, state-issued CCW permits.

This will, of course, immediately bring about a demand on the part of “woke” base commanders that all privately-owned guns (now “registered”) be subsequently removed from homes (on-base or off) of troopers, including officers and NCOs, and locked-up “for safe-keeping” within a base armory.

Of course, rightful owners will never see their guns again!

Another part of this impending new policy is that “twenty-five” is to become the new minimum age for any Soldier, Sailor, Airman, or Marine to privately own any kind of gun, again, even when the trooper already has a valid CCW permit!

So, we put into the hands of eighteen-year-olds automatic weapons that we don’t teach them to use (because they’re all too busy attending “transgender sensitivity” classes), and then prohibit them from obtaining, nor training with, their own weapons.

Even when troopers reach the age of twenty-five (in the unlikely event they’re still around), guns that they do privately own they can’t keep with them, as all guns must be locked-up and under the control of the base commander.

At this rate, few you recruits will be joining up. Fewer still will re-enlist.

It makes one wonder whom DOD is really working for!

“Where there is trust, no proof is necessary. Where there is none, no proof is possible.”

/John

Preventing Suicide in the U.S. Military: Recommendations from the Suicide Prevention and Response Independe..


About John Farnam & Defense Training International, Inc

As a defensive weapons and tactics instructor, John Farnam will urge you, based on your beliefs, to make up your mind about what you would do when faced with an imminent lethal threat. You should, of course, also decide what preparations you should make in advance if any. Defense Training International wants to ensure that its students fully understand the physical, legal, psychological, and societal consequences of their actions or in-actions.

It is our duty to make you aware of certain unpleasant physical realities intrinsic to Planet Earth. Mr. Farnam is happy to be your counselor and advisor. Visit: www.defense-training.com

John Farnam
John Farnam

AmmoLand Shooting Sports News

Shred It: Shooting Paper Targets Provides Important Feedback

https://cdn.athlonoutdoors.com/wp-content/uploads/sites/6/2023/05/shooting-targets-03.jpg

All of us have met people at shooting ranges, gun shops or gun shows who love to give advice about the best handgun, cartridge or ammo. But have you ever seen anyone extolling the virtues of “the best” paper targets for shooting? I can count the times I have on one hand in the 60-plus years that I’ve been shooting.

Are Paper Targets an Important Aspect in Shooting?

The simple fact is that except for matches that require specific paper targets like IDPA and bullseye, targets are usually considered to be the least important aspect of shooting if they’re considered at all.

Most of us just focus on placing our shots into small groups no matter what the target looks like? This kind of thinking led to the development of “Center Mass” silhouette targets. Unfortunately, the center of mass in the human body is just above the spleen.

A wound in this area is serious and might eventually be fatal. But it’s not the most likely hit to cause rapid incapacitation. Therefore, target practice and tactical training are not at all about putting every shot in the middle of the target. They’re about putting shots where they will be the most effective.

Getting Started

There’s a process for learning how to do this. And it doesn’t exclude using bullseye targets and other targets that have scoring rings as first steps. After all, the good old bullseye is very useful for sighting in a new gun and building basic skills.

All new shooters need to build competence, and targets that have scoring rings or zones provide an important way of tracking a new shooter’s progress toward acquiring essential shooting skills like sight picture, grip, and trigger press.

The B-27 target used to be a popular police training and qualification target. But its 10 and X-rings are too low to indicate the best shot placement for quick incapacitation.

As the new shooter develops higher scores, self-confidence increases. This is critically important for using handguns for both self-defense and hunting.

This first stage in building competency with firearms begins with the shooter standing 5 to 7 yards from the target. As the trainee progresses, then he or she can move farther back. At the same time, it’s possible to see how well the shots are grouping.

If the center of the groups are consistently different than the trainee’s point of aim, a “correction” target like Thompson Targets’ “Group Shooter” can be very effective. It will immediately indicate any problems in aim, grip, or trigger press so that appropriate corrections can be made.

Targets like the Thompson Group Shooter help improve shooting accuracy.

Once the shooter displays competence at the distance he or she believes he or she will be shooting, it’s time for handgun hunters and tactical shooters to move on to targets that impart more specific skills.

Targets with Multiple Aiming Points

One example is the targets that have multiple aiming points, like the IQ target from RE Factor Tactical. These help shooters see the whole target rather than just focus on the center.

The IQ target has squares, triangles, and circles randomly numbered from 1-3 or randomly labeled A, B, or C. In addition, the squares, triangles, and circles are randomly colored blue, green, yellow, red, or white. There is no pattern to how the individual shapes, colors, letters, or numbers are displayed on the target. This makes the level of difficulty even higher.

I begin shooting this target with my eyes closed and the gun at low ready pointed at the berm, and my trigger finger in the register position off of the trigger. Then I simply say to myself, “Shoot all triangles,” or “Shoot the green number 3 targets,” etc. At the start signal from my Competition Electronics shot timer, I open my eyes and engage the target.

The author incorporates IQ targets in his shooting practice.

It’s not as easy as you might think. As an aside, nationally recognized trainer John Holschen has used this type of target to successfully train shooters to hit moving targets. One word of caution, however, be sure to ask the Rangemaster if the range you’re using is designed for the use of targets with multiple aiming points.

Tactical Targets

When training for self-defense, the targets available today allow for a three-step approach. Step one is a silhouette target with scoring areas that have different values and different colors. This makes it easy to identify where shots need to be placed to produce a high likelihood of incapacitation.

Once again, it’s best to start closer to the target and gradually move back to get an idea of the trajectory of the ammunition you’re using. Especially when shooting a large format pistol like those based on AR, AK and sub-machinegun platforms. These often have a 3-inch offset between the line of sight and the line of the bore.

Photographic Targets

After becoming familiar with shooting silhouettes, the shooter can progress to photographic targets. There are two types. The first has lightly drawn scoring zones, and the second has no scoring zones whatsoever.

Given that I’ve had quite a bit of training, I prefer to shoot those that do not have any scoring zones. This requires me to visualize and rely on anatomical landmarks to locate the vital zones.

Photographic targets open a whole new level of skills development. They normally have at least one armed individual presenting a threat. But these targets can get quite a bit more complicated and difficult to shoot.

The assailant in the target can be in a bladed stance or may be partially obscured by cover or concealment. So, you need to visualize very carefully. The armed offender may have an armed partner. So, which one do you shoot first? The guy with the shotgun or the one with the pistol who is closer to you?

This target waiting in ambush was repeatedly defeated as the author practiced precision shooting.

Or how about the would-be assassin who has his finger on the trigger and a gun pointed at an innocent party? In addition, what if there is a no-shoot target who is partially obscuring the armed offender? Then there’s the target that depicts an armed assailant who’s partially behind cover.

And there are a variety of targets depicting situations that cause the person shooting in self-defense to exercise good judgment. Furthermore, if the trainee has access to action bays with side berms like those at the Flagler Gun Club, you can use movable target frames and stackable plastic barrels to combine multiple targets and obstructions, creating complex tactical problems to resolve.

Use a shot timer to create a sense of urgency. It’s about as close as you can get to force-on-force training by using paper targets.

Hunt/Survive Targets

Those who hunt for recreation and for subsistence/survival purposes have a wide variety of targets for building their competence in taking North American big and small game.

There aren’t as many articles today about hunting and long-distance shooting with handguns as there were when Bob Milek, Steve Herrett and Elmer Keith were alive. However, handgun hunting articles and columns do appear in some gun magazines. And there are still a number of handgunners who hunt with their handguns and shoot in metallic silhouette matches.

In addition, there are hunters and hikers like myself who have regularly carried large bore or magnum handguns loaded with deep penetrating ammo and/or snake loads when out and about in the woods, swamps, and deserts.

My one complaint about targets depicting game animals is that many of these paper targets have either scoring zones or aim points printed on the front. I would prefer that they have scoring zones printed on the back of the target. Because animals encountered while hunting rarely offer broadside shots.

The deer target from Thompson Targets and varmint target from Birchwood Casey teaches novice hunters to learn where the quick incapacitation “ball” lies in a game animal.

Visualizing Vitals

Because of this, while practicing on game targets, it’s important to develop skills in visualizing where the vitals are from various angles. One of the best ways I’ve seen is the “ball” method.

Imagine the vital areas as a ball that rests just inside the chest cavity. Make sure that the size of the ball is appropriate to the size of the game you’re hunting. And then fire your shot so that it passes through the center of the ball. If you hunt reptiles, on the other hand, the ball is often very small and is located just behind the eyes.

Another method used when hunting four-legged mammals is to aim for the shoulder that is farthest from you. Usually, a shot for the far shoulder passes through at least part of the vitals ball. Then it moves on to limit the animal’s mobility. This is especially good for quartering shots taken by hunters using hard-cast semi-wadcutter or other bullets that penetrate deeply.

Regardless of the type of bullet chosen, the hunter should eventually use a target without scoring zones on its front. Because it forces the hunter to use anatomical landmarks as aiming points. As much as we might wish, there are no X-rings on game animals.

Respect The Paper

Targets are so much more than something you punch holes in. They’re valuable educational tools for maintaining perishable shooting skills, sharpening those skills, and developing new ones.

Given today’s rate of inflation, a lot of us won’t have the disposable income to acquire 500-1,000 rounds of ammo and pay up to $2,000 for travel and fees to attend shooting schools on a regular basis.

However, by properly using paper targets that depict hunting or tactical scenarios, we can do much to affordably preserve the skills we may have learned from professional trainers. Likewise, we can develop further skills in solving the types of potential threat scenarios that may exist in the communities where we work and reside.

For more information, please visit ActionTarget.com, BirchwoodCasey.com, ChampionTarget.com, RefactorTactical.com, and ThompsonTarget.com.

This article was originally published in the Combat Handguns July/August 2022 issue. Subscription is available in print and digital editions at OutdoorGroupStore.com. Or call 1-800-284-5668, or email subscriptions@athlonmediagroup.com.

Didn’t find what you were looking for?

The post Shred It: Shooting Paper Targets Provides Important Feedback appeared first on Personal Defense World.

Personal Defense World

Bungie revives ‘Marathon’ as a multiplayer shooter

http://img.youtube.com/vi/6y-e2krA3uE/0.jpg

What do you think Bungie would do for its first non-Destiny game in over a decade? A return to the franchise that helped make it a gaming giant, of course. The developer has unveiledMarathon, a follow-up to the classic first-person shooter series for Macs. This isn’t a sequel or remake, mind you. Instead, it’s a multiplayer "extraction shooter" that has mercenary Runners exploring a lost colony.

While there’s no single-player component, game director Chris Barrett says this will still "feel" like a Bungie game between the mechanics and rich universe. Player actions will also influence the plot — you might find an artifact that unlocks an area for all players. There are persistent zones and seasons, although we wouldn’t expect a repeat of similar elements in Destiny.

Marathon is in development for PC, PS5 and Xbox Series X/S. While there isn’t much more to share at this point, Bungie says the next update will be "much closer to launch" and include gameplay. It’s safe to say there’s a lot riding on this title. It’s proof that Bungie isn’t content to iterate on Destiny forever, and will show what the company can do with a multiplayer-only experience. And for old-time fans, this is a chance to return to a beloved franchise 27 years later.

This article originally appeared on Engadget at https://www.engadget.com/bungie-revives-marathon-as-a-multiplayer-shooter-212630605.html?src=rssEngadget

Laravel 10 Eloquent Mutators and Accessors

https://coderadvise.com/wp-content/uploads/2023/05/Laravel-10-Eloquent-Mutators-and-Accessors.jpg

Laravel 10 Eloquent Mutators and Accessors

The mutator modifies the value before inserting it into the database, while the accessor modifies the value after fetching it from the database. Mutator and accessor can be defined in the same method.

Let’s suppose, the customer’s name should be stored in lowercase and displayed in Pascal case (with space) even if the customer puts a name with capitalized letters. To do that, we will need to use a mutator and accessor in the Model. The mutator will be converting the customer name into lowercase before inserting it in the database and the accessor will be converting it into Pascal case before displaying it.

You can define a mutator and accessor in the Model file in the app/Models directory. We added two additional columns first_name and last_name into the users table through migration. By default, Laravel creates a name column in the users table.

Mutator

The Mutator allows you to modify the value before inserting it into the database. For example, if you want, the first and last should always be stored in lowercase in the database then mutator is the best way to do it.

Define Mutator:

To define a mutator it is necessary to create a method using the column’s name written in the camel case. Let’s take an example: if the column name is first_name then the method name should be firstName().

In the earlier versions of Laravel, it is required to add a set at the beginning of the method and an attribute keyword at the end of the method. But in Laravel versions 9 and 10 it is no longer required.

Let’s create a mutator for the first_name column in the User model class from app/Models directory.

Before adding the above mutator method in the model class make sure the Attribute class is imported. You can import the attribute class through the below namespace

use Illuminate\Database\Eloquent\Casts\Attribute;

protected function firstName(): Attribute
{
    return Attribute::make(
        set: fn (string $value) => strtolower($value),
    );
}

The above mutator method will be converting the value of the first_name column into lowercase before inserting it into the database.

In this method, we used the make() method of the Attribute class that takes two optional parameters get and set. We passed a callback function to the set parameter that takes a string and converts it into lowercase through PHP built-in function strtolower().

Now look at the below profile update form where the first name is in capitalized letters that should be inserted in the lowercase through the mutator.

Let’s check the inserted row in the database.

In the above screenshot of the users table the first_name value is inserted in lowercase.

Accessor

The accessor allows you to modify the value before being accessed. To define an accessor, similar to a mutator, it is essential to create a method using the column’s name in the camelcase.

Define Accessor:

Let’s create an accessor for the first_name column that should capitalize the first letter of each word.

protected function firstName(): Attribute
{
    return Attribute::make(
        get: fn (string $value) => ucwords($value),
    );
}

In the above accessor method, we used the make() method from the attribute class in which we passed a callback function to the get parameter. The callback function takes the value and converts capitalize the first letter of each word through the PHP built-in function ucwords().

To check if the accessor is working, we can print the first_name column’s value in the controller.

echo $request->user()->first_name;
// Output: Emily

As you can see the first_name value “Emily” is stored in the lowercase through the mutator, but in the controller accessor capitalized the first letter.

Accessor and mutator can be defined in the same method. Look at the below method in which we defined the accessor and mutator together.

protected function firstName(): Attribute
{
    return Attribute::make(
        get: fn (string $value) => ucwords($value),
        set: fn (string $value) => strtolower($value),
    );
}

Related Posts

Laravel News Links

Making $65 per Hour on Upwork with Pandas

https://blog.finxter.com/wp-content/plugins/wp-youtube-lyte/lyteCache.php?origThumbUrl=https%3A%2F%2Fi.ytimg.com%2Fvi%2FPJcJGWP8WH4%2F0.jpg

4/5 – (1 vote)

Pandas, an open-source data analysis and manipulation library for Python, is a tool of choice for many professionals in data science. Its advanced features and capabilities enable users to manipulate, analyze, and visualize data efficiently.

????‍???? Recommended: 10 Minutes to Pandas (in 5 Minutes)

YouTube Video

In the above video “Making $65 per Hour on Upwork with Pandas” ????, the highlighted strategy is centered on mastering this versatile tool and effectively communicating its benefits to potential clients. A key fact to remember is that Pandas is highly valued in various industries, including finance, retail, healthcare, and technology, where data is abundant and insights are critical.

For a freelancer, proficiency in Pandas can command an hourly rate of $65 or more, even if it’s just a side business to add an additional and independent income stream.

But it’s not just about the tool; it’s about showcasing your ability to drive business value.

???? Recommended: Python Freelancer Course – How to Create a Thriving Coding Business Online

Highlighting case studies where you’ve used Pandas to extract meaningful insights or solve complex business problems can significantly boost your profile’s appeal.

As for project bidding, understanding the client‘s requirements and tailoring your proposal to highlight how your Pandas expertise can meet those needs is vital. Negotiation, too, plays a critical role in securing a lucrative rate.

Mastering Pandas and marketing this skill effectively can unlock high-paying opportunities on platforms like Upwork, as demonstrated by the impressive $65 per hour rate (for a freelancer with very little practical experience). This reinforces the importance of specialized skills in enhancing your freelancing career.

???? Recommended: What’s the Average Python Developer Salary in the US? Six Figures!

Be on the Right Side of Change