I am proud that I can annouce to you that we have tagged a stable release of the Blogify package.
Posted in Laravel
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:
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.
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.
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.
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.
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.
Posted in Laravel
PHP turned 20 this week which makes me really start to feel my age. I first found PHP around the year 2000 and at the time the popular choices in web languages was ASP, PHP, Coldfusion, or Perl. I distinctly remember being confused by the paradox of choice. PHP ended up winning for me because it was cheaper to host and seemed to be supported everywhere.
PHP didn’t start out as a language, and this is clear from its design — or lack thereof, as detractors point out. It began as an API to help Web developers access lower-level C libraries. The first version was a small CGI binary that provided form-processing functionality with access to request parameters and the mSQL database. And its facility with a Web app’s database would prove key in sparking our interest in PHP and PHP’s subsequent ascendancy.
I will forever remember creating my first sites like this in the PHP 3.x days:
Yes, that’s bad. Don’t ever do that. :) The language has changed a lot since then, and thanks to the community the tips and tutorials have also vastly improved.
Here’s to 20 more!
Posted in php
Laravel has just announced the immediate availability of v5.1. This marks the first release in Laravel’s history to offer long-time support. Let’s look at some of the new features and also learn more about it directly from Taylor Otwell.
Since originally launching in 2011, Laravel has always followed the “release early, release often” mantra which is popular in open source applications. With the historic rise in popularity of the framework, it was time to start focusing on the needs of large organizations and mission-critical applications that need security fixes but can’t upgrade quickly. Laravel 5.1 will now include 3 years of security fixes.
The long-term support is arguably the biggest feature in 5.1, but it includes several other new features.
The documentation has been completely reworked to offer more clarity, to be more in-depth, and to have a nicer flow. This was a huge undertaking and countless hours was spent fine-tuning each page.
Taylor said he would delay an entire Laravel release rather than release something with poor documentation, when asked if spending this much time on it was worth it. Another new documentation feature is real-time search with auto-complete.
The app and generators have been converted to PSR-2. The biggest change from current Laravel style is tabs to spaces and control structures will now go on the same line.
You can now resolve a service directly from a Blade Template:
Laravel already included a powerful event system and this new feature builds on that by allowing you to broadcast events over a websocket so your client can consume them. With this new feature, it makes creating real-time applications simple.
With an inclusion of Laracast’s integrated testing package testing your application is going to be easier than ever before.
Posted in Laravel
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.
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!
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.
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.
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.
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.
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!
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
Posted in Editor
Lumen is a brand new PHP framework from Taylor Otwell designed for building lightning fast micro-services and API’s. When speed is a necessity, Lumen should be your first choice.
One of the neat things about the framework is you can still use all the Laravel features you love like Eloquent, caching, queues, validation, routing, middleware, and the powerful Laravel service container. Plus if you start your project with Lumen and eventually need even more power, moving to the full featured Laravel is a simple process.
To find out more behind the scenes I had a quick interview with Taylor about the project:
When I was building Envoyer, I wrote two small “micro-services” to support it. One of them is the post-deployment health checks. That is a small application that lives in three different DigitalOcean regions. I used Silex for that application; however, I had to re-research how to make a PDO database connection. I would have loved to just have a very small Laravel installation that I could use DB::update out of the box.
The other Envoyer service is the “heartbeat” Cron monitoring. Since these URLs could be called every minute by hundreds, if not thousands of Cron jobs, I needed that to be very fast. So, I used Slim for that service. But, again, I had to setup some more robust error handling as well as database connections. I again would have preferred a small Laravel “light” installation.
That’s where the idea for Lumen was born. It took me three or four iterations of building the framework to find a solution that was fast enough. I was not going to release Lumen unless I could say it’s faster than Silex and Slim out of the box. I didn’t want to release something that was slower than the alternative options.
Lumen is a play on the “Illuminate” components that Laravel utilizes. The Illuminate components are the individual pieces of the Laravel framework such as database, cache, queue, etc. So, first, I think Lumen sounds cool as a name. It’s only two syllables, instead of three like Laravel. That may sound crazy, but I think about that kind of thing and the mental images that are conjured up when you say the word. Of course, it also continues the tradition of “light” based names.
Yes, and it’s really just a natural outcome of using the Illuminate components that make up the full-stack Laravel framework. Since we use those components, it’s easy to provide a really great upgrade story, and I feel like that is something missing from other micro-framework solutions. Since the Laravel eco-system now contains both a full-stack framework and a micro-framework that are “officially” supported, we can provide really great upgrade stories.
This is again due to the great convenience of the Illuminate components. Basically, all I needed to do was “glue” them together in a different way than a full-stack framework would glue them together. This means instead of maximum flexibility in the bootstrapping process, Lumen opts for maximum speed. The actual Lumen framework repository is probably only a dozen files or so. The rest is made up of the Illuminate components. This allowed me to flesh out the features of the framework very quickly, though it did take me three or four iterations to find a solution that was really, really fast while still providing very powerful features.
Lumen is surely to a big hit and I think the way you can easily move into Laravel is a huge long term benefit for not only Lumen but the whole Laravel ecosystem. To stay up to date with all the latest happenings on Lumen be sure and join the weekly newsletter.
Posted in Laravel
Easy Laravel is a new book by W. Jason Gilmore, focusing entirely on the brand new Laravel 5. Easy Laravel features 8 chapters and over 200 pages to help you learn Laravel 5 quickly by building a real world project.
Jason has spent the last 15 years using PHP, during this time he’s written seven PHP books. Including the bestseller, “Beginning PHP and MySQL, Fourth Edition”, that has been in print more than 10 years. He has a gift of explaining things clearly in a very nice style.
Special Offer – Use the coupon code laravel-news to save 10% off the purchase price.
I reached out to Jason to ask him about the book and what follows is a Q&A session we had:
What made you decide to write a Laravel book?
The Laravel framework is one of the most exciting developments to come along in PHP community in a long time. Creator and lead developer Taylor Otwell has done a great job incorporating unique features alongside tried-and-true third party packages to produce a framework that is incredibly easy to use. The PHP language has always been heralded for helping developers get things done quickly, and Laravel really seems to suit that sentiment.
So with this in mind, after working on a few Laravel projects I knew this was something I really wanted to write about. When work on Laravel 5 was announced (at the time identified as 4.3), I shifted the book writing process into high gear because it became increasingly obvious fellow developers were going to want to learn all about the exciting new features, and was lucky enough to have wrapped up a respectable first version on the very day Laravel 5 was released.
What was the most enjoyable part of creating the book?
The most enjoyable part of writing Easy Laravel 5 was undoubtedly the early release process I employed to put an early draft of the book in front of readers as early as possible. This gave readers the opportunity to preview the material and learn more about what was coming in Laravel 5 at a significant discount to the final cost of the book, and provided me with a great deal of early feedback from readers eager to help me improve various aspects of the book. This was a lot of fun, and definitely something I’ll do again.
It was also fun to repeatedly build new Laravel 5 test projects as the framework development continued. I probably built upwards of 100 prototypes over the past few months, along the way watching the framework stabilize and become feature complete.
What is your favorite new Laravel 5 feature and why?
This is a difficult question, because I like so many facets of Laravel 5. I think Elixir has a lot of promise because it can automate many tedious tasks that I’d otherwise not prefer to think about. I also really like the Command Scheduler, as it makes rigorous task execution so easy. The new configuration approach (via phpdotenv) is really great too. Hmmm this answer is really starting to grow, perhaps I should just say all of them are my favorite!
Here are some of the highlights Easy Laravel covers:
Easy Laravel will give you the knowledge needed to build your first app with Laravel. See the table of contents below for more information on each chapter:
In this opening chapter you’ll learn how to create and configure your Laravel project both using your existing PHP development environment and Laravel Homestead. It also covers configuring your environment for effective Laravel debugging, and how to expand Laravel’s capabilities by installing several third-party Laravel packages that promise to supercharge your development productivity. Finally, you’ll conclude the chapter with an introduction to PHPUnit, showing you how to create and execute your first Laravel unit test!
In this chapter you’ll learn how to create controllers and actions, and define the routes used to access your application endpoints using Laravel 5’s new route annotations feature. You’ll also learn how to create the pages (views), work with variable data and logic using Blade, and reduce redundancy using layouts and view helpers. Next you get introduced to Laravel Elixir. The chapter concludes with several examples demonstrating how to test your controllers and views using PHPUnit.
In this chapter, we’ll turn our attention to the project’s data. You’ll learn how to integrate and configure the database, create and manage models, and interact with the database through your project models. You’ll also learn how to deftly configure and traverse model relations, allowing you to greatly reduce the amount of SQL you’d otherwise have to write to integrate a normalized database into your application.
Building and navigating table relations is a standard part of the development process even when working on the most unambitious of projects, yet this task is often painful when working with many web frameworks. Fortunately, using Laravel it’s easy to define and traverse these relations. In this chapter, I’ll show you how to define, manage, and interact with one-to-one, one-to-many, many-to-many, has many through, and polymorphic relations. You’ll also learn about a great feature known as scopes which encapsulate the logic used for more advanced queries, thereby hiding it from your controllers.
Your application will almost certainly contain at least a few web forms, which will likely interact with the models, meaning you’ll require a solid grasp on Laravel’s form generation and processing capabilities. While creating simple forms is fairly straightforward, things can complicated fast when implementing more ambitious solutions such as forms involving multiple models. In this chapter I’ll go into extensive detail regarding how you can integrate forms into your Laravel applications, introducing Laravel 5’s new form requests feature, covering both Laravel’s native form generation solutions as well as several approaches offered by popular packages. You’ll also learn how to test your forms in an automated fashion, meaning you’ll never have to repetitively complete and submit forms again!
Laravel 5 introduces middleware integration. In this chapter I’ll introduce you to the concept of middleware and the various middleware solutions bundled into Laravel 5. You’ll also learn how to create your own middleware solution!
Most modern applications offer user registration and preference management features in order to provide customized, persisted content and settings. In this chapter you’ll learn how to integrate user registration, login, and account management capabilities into your Laravel application.
“Deploy early and deploy often” is an oft-quoted mantra of successful software teams. To do so you’ll need to integrate a painless and repeatable deployment process, and formally define and schedule various maintenance-related processes in order to ensure your application is running in top form. In this chapter you’re introduced to the Laravel 5 Command Scheduler, which you can use to easily schedule rigorously repeating tasks. Also talk about optimization, demonstrating how to create a faster class router and how to cache your application routes. Finally, I’ll demonstrate just how easy it can be to deploy your Laravel application to the popular hosting service Heroku, and introduce Laravel Forge.
Included with the purchase price is a companion video which shows you how to create a Laravel 5 project using Composer. This is useful if you’re already working within an established PHP development environment and would prefer to not use Homestead. Also a brief tour of the Laravel 5 project directory structure, identifying the new locations of the configuration files, project controllers, and views. Next have a look at the routing file before finally using PHP’s built-in web server to view the default project splash page.
As you can see this book is designed to help you get up to speed with Laravel 5 and it does a great job covering all the little details. If you’d like to pick up a copy you can buy it now from Gumroad. With the purchase, you get the free video mentioned above as well as free updates for life. The book formats include EPUB, MOBI, and PDF with the ability to send directly to your device.
As a Laravel News exclusive by any of the book packages and you can use the coupon laravel-news to save 10% off the total price.
Get your copy of this book. You’ll be up to speed with Laravel in a very short time.
Posted in Laravel