Learn JavaScript with Wes Bos

Wes Bos just launched his latest course — Beginner JavaScript. In this premium video course you’ll learn modern JavaScript from scratch:

A rock solid understanding of JavaScript is essential for success, no matter which framework you use. This course will give you that.

JavaScript is hard to learn. Frustration, abandonment and rage quits all stem from trying to use something when we don’t understand how things work.

Being able to make your ideas is a super power. Invest in a solid base and you’ll slam dunk anything that comes your way.

Beginner JavaScript comes with 85 videos over 15 modules, and you learn to build a few apps along the way. Here’s are some of the things you can expect to learn in this JavaScript course.

JavaScript Basics

  • Browser, Editor and Terminal Setup
  • Running and Loading JS
  • Variables and Statements
  • Code Quality Tooling with Prettier and ESLint
  • Types – Strings, Numbers, Objects, null and undefined, Booleans and Equality
  • Functions – Built-in, Custom, Parameters and Arguments
  • Different Ways to Declare Functions
  • Debugging Tools
  • Scope, Hoisting, Closures
  • The DOM
  • Objects, Maps, Arrays
  • Prototypes – new, this, inheritance
  • Prototypes and Prototypal Inheritance
  • The Event Loop and Callback Hell
  • Async, Promises, Ajax, API’s

This course is 100% beginner-friendly. No JavaScript experience required. Basic HTML and CSS knowledge is assumed. It’s designed to be skip-able too, so if already know something, skip that lesson or segment, or jump around to what most interests you today and come back to the rest. later.

This course is jam-packed with JavaScript knowledge and it’s perfect for learning it from scratch or for brushing up on your skills. Having been through other courses that Wes offers I can say he is an excellent teacher and you’ll definitely learn a lot.

Pick up Beginner JavaScript today and save 50% as part of his Black Friday sale.

The links included are affiliate links which means if you decide to buy Laravel News gets a little kickback to help run this site.

Laravel Up and Running Second Edition

Matt Stauffer announced that his book Laravel Up and Running Second Edition is available in ebook format, and the print book should ship some time in mid-April 2019.

If you’re a capable PHP developer looking to learn Laravel for the first time, a novice Laravel developer looking to level up, or an experienced Laravel developer looking to learn a few new tricks, this book is for you. It’s clear, concise, and will get you up and running creating powerful and flexible apps in Laravel in no time.

Laravel Up and Running Second Edition has been updated to cover the latest version of the Laravel framework, Laravel 5.8, and covers Laravel 5.1-5.8 noting features that were added since v5.1.

You can purchase the ebook version on both Amazon and Apple Books:

You can also preorder the paperback version of the book on Amazon now, and according to the Amazon, it will be released on May 3rd.

You can learn more about the details of the book including the chapter outline on laravelupandrunning.com.

Announcing Building a Chatbot with Laravel and BotMan

Bots are the tools of the future, and they can be used for everything from customer support, all the way to offering productivity tools like scheduling or reminders. Many people live inside their messaging app of choice which makes bots feel comfortable, and a perfect fit for reaching them.

Today, we are happy to announce a brand new book, Building a Chatbot with Laravel and Botman, that is written by Joe Dixon the founder and CTO of ubisend, a company specializing in bot development.

“I’ve been building chatbots for over two years. Being a brand new technology, there was very little in the way of best practice available when I started, and I still feel that to be the case now.”, Joe said on the reason he wanted to write this book, “I want to help those who don’t know where to start.”

Chatbots are taking the world by storm, and Gartner Research is estimating that by 2020, the average person will have more conversations with their bot than with their spouse.

As a developer, it would be great to have the skills needed to build custom bots, and this book walks you through a tutorial to create your own chatbot. You’ll learn how to effectively plan, build, test and deploy your very own chatbot while covering the core concepts of chatbot development.

Buy the book now through Sunday for the special launch price of $15! Get ahead of the curve and learn how to build a chatbot today, using the tools you already know.

Buy Now

Review: Refactoring to Collections

“Never write another loop again.” A strong promo sentence used by Adam Wathan to market his Refactoring to Collections book, but does it hold the promise? Well, together we will explore how close that claim is to reality.

If you are a Laravel developer, chances are you’ve heard about the collection pipeline before. While I use it a little in my projects I hadn’t realized the possibilities of this approach until I read Refactoring to Collections. It brought me to another level of thinking about utilizing the power and capabilities of functional programming.

Imperative Versus. Declarative Programming

At the beginning of the book, Wathan discusses the difference between imperative and declarative programming and why he prefers the declarative approach. Instead of writing your code in an imperative way (using intermediate variables, loops, conditional statements, and focuses on implementation details) Adam advises you to take a look at the opposite style which focuses on telling the computer what we need it to accomplish instead of caring about implementation details.

Take a look at the following example:

// Imperative Programming
function getUserEmails($users)
    $emails = [];

    foreach ($users as $user) {
        $emails[] = $user->email;

    return $emails;
// Declarative Programming
function getUserEmails($users)
    return $users->map(function ($user) {
        return $user->email;

Notice how we didn’t need to use loops or intermediate variables in the declarative programming way? Of course, this is a very simple example to show you the basics; the book covers far more complex and useful examples.

The Journey

Refactoring to Collections outlines higher-order functions and their usefulness. It also covers some fundamental higher-order functions like Each, Map, Filter, Reduce, etc. and their implementation.
Wathan has also done a good job explaining when to use one higher-order function over another. He gives you some good indicators to help you choose which higher-order function will best meet your needs.

Next, the book discusses the problem of “inside-out” code, the difficulty of reading it, and introduces you to the solution: the collection pipeline which reads from left to right.

In one of my favorite parts of the book, Wathan goes through an implementation of the simple Collection class and makes it possible to use collections in place of arrays and make them countable.

The last part of the book is a walkthrough in a lot of practical examples. Wathan does an awesome job at choosing real-world problems you may encounter in your apps and shows how to solve these problems by using imperative programming, then refactor the solution to declarative programming to show you how declarative programming will make your code more simple and easy to read.

Also, all of the examples are provided as screencasts so you can see Wathan refactor and solve the examples problems step by step, which is my preference.

Honestly, while I advanced through the examples of the book, I was amazed by the process Wathan invented for solving these problems, and I’m sure you will also be surprised by the advanced nature and complexity of the examples.

A Lot to Learn

The nice thing about this book is that you will have a lot to learn, not just about collections. Personally, I learned some great refactoring techniques, and even some PHP tricks, like using forEach to iterate over object public properties.

Even if you aren’t a PHP developer, you can learn from this book as its concepts can be applied to other languages easily.

As always, with any programming skill, you must practice these new ways and techniques and make it part of your everyday workflow to make it click and stick with you. Luckily, the book comes with exercises divided into three categories: Beginner, Intermediate, and Pro to practice what you learned. The solutions for these exercises are included so you can compare them with your solutions and benefit, my advice is not read the solutions until you try to solve the exercises by yourself as the practice a key way can’t be avoided in learning new programming skills.


Another wonderful aspect of the book is the amount of effort Wathan has put into every aspect, from the easy to understand writing style to divide the problems into steps and tackling them one by one to achieve the final solution. The quality of the screencasts and seeing Wathan do the refactors live will give you a pleasurable learning experience.

Also, in many examples, I appreciated the effort Wathan put into searching other languages for collection pipeline methods to reach the optimal solution and implement these methods in PHP like he did with the chunkBy and sliceBefore methods.

Even the overall style of the book—the fonts and syntax highlighting color scheme for code blocks—were great choices.

He also created his own Markdown syntax and processing layer for syntax highlighting lines in code blocks and pointed out specific pieces of code to draw the attention to it and gray out the remaining lines.

Here is an example from the book, notice the syntax highlighting and grayed out lines:

And take a look at the beautiful diffs he uses to show the changes happening to code blocks:

I like it!


The first hope is PHP accepting the Arrow Functions RFC, which will make using the collection pipeline style easier and more beautiful.
Take a look at this example:

// Before
function getUserEmails($users)
    return $users->map(function ($user) {
        return $user->email;

// After
function getUserEmails($users)
    return $users->map(fn($user) => $user->email);

Another hope is for Refactoring to Collections to be updated to reflect the new changes introduced to the Laravel framework after the publication of the book. For example, the book talked about how to implement a collection pipeline method called pipe, but a pull request for this method was merged in Laravel, so it would be better to reflect this update and mention it in the book.

The book could also be updated to reflect the new higher-order messaging for the Collections feature which was introduced in the Laravel 5.4 release; it will make the book code examples look more intuitive and more beautiful.

Take a look at this example:

// Before
$employees->reject(function($employee) {
    return $employee->retired;

// After using Higher Order Messaging for Collections

Much better!

And, if there was a price drop for at least in the first two packages of the book, that may encourage more developers to buy it.

Refactoring to Collections has three tiers of pricing. The Bare Essentials package which includes the book and exercises at $39. The Premium Training Package which includes the screencasts at $79. The Complete Reference Package which includes the source code of an example Laravel application called Nitpick CI at $179.

That’s it; if you want to learn a new nice way of programming that’s easier to read and more expressive to a look at Refactoring to Collections.

Review of Test-Driven Laravel

I’ve been programming for close to a decade, and I’m constantly trying to find ways so to improve my skill set to be able to keep up with the ever-changing landscape of technology. The one area I’ve always wanted to improve in has been testing.

I’ve joked on Twitter about using my HasAdamWathanOnTelegramForSupport trait to get help with things that were tricky to test. So when Adam announced at Laracon that he was creating a course on building real-world applications with TDD, I was really excited to see where it would go.

Over the past couple of months, I’ve been lucky enough to preview the course as the lessons get finished. It’s been really helpful because I’ve been working on a large, complex application, and I’ve been able to apply the things I’m learning immediately in my day-to-day work.

I’ve learned so much from this course already; everything from what tests to write first, how to refactor my tests to make them faster, starting new features with a failing test, and simplifying my tests with factories and states. The most helpful part so far has been learning how to add test coverage for the parts of my app that need to communicate with external services, such as Stripe. At this point, I’m comfortable enough writing tests that I’m actually adding new features to my project test-first, before writing any actual code.

But I’ve also learned about more than just the mechanics of testing. I’ve learned how to evaluate my code and find ways to improve it through refactoring. If you’ve seen Adam’s talk Chasing “Perfect”, imagine that level of detail applied to an entire app. I’ve learned a lot about testing from the course, but I’ve learned just as much about writing well-designed object-oriented code. It’s definitely a course on building applications with TDD, not just a course on testing.

Test-Driven Laravel has been a game changer for me, and I’m looking forward to watching the rest of the lessons as they become available. But I’m even more excited for everyone else to get their hands on the course, so we can all get better at testing as a community.

New Book: Laravel Up and Running

Matt Stauffer who has been blogging about Laravel since the 5.0 release, the host of the Laravel Podcast, and partner and technical director at Tighten.co has been working on a new Laravel book, Laravel: Up & Running, published by O’Reilly.

Here are a few of the topics this book covers:

  • Blade, Laravel’s powerful custom templating tool
  • Tools for gathering, validating, normalizing, and filtering user-provided data
  • Laravel’s Eloquent ORM for working with the application’s databases
  • The Illuminate request object, and its role in the application lifecycle
  • PHPUnit, Mockery, and PHPSpec for testing your PHP code
  • Laravel’s tools for writing JSON and RESTful APIs
  • Interfaces for file system access, sessions, cookies, caches, and search
  • Tools for implementing queues, jobs, events, and WebSocket event publishing
  • Laravel’s specialty packages: Scout, Passport, Cashier, Echo, Elixir, Valet, and Socialite

It’s available today as an e-book from O’Reilly and the paperback version will begin shipping in a few days. You can pre-order today from Amazon.

With the book now complete and heading off into printing I had the opportunity to ask Matt a few questions about the book and his experiences as a first-time author.

How excited are you now that the book is complete and ready to start shipping?

Eric. My friend. I started writing this book in July of 2015. I wrote the last chapter (other than Laravel 5.3 additions) in May 2016. I updated the Laravel 5.3 sections in August. I’ve spent the last three and half months going back and forth with O’Reilly on edits and reviews and indexes and draft covers.

I’m not saying I’m more excited about this book releasing than I was about the birth of my children. But. It does sort of feel like my baby. And I cried like a little child when each of my kids came into the world.

So, to answer your question, I’m excited.

What initially inspired you to want to write a book on Laravel?

I’d tossed around the idea of writing a book for a while. To be honest, I was more strongly considering a softer skills book. But then O’Reilly approached me about writing a book about Laravel, and it was obvious instantly how great this could be.

There are a few things that have inspired me in this process. One is how much I love teaching. I love it. I love blogging and mentoring and speaking at conferences. So this book is basically just the permission for me to do that for 440 pages. It’s incredible. It’s a rush, to imagine that someone will pick up this book not knowing Laravel and finish it able to write significant applications. I get to help with that.

I’m also incredibly excited to see Laravel move into more spaces. O’Reilly has access to academia and tons of enterprise settings that will help Laravel move into those spaces.

And finally, I love the idea of having a single resource to point people toward for starting their journey as a Laravel developer. I love telling people to subscribe to Laravel news and sign up for Laracasts for their ongoing education, but now I’ll have something to point them to as the place to get started.

Did you have a certain audience in mind while you were writing it?

I have two audiences in mind. First, the primary audience is a PHP developer who’s never worked in Laravel before, or just gotten started. The book starts at the tools you need on every site and expands from there; that means many readers will break off after the first or second or third chapters and get started coding, and return back to the book as their needs grow.

The book doesn’t expect you to have any knowledge of Laravel or how it works, which is why it’s great for a developer new to Laravel.

However, I had a secondary goal. As I wrote the book, I learned a ton about Laravel, and I realized that I could write the book in a way that would also provide benefit to the most experienced of Laravel developers. So I set out to write it in a way that exposed some little secrets of the code base, explaining how things work that so many of us just expect to “just work.”

Writing a book on a framework means you have to dig deep into the code, did you learn a lot of new things about Laravel?

I couldn’t even begin to list off the things I learned while writing the book. I read through every single line of the Laravel / Illuminate codebases many times writing the book, and followed all sorts of logic and dependency chains up and down. It was fascinating, and I think it really impacted how I code.

I wrote up a few fun things I learned in a post on my blog title Things I didn’t know Laravel could do. But that’s just the tip of the iceberg. It’s absolutely incredible how much you learn.

The parts of the book that made me move the slowest were the features I don’t use day-to-day. When’s the last time you wrote a many-to-many polymorphic relationship? I can’t tell you the last time I did. But in order to write this book with integrity, I had to become an expert on it–which meant not only reading the docs and the source, but also spinning up sample apps using each feature to make sure it worked the way I expected, and to make sure I caught any gotchas. It was intense, but yes: I learned a ton.

When you started writing did you expect it to take as long as did?

Our original plan was for it to take nine months. They wanted me to say six, but I knew my life was busy and shot for nine.

There are a few reasons it took so much longer. First, it was just a lot harder to find long uninterrupted blocks of time to write than I had ever expected. Second, what was intended to be a 250-page book turned out to be a 440-page book. The length is just right, so I’m glad it ended up as it did, but that definitely left it taking longer than I originally expected. And third, we planned the final delivery of the book around the release of Laravel 5.3, so when that came out a few months later than I expected, that meant the book had to come out a few months later as well.

What tools and apps did you use to create the book with?

O’Reilly uses an internal system called Atlas, which means I used AsciiDoc (a cousin of Markdown) and Git.

I wrote the entire book in Sublime Text, in AsciiDoc, versioned with Git. I pushed up to their servers and clicked a button on their site and waited for a few minutes every time I needed a PDF preview.

I created a few graphics in PhotoShop, but thankfully their editors fixed those up for me.

What was the hardest part of writing the book?

The hardest part of writing the book was working through sections that are dense–for example, the initial DB and Eloquent spec require you to cover an incredible amount of methods, one after another–without being boring and without just mirroring the docs.

Some sections were so easy–when there’s a lot of thinking and architecture and when I work with it every day. The section on the container is one of my favorites in the book, and it just flowed out without hardly any work. Not every section was like this.

If you started a new book today, what would you do differently?

If I started this same book again today, I can’t say I would do much differently. I’m very happy with how it turned out. Maybe I would time all the time I spent writing it so I had a really good understanding of how many hours I actually put into it.[a]

If I started a new book today, I’d self-publish. Not because that’s better, but because I’ve gone the traditional publisher route. I want to do it myself next time around. Write the book, publish it, send it out, collect my own payments, handle my own everything, release my own book with my own typos. Again–not because I didn’t enjoy this. But because I want something different.

Why should people buy Laravel Up & Running?

There are a few reasons people should buy Laravel: Up & Running. First, it’s the clearest and most comprehensive book about Laravel in existence. If you want to learn Laravel, this will absolutely be the best way to learn it, from scratch, as quickly as possible.

Second, I poured my heart into this. I’ve definitely let the blog slack a little bit–I’m very sad about this, and really hope to remedy that as quickly as possible. If you like my blog or my podcasts, a lot of that energy has gone into this book. I’ve worked hard to make it as valuable as possible.

Third, it has a gemsbok on the cover. A gemsbok. Do you know what a gemsbok is? I didn’t know what a gemsbok is. It’s fascinating. Don’t you now want a book with a gemsbok on the cover? I thought so. Boom. There you go.

Learn Laravel with Code Smart by Dayle Rees


Dayle Rees today launched his newest Laravel book, Code Smart.

Laravel: Code Smart is the third installment in my ‘Code’ series of books for the Laravel framework. The ‘Code’ books have thousands of readers and are considered by many to be the most effective method of learning the Laravel framework. As always, my books serve as both an introduction for beginners, and reference material for more experienced developers. I promise that you’re going to love it! You’ll be writing Laravel applications in no time.

You can use the coupon code LAUNCH to save 10% today only.

Learn PHP with PHP Pandas

It can be a daunting task to try and learn a new programming language and the new book “PHP Pandas” by Dayle Rees aims to teach you the basics of PHP in a fun and informative way.

This book is the third by Dayle with the previous two being Laravel specific, but they all carry the same fun style of writing. To give you an example here is an excerpt about the glamorous developer lifestyle:

Why did you decide to pursue development? No, wait! Let me guess. You saw a rockstar PHP developer swagger out of a Limousine into one of New York’s hottest night spots, order 5 bottles of Cristal and spend the evening chilling with Jay-Z and the ghost of Tupac.

This book is written for absolute beginners but still touches on all the important areas of PHP. So even developers with more experience can refresh your skills and maybe pick up a few new tips and tricks.

PHP Pandas Features

PHP Pandas is 182 pages and 28 chapters starting with installing PHP through the basics and up to Scopes, Traits, Namespaces, Interfaces, Inheritance, and more.

You can get a copy and find out more information about PHP Pandas on Leanpub.

Laravel and E-Commerce Book

Yesterday I officially announced a new book that I’ve been co-authoring with W. Jason Gilmore.

Easy E-Commerce using Laravel and Stripe is a fun, hands-on guide to building an online store. You’ll learn by doing, following along with the development of a store for a fictional lawn care and landscaping company.

The book is divided into five chapters and each chapter represents a new “phase” of the project which introduces a fundamental concept associated with building an online store. Here is what each chapter covers:

Chapter 1. Creating the We Dew Lawns Website

In this opening phase you’ll be tasked with the creation of a fairly simple Laravel-driven website that tells prospective customers more about the business, and offers a user-friendly contact form which sends inquiries to the company assistant, Patty Organo.

To suit this requirement, you’ll work through the creation of a new Laravel 5 website complete with Less, Elixir, and Bootstrap integration. You’ll also create a home and company bio pages, a site-wide layout, and a contact form.

Chapter 2. Integrating User Accounts

Following a successful launch of the first phase, Mr. McDew would like to begin building a customer mailing list. To entice individuals into handing over their valuable e-mail addresses he would like to offer registered users access to downloadable coupons which they can then apply to lawn care services. In this chapter, you’ll integrate and customize user registration and authentication features into the site, and create a restricted area of the site accessible only to authenticated users.

Chapter 3. Integrating Stripe and Creating a Product Catalog

With the site launched and the mailing list continuing to grow, Mr. McDew’s ambitions have now turned to online sales. He would like to create a simple online store for selling products such as lawn mowers and gardening tools. In this chapter, you’ll integrate Laravel Cashier to easily and securely accept credit card payments. You’ll also learn how to create a restricted administration console complete with a product catalog manager so Mr. McDew and his team can easily add and update products.

Chapter 4. Selling Electronic and Physical Products

With Stripe and Laravel Cashier integrated, and your product catalog created, it’s time to begin selling products! In this chapter you’ll learn how to sell electronic (downloadable) and physical products through your website. We’ll show you how to integrate the secure Stripe “Buy” button and modal, complete transactions using Cashier, and generate one-time URLs for automated product downloads. We’ll also talk a bit about shipping and sales tax complexities, and identify a few popular associated resources.

Chapter 5. Selling Subscriptions

In this final project phase, Mr. McDew sets his sights on selling lawn care subscriptions. In this chapter you’ll learn how to integrate Stripe’s recurring billing service into the We Dew Lawns website, and sell a number of lawn care service tiers to area customers. You’ll also learn how to configure webhooks to autonomously receive and respond to various subscription-related events.

Learn how to implement subscriptions, digital downloads, one-off purchases, customized receipts, and so much more! Plus it’s published on Leanpub so you’ll get free updates for life. Visit the official site for more details and to get your copy today.

Master Sublime Text with Sublime Text Power User

Sublime Text is one of the most popular editors for developers. It has tons of power, extremely light weight, and with a package system the customizations are limitless. I made the switch to it from TextMate years ago and even after all that time I’ve never truly mastered the editor.

Wes Bos understood that problem and wrote a book on the subject to help you not only learn your way around but to save you time. Sublime Text Power User covers everything from your first steps, to themes, shortcuts, macros, to tips and tricks.

I got to sit down with Wes and find out a little more about the book, the videos, and some of the ways he uses Sublime Text.

When I first tried Sublime Text the goto was life changing for me. What is your favorite Sublime Text feature?

Mine is very similar – I love the command palette and the goto anything command – these two windows allow you to access any command, file, line, function, method or selector in your entire project. I was previously a heavy user of the mouse and the find option – now I rarely use those to move around my code – there are much better ways!

My big complaint with Sublime Text is I can’t ever remember the shortcuts. Do you offer advice on tricks to memorize these?

As with anything, it takes a little practice. My tip for people is that when you do something manually with the mouse, stop and spend the 30 seconds that it takes to re-learn the shortcut. This will happen 3-4 times before you start to get the hang of it. The brain is really powerful and all it takes to train new skills is a little persistence and repetition.

With the Build systems, Git integration, and Linting you can get pretty close to a heavy IDE.

That is what makes Sublime Text so great – not everyone needs a heavy IDE, but some of the more commonly used features are totally available without slowing down the editor. The community has been great at making packages that extend the features of the editor.

Besides giving just an overview of Sublime Text what other goals does the book have?

My hope with this book is to uncover some of the most useful parts of Sublime Text that you can immediately implement into your workflow. There are so many features – big and small – that just don’t get enough usage. Many readers come back after reading the book lamenting how they wished they had known all this stuff sooner.

Time is a huge factor in staying productive. Your editor is the one tool you spend most of yours in and you should invest in optimizing your workflow skills. You’ll benefit from them everyday. Wes has some of the best insights in workflow of anyone I know. — Addy Osmani

The other goal of the book is to make you more productive – it pays for itself by not only making you a faster developer, but a better one. I want to help you increase the quality of the code that you write.

What Sublime Text theme and style are you currently using?

Sublime Text Cobalt Theme

Over the past 5 years, I’ve been working on one called Cobalt2 which is a constantly evolving, easy on the eyes blue color scheme with good contrast for things like keywords and methods. It also comes with a theme that does custom sidebar icons which is something relatively new to Sublime Text!  

Besides the book, you offer a book + video package. Can you tell us about the advantage of getting both?

There are some things that are hard to explain in text, and make so much sense in a video. I’ve always loved and learned a lot by watching other developer code and use their editor. The videos are a perfect companion to the book as well as they serve as a great reference for when you need a quick refresh.

If you’d like to learn more about Sublime Text and learn to save time with your editor be sure and check out Sublime Text Power User. Also as a bonus if you buy it today take $10 with the coupon LARAVEL