Introducing Claude Managed Agents: everything you need to build and deploy agents at scale.
It pairs an agent harness tuned for performance with production infrastructure, so you can go from prototype to launch in days.
Now in public beta on the Claude Platform.
This 2 hour Stanford lecture on AI careers will teach you more about winning in the AI race than every piece of AI content you have scrolled past this year.
Bookmark this & give it 2 hours, no matter what. It'll be the most productive thing you could do this weekend.
If you use GitHub (especially if you pay for it!!) consider doing this *immediately*
Settings -> Privacy -> Disallow GitHub to train their models on your code.
GitHub opted *everyone* into training. No matter if you pay for the service (like I do). WTH
https://t.co/vcSkhM5yLV
If you're looking for the easiest way to generate API docs for your Laravel application that are also beautiful, try this:
1. Composer require Scribe (knuckleswtf/scribe)
This is an API doc generator that consumes your routes, requests, models, and resources, to auto-generate from
2. Configure Scribe Output
Set the config options `scribe.type` to 'external_laravel' and `scribe.theme` to 'scalar'
3. Run php artisan scribe:generate
The results are very impressive! You get so much for free here, including auto-generation of examples with lots of various programming languages, light/dark mode, search, versioning, etc. Check it out!
Sometimes you need to add or change some root <html> or <body> attributes in a child blade view
Instead of adding yields for each attribute you need to customize, consider using a ComponentAttributeBag in your layout view populated by props given by the child
This lets you add any attributes you like to either tag, and also merge in default attributes that can be appended to or overridden
On Friday, I launched early access to the PHP to Go course. My goal is to assist PHP developers in learning a lovely compiled language. Not to replace PHP, but to supplement it.
Leveraging Go's compiled nature and its concurrency features makes us handle high-traffic endpoints & queues in the most efficient way. Allowing our PHP app to handle other system traffic.
PHP is your dependable, comfortable, safe & simple Mercedes Benz. Go is your sophisticated Formula One car. One doesn't replace the other. But if you have both, boy oh boy, you'd do wonders.
https://t.co/7tzOfAdhE7
Do you need to separate your #Laravel Collection items into two diff ones based on a condition?
Look no further, the partition() method does exactly that in a super easy and simple way! 😎🔥💪
#PHP#PHPC
💡Laravel 9 introduced singleton routes. It’s pretty useful when a user can have only one resource such as a profile. Users don’t have multiple profiles.
It looks like this:
⚡️ Instead of explicitly type-casting or wrapping request parameters, you can use some of Laravel's utility methods on the Request object. It comes with a boolean() helper, date() helper and a string() / str() helper!
I'm giving away five elephpants (in case you didn't know that yet).
Do you wanna get one? I'll pick two random followers who retweeted this tweet next week. Simple 👍
Since Laravel will re-sync a models $original properties after a save(), you can keep a copy of those original properties with a simple trait. This is super useful for determining what a models previous values were in event listeners 👌
In order to avoid hitting the DB multiple times in case of expensive query, you can get all the data in 1 query and then filter the Data at PHP Level.
Partition method of Collection comes handy in such cases. An example below.
🔥 Laravel Tip: Default Models.
In your relationships, you can define default models.
That way if the relationship doesn't exist it will return a default model so you don't have to check if is null every time.
🔥 Laravel Tip: If you have an eloquent collection, and you want to update every model.
You can use the `toQuery` method, and execute the update with only one query instead of looping through the collection.
💡Did you know you can write abstract methods in a trait?
This way you don't have to make assumptions about the models where the trait is used.
But instead, you have a clear contract:
When I start a new project I tackle the hardest features first. The features that I'm scared I may not be able to solve.
If the project is going to fail, I want it to fail fast. I would rather the project fail in the first week vs. fail three months from now. Time saved. ⌛
Blade, the powerful template engine in @laravelphp has some amazing features that will help you save keystrokes and time.
It offers custom directives, if conditions, view components, and much more...
Here are some of my tips 🧵