๐ฉโ๐ป Join our community of thousands of amazing developers!
In our recent projects at Spatie, we've started using a concept called "actions". It keeps our controllers and models skinny. It's a straightforward practice. In this blog post, I'd like to explain it to you. From logic in controllers and models... # Consider you have a Laravel powered blog where you want to publish posts. When a post is published, the app should tweet out the title and link to it. The controller that does that might look like this: class PostsController { public function c...