PHPnews.io

Overview for 'stitcher-io'

Laravel's HasManyThrough cheatsheet

Written by Stitcher.io / Original link on Nov. 7, 2019

- The current model Country has a relation to Post via User - The intermediate model is linked to the current model via users.country_id - The target model is linked to the intermediate model via posts.user_id - users.country_id maps to countries.id - posts.user_id maps to users.id countries id -…


Can I translate your blog?

Written by Stitcher.io / Original link on Nov. 6, 2019

Yes. Yes you can. I do ask you to keep a few rules in mind. # Host on your own Your translations should be hosted on your own blog. Maybe it's helpful for you to have access to the markdown source files, they can be found here. # Proper attribution You're required to add a link to the original post…


04. Models

Written by Stitcher.io / Original link on Nov. 2, 2019

In the previous chapters, I've talked about two of the three core building blocks of every application: DTOs and actions — data and functionality. In this chapter we will look at the last piece that I consider part of this core: exposing data that's persisted in a data store; in other words: models…


03. Actions

Written by Stitcher.io / Original link on Oct. 26, 2019

Now that we can work with data in a type-safe and transparent way, we need to start doing something with it. Just like we don't want to work with random arrays full of data, we also don't want the most critical part of our project, the business functionality, to be spread throughout random function…


02. Working with data

Written by Stitcher.io / Original link on Oct. 17, 2019

At the core of every project, you find data. Almost every application's task can be summarized like so: provide, interpret and manipulate data in whatever way the business wants. You probably noticed this yourself too: at the start of a project you don't start building controllers and jobs, you sta…


01. Domain oriented Laravel

Written by Stitcher.io / Original link on Oct. 16, 2019

Humans think in categories, our code should be a reflection of that. First things first, I didn't come up with the term "domain" — I got it from the popular programming paradigm DDD, or "domain driven design". According to Oxford Dictionary, a "domain" can be described as "A specified sphere of act…