Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Michael Dyrynda:
Sharing databases between Laravel applications
Apr 13, 2018 @ 09:39:16

Michael Dyrynda has a new post to his site showing the Laravel users out there how to share a database between your applications. In his case one of the applications is a legacy app and the other is a newer Laravel application.

As a contractor, I had a sanitised copy of the database, and I managed to reverse engineer the Eloquent models from the database schema, creating factories along the way, in order to be able to write tests for the members application.

In late 2017, we started migrating our CRM to Laravel as well, in order to modernise the code base a bit, give it a standard structure, and make it easy to make changes to it moving forward. Now that we had two Laravel applications, we started looking at how best to share data between them.

He starts by talking about reverse engineering the models from the database structure and the use of migrations to manage the database schema. In the end he created a stand-alone tool, Nomad, that helps to keep things in sync between the two databases. He includes examples of it in use and how it helped to keep the database in sync despite permissions issues and connection problems. He also mentions how they used it to take care of some testing issues, database configuration changes and how to use it in a continuous integration pipeline.

tagged: share database laravel application nomad tool migration schema

Link: https://dyrynda.com.au/blog/sharing-databases-between-laravel-applications

North Meets South Podcast:
Model accessors, style guides, and Nomads
Jan 30, 2018 @ 09:43:15

The North Meets South podcast, with hosts and PHP community members Jacob Bennett and Michael Dyrynda, has posted its latest episode - Episode #39: Model accessors, style guides, and Nomads.

Jake and Michael return for 2018 and discuss model accessors for relationships, documenting style guides, shared database migrations, and more!

Other topics mentioned in this episode include the Vagabond library, the Pusher service and the Laracon AU conference happening later in 2018 in Sydney, Australia.

You can listen to this latest show either using the in-page audio player or by downloading the mp3 for listening at your leisure. If you enjoy the show, be sure to subscribe to their feed and follow them on Twitter for the latest updates when new shows are released.

tagged: northmeetssouth podcast ep39 model accessor styleguide nomad jacobbennett michaeldyrynda

Link: http://www.northmeetssouth.audio/39