It all started 2 years ago, when I found this post on Forrst (archived.org) by Taylor Otwell announcing the release of Laravel 2. I downloaded and tried it. As I was using Codeigniter at the time, I found it quite nice and refreshingly different. However, my job only had PHP 5.2 on its server, so I only tried it locally and didn’t go much further. Then a few months later, he announced version 3 and I gave it more time. When version 3.1 was released, I ended up using it for some personal projects and read through the source code pretty extensively. At that point, I considered myself fairly ‘expert’ in Laravel.
In August of 2012, I was contacted by Packt Publishing to be a ‘technical reviewer’ for Shawn McCool‘s Laravel Starter book. It was a fairly easy thing, and payment was basically just a hard copy of the book and my name/bio in it. When it was released, I was pretty excited to see my name in print. This was my basic reaction.
Shortly thereafter, I was contacted again by Packt with the offer to write a Laravel book, specifically a ‘cookbook‘. It seemed like a daunting task, but I figured it would be a great step in my career, so I agreed. The money isn’t great, but since I’m fairly unknown and payment was guaranteed, I was pretty happy with the compensation.
Packt pumps out tons of niche tech books every month, so they have a solid system set in place. The first step was an outline. I had to come up with chapters, and then ‘recipes’ for those chapters with an estimated page count. At this point, I started to realize that page counts and recipe counts were a pretty big deal to them. They wanted 11 – 12 chapters with 9 or 10 recipes in each. They said it looks good to have ‘over 100 recipes’ on the cover. I struggled a bit at first, since I had done absolutely nothing like this, ever. Eventually, after reading forum posts and seeing IRC questions, I began to get an understanding of what people needed help with. It made the outline process a bit easier.
With the outline complete and approved by Packt, I began working on the chapters. It was actually a lot easier than I first thought. The only real issue I had was how the whole thing was formatted. You get a Word document template, and you’re supposed to format everything with their pre-made styles. Formatting is VERY important to them. Also, everything is supposed to be worded like “and then we do this” or “so our next step is” because I guess it makes the reader feel part of the book or something. Formatting was probably the most stressful part of the initial process.
Chapters 1 to 9 actually went fairly easily. At this point in January 2013, version 4 of Laravel had already been announced, and the beta release was on Laravel’s develop branch on GitHub. Then someone who was doing a technical review asked if this was for version 3 or version 4. Packt asked me about it, and I told them I was working on L3, since L4 was still in early beta. But most people’s best guess was a summer release of L4, and it would be quite a bit different from L3. Packt and I decided it would be best to wait, because the release date for the book would probably be around the time L4 was released… and thus would instantly be irrelevant.
Now, it’s the end of February and I go to Laracon in DC. It was a fun time and I got to meet some excellent people. We also find out that L4 would be released in May. So now, all I needed to do was learn L4. With work and family, it wasn’t very easy to dig that deep into version 4. The source is pretty extensive and relies on a lot of 3rd party libraries. Packt was pretty urgent about wanting the thing finished, so I decided to stick with the original outline, salvage what I could, and just update the syntax for L4. A few chapters needed a major overhaul, like one I wrote about using and creating L3 Bundles or how to include and use Composer in an L3 app. There are some that are still in the book, and work, but are kind of silly to do when using L4… for example, installing L4 as a git submodule. Unfortunately, there are also a couple of DGAF chapters, like 3 separate chapters on using Twitter/Facebook/Linkedin for auth/logging in. I ended up just getting it done and turning it in, and trying to make it as good as it could be. I fell short of the 100+ recipes by 10 or so, and the 300+ pages by about 50. Oh well. By the end of October, the Laravel Application Development Cookbook was officially published. I can now call myself an author.
Now that I’ve actually spent some time with L4 and competed some projects with it, I’m kind of sad that there are certain bits missing. Things like using the Laravel workbench, or creating custom commands, or service providers. I would add, update, or replace a good 20% of the book if I were to re-do it today.
Having said that, I still think it’s worth the money you pay, especially for the hard copy. Even just the ebook is less $ than two of the more popular Laravel ebooks available at the moment, and I think the information contained is just as valid. And while some may not have a great opinion about Packt, I was overall fairly happy with them. I think their focus on page counts and formatting makes the process a little less enjoyable, but they promised a certain payment at various points in the process, and they delivered in a timely manner.
I think Packt is great for an unknown with a decent amount of knowledge on a subject, especially if you’ve never written anything before. Just having a published book on Amazon has opened a few doors for me, and I’ve seen an uptick in blog readers and Twitter followers. Though, if you’re even remotely known for a particular subject, just go to LeanPub… where you would need to just sell 150 books at $20.
In closing… I got my name on a book, I got a nice printed dedication to my wife and kid, and I got a little money. So I’m pretty happy with the experience. I mean, I may never do it again… but I’m happy I did it once.