In this lesson, we will explore the PhpStorm IDE and learn how to customize its appearance and…Laracasts
PhpStorm for Laravel Developers: The Laravel Idea Plugin is a Must
In this episode, we will install and configure the Laravel plugin in PhpStorm, which provides various features…Laracasts
Laravel File Uploads: Save Filename in DB with Folder and URL?
https://laraveldaily.com/storage/423/Copy-of-Copy-of-ModelpreventLazyLoading();-(6).png
When uploading files with Laravel, how to store the filename in the DB? Should you store filename.png
? Or, include the folder of avatars/filename.png
? Or, the full path https://website.com/avatars/filename.png
? Let me tell you my opinion.
This tutorial will have an avatar
field on the register page and an avatar
column in the users
table. Let’s see how we can save it.
The easiest way is to store just the filename and create a separate storage disk.
config/filesystems.php:
return [
// ...
'disks' => [
// ...
'avatars' => [
'driver' => 'local',
'root' => storage_path('app/public/avatars'),
'url' => env('APP_URL').'/storage/avatars',
'visibility' => 'public',
'throw' => false,
],
],
// ...
];
Then, when storing the file we need to specify the new avatars
disk.
app/Http/Controllers/Auth/RegisteredUserController.php:
class RegisteredUserController extends Controller
{
// ...
public function store(Request $request): RedirectResponse
{
$request->validate([
'name' => ['required', 'string', 'max:255'],
'email' => ['required', 'string', 'email', 'max:255', 'unique:'.User::class],
'password' => ['required', 'confirmed', Rules\Password::defaults()],
'avatar' => ['nullable', 'image'],
]);
if ($request->hasFile('avatar')) {
$avatar = $request->file('avatar')->store(options: 'avatars');
}
$user = User::create([
'name' => $request->name,
'email' => $request->email,
'password' => Hash::make($request->password),
'avatar' => $avatar ?? null,
]);
// ...
}
}
This way, your full URL filename https://website.com/storage/avatars/filename.png
consists of three things:
-
Domain:
https://website.com
is stored in yourAPP_URL
in.env
file: so it is flexibly different for your local and production servers -
Folder:
/storage/avatars
is in theconfig('disks.avatars.url')
which corresponds to the internal structure of/storage/app/public/avatars
described in the same config file. Both also can be flexibly changed if needed. -
Filename:
filename.png
is the only thing actually landing in the DB column
To get the URL for the image in the Blade file, we would use URL method on the Storage
facade providing the disk.
<img src="" alt="" />
But what if, after some time, you would need to go from local disks to, let’s say, Amazon S3?
The only change you would need to make is to change the disk, and maybe instead of the url
, use the temporaryUrl
method to provide the expiration time for the link.
<img src="" alt="" />
Laravel News Links
Tucker Carlson just spent 13 minutes unloading ???? on the Bidens after Hunter’s tax indictment and it is soothing to the soul
https://media.notthebee.com/articles/6491fda648dd96491fda648dda.jpg
Tucker’s gonna Tucker. Grab that ????
Not the Bee
How A 120mm Tank Round Works
http://img.youtube.com/vi/gJz8cVUvYws/0.jpg
Here’s something informational for Sunday, Nicholas Moran explaining exactly how a modern 120mm (AKA 120×570mm NATO, the type used by the M1A2 Abrams and the German Leopard 2) APFSDS round works.
the big boom.”
Here’s another video that provides a visualized simulation of how APFSDS rounds work.
Lawrence Person’s BattleSwarm Blog
LOL: “If straight teachers acted like ????️???? teachers”
https://media.notthebee.com/articles/648de38903ec2648de38903ec4.jpg
I really really hope this lady is actually a teacher.
Not the Bee
Must see: Watch this beautiful shot of a bald eagle grabbing and devouring a fish without skipping a beat
https://media.notthebee.com/articles/648cb2fc3ae39648cb2fc3ae3a.jpg
Nothing here but power and majesty.
Not the Bee
Watch: Elk hunter in Idaho faces down mountain lion that tried to get the jump on him ????
https://media.notthebee.com/articles/648c8c87d755b648c8c87d755c.jpg
This is one of the most frightening videos I have ever seen.
Not the Bee
These $20 Welding Gloves Will Make You a Campfire Hero
https://s3.us-east-1.amazonaws.com/images.gearjunkie.com/uploads/2023/06/welding-mitts-scaled.jpg
It never fails. Every time the sun goes down and I pull out my mitts, somebody laughs out loud and asks, “What the hell are those?!” And every time I tell them, they scoff and shake their head. Another non-believer.
It’s OK — I know that before this fire burns down to ash, they will don these dirty old mitts over and over again. And inevitably they’ll admit, “I was wrong. These are awesome!”
I’ve seen it happen enough times to know, this is the way. And truth be told, I really do not recall why I wanted a pair of welding gloves in the first place. I’m not a metal worker, and I can’t say I’d ever used such burly hand protection in the past. All I know is that one year, I received a pair of gloves — this pair — as a gift, and I knew instantly they were destined for the campsite.
Now, I will pass this wisdom, this secret, to you. These $20 mitts will give you more value than your favorite tent, headlamp, or sleeping bag. And they will add more fun to your campouts to boot!
What the Heck Are Welding Gloves?
Before I get too deep into extolling the virtues of welding mitts, you probably need to know what exactly I’m talking about. Welding gloves, aka fire mitts, aka (my favorite) forge gauntlets are heavy-duty hand protection that cover the hands and most of the wearer’s forearm.
They’re designed to protect against extreme heat, electric shock, and ultraviolet and infrared radiation. They have nothing to do with Infinity Stones, though you will be tempted to talk like Thanos while wearing them — and rightly so.

These mitts are most often made from animal hide (nature usually does it best), either cow, pig, deer, or elk. The heavier the hide, the more protective the glove, so cow and elk usually offer the most protection.
Vegan alternatives do exist, though I have not personally tried them and therefore cannot attest to their overall performance. Check out the Vegan Foundry for more information if you’d prefer non-animal-derived alternatives.
For the sake of this tribute, however, I will focus on my cowhide leather gauntlets.
Welding Gloves for the Campsite
Let’s get down to (scorching hot) brass tacks: Why am I so hyped on welding gloves as a camp accessory? The long answer is community, togetherness, and making the most of your precious time outdoors — especially in the company of those you hold dear.
But the short answer is fire. More specifically, the god-like power to bend the ferocity and majesty of fire to your will. To the non-glove-enlightened layperson, I’m talking about picking up white-hot burning logs from a veritable cauldron of fire, and moving them about to stoke the flames to your liking.
Let me paint a picture with which you are all too familiar: Your once-mighty campfire has burned down, and only a single, flickering flame laps at a thick log, charred on one side, but seemingly untouched on the other. If only you could turn the wood and feed those hungry embers, your evening under the stars would stretch on into the night — more drinks, more stories, more time.
So you grab the first branch you can find and start fencing with the log, hoping to coax it over with some combination of pokes and swats. Of course, this inevitably ends in the collapse of the delicate, Jenga-like wood pyramid, immediately snuffing out whatever hope of flame remained, casting everyone around the fire pit into the smokey death throes you’ve wrought.
Sound familiar? If only you had a pair of forearm-length welder’s mitts rated to 932 degrees Fahrenheit, you could have simply grabbed the log, turned it over like a half-cooked hot dog, and won the awe of your campmates.
Believe me, I know — I’ve been that hero many times over.
More Than Just Log-Turners
Moving logs around a hot campfire like pieces on a chessboard has proven the most common use for me. But it is far from these gloves’ only application around the campsite.
Seasoned car campers know that a few nights under the stars doesn’t necessarily mean settling for freeze-dried camp meals. A trusty cast iron skillet or Dutch oven is perfectly suited to meal prep over an open fire. But that sizzlin’ hot skillet isn’t gonna pull itself out of the fire — uh oh, did you forget your trout-shaped oven mitts?
Fire gloves to the rescue! Pick up that piping hot pan with one hand or two, by the handle or cradle it from the glowing red bottom — you’ve got the power!
Plus, these thick mitts offer protection from more than just searing heat. Did your Frisbee land in a cactus patch? Gloves. Good lord, what’s that crawling in the tent?! Gloves. Keys fall in deer scat? Gloves.
In just about any scenario where you want your bare hands protected from things that are too hot, sticky, prickly, or creepy, welder’s gloves come in handy.
When you’re ready to level up your campfire game, you can find OZERO welding gloves — or any other brand — at a variety of independent supply stores, giant box retailers like The Home Depot, and online at Amazon for around $20.
No need to thank me. I’m just your average, everyday campfire hero.
The post These $20 Welding Gloves Will Make You a Campfire Hero appeared first on GearJunkie.
GearJunkie
South Korean dude rejects being called racist for hating Little Mermaid: “You keep asking us to watch sh*tty movies”
https://www.louderwithcrowder.com/media-library/why-is-little-mermaid-bombing-in-south-korea.png?id=34131336&width=980
Allow me to admit up front I could be jumping to conclusions. There is a story in the news about a raaaaacist backlash to Disney’s The Little Mermaid. A video of a based South Korean chad is going viral being asked about a raaaaacist backlash to a movie. Perhaps he’s being asked about a raaaaacist backlash to a different movie? If that is the case, allowed me to apologize on behalf of all of us here at the Louder with Crowder Dot Com website.
Now check out my man here.
\u201cKorean explaining why Woke movies are failing so often in South Korea \ud83e\udd14\n\n\ud83d\udd0a\u201d— Wall Street Silver (@Wall Street Silver)
1686862623
That’s nonsense. So you keep asking us to watch the sh*tty movies you make, right? Why do we have to watch them? This has nothing to do with racism, alright? You make a weird movie, and if we don’t watch it because we don’t agree with your agenda, it’s like they’re trying to lecture us, asking "Why don’t you agree?’ But who are they to lecture anyone?"
Hell yeah, brother. You have now become the second most based Asian on all of the Internets. Shout out to #1:
\u201cChina is asshole\u201d— John Henry\u2019s Hammer (@John Henry\u2019s Hammer)
1614298377
The "Western media" in question could be Western journalisming content creators CNN. They posted a piece of content titled "‘The Little Mermaid’ tanks in China and South Korea amid racist backlash from some viewers." The CNN blogger who created the content points out that while having a black Ariel has been "celebrated elsewhere" (like in America, and in… America), a handful of cherry-picked Asian cinephiles disagree with the casting choice.
In the case of South Korea, CNN cites one single person who expressed disappointment on Instagram.
[The Little Mermaid] brought in just 19.5 million yuan ($2.7 million) in its first five days, compared with 142 million yuan (nearly $20 million) for “Spider-Man: Across the Spider-Verse” in the first five days of that film’s opening, according to Chinese box office tracker Endata.
Similar sentiment was found on social media in South Korea. On Instagram, one user wrote that the movie had been “ruined” for them, adding “#NotMyAriel.”
Right. It could be raaaaacist backlash. Or, your movie can get just suck. The Spider-Man: Across the Spider-Verse movie that has made at least five times more money? The lead character has brown skin and the leading lady may or may not be trans.
There are two things at play here. The first is that Hollywood makes movies counting on the Asian market to make them their money. It’s why John Cena had to cuck himself for saying the word "Taiwan." If a movie doesn’t do well overseas, it’s a global failure.
This brings us to point number two. In the woke progressive hive mind, nothing is ever their fault when normies reject the Left pushing an agenda. It can only be the fault of an -ism or a -phobia. It started with the girl Ghostbuster movie in 2016, which looked like a bucket of sh*t from the first trailer. When moviegoers decided not to spend their money on a bucket of sh*t, filmmakers lashed out at the audience. A single YouTube comment from someone who said "the movie ruined their childhood" was used in the marketing to shame people into seeing the movie if they didn’t want to be labeled an -ist.
If you make movies that don’t look like they suck, people will spend money to go see your movie. This isn’t something that needs to be explained.
><><><><><><
Brodigan is Grand Poobah of this here website and when he isn’t writing words about things enjoys day drinking, pro-wrestling, and country music. You can find him on the Twitter too.
Facebook doesn’t want you reading this post or any others lately. Their algorithm hides our stories and shenanigans as best it can. The best way to stick it to Zuckerface? Bookmark LouderWithCrowder.com and check us out throughout the day! Also, follow us on Instagram and Twitter.
Louder With Crowder