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

Toptal.com:
How to Build a Multilingual App: A Demo With PHP and Gettext
Jan 10, 2017 @ 13:51:13

The Toptal.com site has a tutorial posted from Igor Gomes dos Santos about building a multilingual site with a combination of gettext and PHP.

Whether you are building a website or a full-fledged web application, making it accessible to a wider audience often requires it to be available in different languages and locales.

Fundamental differences between most human languages make this anything but easy. The differences in grammar rules, language nuances, date formats, and more combine to make localization a unique and formidable challenge. [...] The way your code is organized, and how your components and interface are designed, plays an important role in determining how easily you can localize your application.

The tutorial starts off talking about some of the difficulties that come along with internationalization of an application and how localization comes into play. He then starts talking about gettext and links to several PHP libraries that can help you integrate support for it into a current (or new) application. He walks you through the setup of gettext, how the PO/MO files are structured and other things to like about like domain separation, locale codes and the directory structure of your PO/MO files. He then gets into a practical example, showing a sample PO file's contents, two schools of thought on the identifiers in the file and a simple template that uses the "gettext" to get a translation. He also includes code to set up the locale correctly and create the language files for it to use.

tagged: multilingual website gettext tutorial internationalization

Link: https://www.toptal.com/php/build-multilingual-app-with-gettext

Matthias Noback:
Containerizing a static website with Docker (Part 1 & 2)
Jan 06, 2017 @ 09:07:39

Matthias Noback has started a series to his site showing you how to use Docker along with a static site, like one generated with Sculpin to create a complete environment. So far he's posted part one and part two.

Recently a former colleague of mine, Lucas van Lierop, showed me his new website, which he created using Spress. Lucas took two bold moves: he started freelancing, and he open-sourced his website code. This to me was very inspiring. I've been getting up to speed with Docker recently and am planning to do a lot more with it over the coming months, and being able to take a look at the source code of up-to-date projects that use Docker is certainly invaluable.

Taking lots of inspiration from Lucas's codebase, and after several hours of fiddling with configuration files, I can now guide you through the steps it took to containerize my blog (which is the site you're visiting now) and deploy a single container to a production server.

In part one he talks about how his blog is currently set up - based on a "large set of Markdown files" - and using Sculpin to generate the resulting site. He walks through the configuration of the Sculpin installation and how to configure and build the initial container, the "build" container.

In part two he continues the process but creates a "blog" container this time. This container runs the web server itself (nginx) configured as required by the Sculpin formatting.

tagged: container docker static website tutorial series part1 part2

Link: http://php-and-symfony.matthiasnoback.nl/categories/Docker/

Laravel News:
Announcing Laravel Valet
May 06, 2016 @ 09:46:28

The Laravel News site Eric Barnes has a post about the latest addition to the Laravel ecosystem (that includes the framework, Envoyer and Homestead) - Laravel Valet.

Laravel Valet is the next generation development environment for Mac minimalists. No Vagrant, No Apache, No Nginx, No /etc/hosts file. “I wanted to have the convenience of php artisan serve without ever having to run php artisan serve“, Taylor said when asked why he created it.

Valet works by hooking into your Mac’s built-in PHP server then it utilizes DnsMasq to proxy all requests to the .dev TLD to sites on your local machine.

The post links to the official documentation and an article he's written up with a "first look" at the new tool.

tagged: laravel valet tool setup configure website simple opinionated

Link: https://laravel-news.com/2016/05/announcing-laravel-valet/

Community News:
Laravel Spark Site Launched (and Screencast Posted)
Apr 15, 2016 @ 10:12:25

A highly anticipated project in the Laravel community - Laravel Spark - has officially launched its site providing more information about the product and its upcoming release. Laravel News gives its own brief summary of Spark in a new post:

Spark is a complete scaffolding for building a SaaS app including authentication, password reset, billing plans, payment method updates, invoices, coupons, user impersonation, and more with support for Stripe and Braintree.

The official release date is April 19th, next Tuesday, and although no pricing is on the site the rumor is it’ll be less than $100. This will save you many hours from building it all yourself.

For those interested in finding out a bit more in-depth about the product, check out this recently released screencast over on the Laracasts site where Taylor Otwell shows the basic setup and features of the platform.

tagged: laravel spark platform screencast laracasts release website

Link: https://spark.laravel.com/

Community News:
PHP-FIG Website Relaunch
Oct 26, 2015 @ 11:27:30

The PHP Framework Interoperability Group (or PHP-FIG for short) has just released a new version of their website with a great new look and even better organization for the PSR content: http://php-fig.org. They just tweeted about it too:

What do you think of our new website? Slicker, cleaner and easier on the eyes. Give us your feedback! :)

The new version of the site provides sections not only for the details around currently accepted standards but also on current proposals, members of the organization, bylaws and frequently asked questions about the group. They also have links to some resources where you can get involved if you're interested in the group and what they're up to.

tagged: phpfig website relaunch interoperability group redesign

Link: http://www.php-fig.org/

Community News:
Update on php[cruise]
Oct 15, 2015 @ 09:04:24

php[architect], the group behind the php[tek] and the php[world] conferences has posted more information about the latest addition to their conference lineup coming in 2016 - php[cruise]. They've launched the full conference site over at cruise.phparch.com

Well we’ve already actually announced it at php[tek] 2015, but it’s time to start sharing some information about it.

Yes, we are going to revive php[cruise], and once again host a conference-cruise for the PHP community. This 7 day cruise will take place from July 17-23, 2016 and leave from the port of Baltimore.

We still have lots of details to work out – but wanted to make sure that everyone was aware of this early! We will be working on making this a family friendly experience. Daycare/kids activities are included in the cost and we are even looking at scheduling some 'teach kids to code' type events.

The cruise will be happening in July 2016 (17th through 24th) and will feature several days of talks as well as plenty of time to enjoy the cruise and evening activities. One thing to note, the cost of the ticket for the conference does not include the cost for the cruise itself. That is paid separate because of the wide variety of accommodations available (and how many will be in your party). One of the goals with this event was to make it as family-friendly as possible, so the schedule isn't wall-to-wall talks like a normal conference. There's plenty of time to enjoy the trip and be with loved ones should they come along.

You can find out more about this conference at sea over on the official php[cruise] website.

tagged: website conference cruise phpcruise16 phparchitect announcement

Link: https://cruise.phparch.com

SitePoint PHP Blog:
Turning a Crawled Website into a Search Engine with PHP
Jul 06, 2015 @ 10:19:43

The SitePoint PHP blog has posted the second part of their "Powerful Custom Search Engines with Diffbot" series with part two showing how to take the Diffbot results and make them searchable.

In the previous part of this tutorial, we used Diffbot to set up a crawljob which would eventually harvest SitePoint’s content into a data collection, fully searchable by Diffbot’s Search API. We also demonstrated those searching capabilities by applying some common filters and listing the results. [...] In this part, we’ll build a GUI simple enough for the average Joe to use it, in order to have a relatively pretty, functional, and lightweight but detailed SitePoint search engine. What’s more, we won’t be using a framework, but a mere total of three libraries to build the entire application.

For those interested in the end result, you can skip to the demo. Otherwise, they'll walk you through the full process:

  • Bootstrapping the environment and needed libraries
  • Creating a simple "home" page with a Diffbot client
  • Creating the frontend interface (a form allowing for various search terms)
  • Making the Javascript to catch the form submission
  • Adding CSS to style the page
  • Building out the PHP backend to perform the different search types (author and keywords)

Finally he ties it all together and create the output of the search results, providing links to each of the matching pages, posting date, author information and a brief summary. He ends the post with a look at paginating the results via a "PaginationHelper" class that will drop a navigation item at the bottom of the results and handle moving from page to page, interfacing with the Diffbot client.

tagged: search engine diffbot tutorial series part2 results crawled website

Link: http://www.sitepoint.com/turning-crawled-website-search-engine-php/

Community News:
Packagist.org Gets a Makeover
Jun 16, 2015 @ 11:55:42

If you're a Composer user by now you've noticed a major overhaul that's happened to the Packagist.org website in the last few days. They've made a major improvement to how the site looks and have added some fun new functionality to help make finding packages easier.

According to the Laravel News site, updates include a change in the recommended install method, the addition of more GitHub metadata and the inclusion of the project's README file. The site will also allow you to sort (ascending and descending) by the number of stars the repository has as well as the number of downloads.

The site still includes all of the information it dod before too including version listings, details about what the package requires, license information and links to more information and the actual repository. Check out the new look and see what you think. Packagist is also an Open Source project so if you find an issue, be sure to either report it to the project or get in, fix it yourself and make the pull request to submit it.

tagged: packagist composer makeover functionality update website

Link: http://packagist.org

SitePoint PHP Blog:
Using BoltCMS to Build a Small Business Website
Apr 21, 2015 @ 12:12:23

The SitePoint PHP blog has a new tutorial posted showing you how to set up a simple small business website using the BoltCMS tool. This recent article will walk you through the full installation, configuration and setup for a simple site including database interactions.

As the web continues to mature and the demand for the efficiency of content delivery increases, more and more slim and trim CMSs are coming into the fray. Developers (front-end and back-end) are branching away from the heavy-hitters like WordPress and Drupal, and into the likes of more streamlined, tailor-made solutions. Bolt CMS is one of these CMSs, and prides itself on being a dream for designers, developers, and content editors alike.

He starts with a brief overview of what the BoltCMS has to offer and some of the technology that powers it. He then goes through each of the steps to get the application up and running:

  • Requirements, setup and installation
  • Main configuration and theme set up
  • Splitting up files into templates
  • Introducing and creating content types
  • Retrieving content from database records

Each step along the way includes the code, configuration changes or template updates you'll need to make to end up with a simple site allowing you to view a page of content and list/add related testimonials.

tagged: boltcms small business website tutorial page testimonial

Link: http://www.sitepoint.com/using-boltcms-build-small-business-website/

Community News:
Wisdom of the ElePHPant
Feb 11, 2015 @ 10:24:46

Cal Evans, a prominent member of the PHP community, has put together a new project sharing what he's called "Wisdom of the ElePHPant", a series of short thoughts by members of the PHP community touching on everything from the art of programming to helping out open source projects to working with code reviews.

All of these little nuggets of wisdom have been gathered and put into a small book, one per page. These books cannot be purchased but there are sources where you can find them and get a copy of your own (such as conferences, user groups or from various members of the PHP community). Fortunately, there was more than enough wisdom to go around and some of the submissions are also being shared on the site including current ones from Jeremy Kendall, Erika Heidi and Cal himself.

This is a great resource for some quick chunks of wisdom from developers who have seen (and overcome) a lot of the challenges developers experience every day. I highly suggest picking up a copy for yourself...if you can track one down. For more check out the project's main site, WisdomOfTheElePHPant.com.

tagged: wisdomoftheelephpant book website thoughts community

Link: http://wisdomoftheelephpant.com