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

TutsPlus.com:
Package Management in Laravel
Oct 24, 2017 @ 09:34:28

On the TutsPlus.com site there's a new tutorial posted sharing some helpful tips on how to manage packages in a Laravel application making use of Composer's functionality.

In this article, we'll go ahead and explore the package management feature in the Laravel framework. In the course of the article, we’ll go through a real-world example to demonstrate the purpose of the article.

Package management in Laravel is an important feature that allows you to bundle a piece of functionality so that it can be distributed easily. Moreover, you could always publish your package to repositories like Packagist and GitHub that allow other developers to benefit from your package.

They start by listing out the files that will be involved in the tutorial (requiring a pre-set up Laravel application) and a basic knowledge of the application's structure. The article then walks through setting up some of the prerequisites and the creation of your own custom package. They include the updates to the routing, controller, updates to the view and changes in the service provider handling.

tagged: laravel package management tutorial introduction composer

Link: https://code.tutsplus.com/tutorials/package-management-in-laravel--cms-29625

SitePoint PHP Blog:
Let’s Compare: RunCloud vs Forge vs ServerPilot
Sep 26, 2017 @ 12:27:01

On the SitePoint PHP blog there's a new post that compares three deployment tools to help you manage your VPS servers: RunCloud vs Forge vs ServerPilot.

When your website or web application has outgrown your shared hosting account, it is time to move it to the cloud, or into a virtual private server (VPS). [...] However, I can recall when I wanted to move my website to Amazon Web Services a few years ago, and it took me days to deploy the server and get it ready with PHP, MySQL and Apache.

Fortunately, that is not the case today as we have the help of some cool tools and third party services. I took a look at three similar services – RunCloud, ServerPilot and Laravel Forge – and compared them to see which performs best.

The post then walks through each service showing how to set up an account and talking about the pros and cons. Screenshots are included showing the UI and the steps you'll need to set up servers and providers. The post ends with a look at performance tests on the resulting VPSes including information like time of request completion, response time and successful/failed transactions. These results show a clear leader as far as performance results - Laravel Forge - but there are some reminders that performance is only part of what you should consider when selecting a service.

tagged: service comparison vps management runcloud forge serverpilot

Link: https://www.sitepoint.com/lets-compare-runcloud-vs-forge-vs-serverpilot/

Laravel News:
Introducing Laravel Horizon
Jul 26, 2017 @ 09:42:19

On the Laravel News site today they have a post announcing a new member of the Laravel family that was announced at the current Laracon conference: Laravel Horizon.

The moment everyone in the Laravel community has been waiting for has finally arrived! Laravel Horizon is software to “supercharge your queues with a beautiful dashboard and code-driven configuration.”

[...] Laravel Horizon is designed to make it easy monitor your queues from a web interface and receive notifications when things go wrong.

They list out some of the key features including auto-balancing, code-driven configuration, queue monitoring and a notification system. They briefly describe each of these features and what they see as the "most awesome part" - that the entire thing is open source and 100% free.

tagged: laravel horizon queue management interface release announcement

Link: https://laravel-news.com/introducing-laravel-horizon

QCode.in:
Easy roles and permissions in Laravel 5.4
May 03, 2017 @ 12:06:41

On the QCode.in site Saqueib Ansari has written up a tutorial showing how to use a package in Laravel applications to manage roles and permissions easily. This package, spatie/laravel-permission, compliments the current Laravel roles/permissions handling with a few handy features that make management and evaluation simpler.

Although laravel comes with Policies to handle the authorization but I wanted to have an option to just create permissions in the database which we can manage by a UI in the admin panel, pretty standard. we can implement our own role and permission from scratch but I am going to use [spatie/laravel-permission](https://github.com/spatie/laravel-permission) package for this. This package was inspired by Jeffrey ways screencast and it’s very well maintained and very easy to use. It has everything we need and plays very well with Laravel Gate and Policies implementations.

He walks through the creation of a new Laravel application, running the auth:make to generate the authentication functionality and adding the spatie/laravel-permission package to the service provider. He creates several models for permissions and roles and updates the User model with a new trait. Once the migrations are run, he creates a default permission set. Then it's on to the code for the endpoints to work with roles (including syncing them with permissions). He then moves over to the views, showing how to use the can helper to determine if a user has access, creating an Authorizable trait and an AuthorizationException handler. Finally the tutorial wraps up with the roles and permissions management functionality complete with code and screenshots of the result.

tagged: laravel roles permissions tutorial package laravelpermission spatie management

Link: http://www.qcode.in/easy-roles-and-permissions-in-laravel-5-4

Laravel News:
Laravel Forge PHP SDK
Apr 05, 2017 @ 10:56:24

On the Laravel News site there's an announcement about the release of an SDK for the Forge API to make it easier to use the Laravel Forge API to manage your sites and servers.

Laravel Forge announced it’s first official API back in February and we have seen a lot of interesting uses like the F-Bar Mac app. Today, Mohamed Said released a PHP SDK for the API that covers all the features.

The post includes an example of using the SDK to create a new server on your Forge account, providing settings like size, name, region and provider. The post also lists out some of the other methods available in the SDK including:

  • revokeAccess
  • rebootMysql
  • installBlackfire
  • installPapertrail

You can find out more about this SDK on its GitHub repository.

tagged: laravel forge sdk github release functionality server management

Link: https://laravel-news.com/laravel-forge-php-sdk

FreeCodeCamp.com:
Bill Sourer - Finding Time to Become a Better Developer
Jun 30, 2016 @ 10:35:48

On the FreeCodeCamp Medium blog Bill Sourer shares some tips you can use to find time to become a better developer in the fast-based, sometimes crazy world of software development.

There’s no time for anything. At least that’s how it feels doesn’t it? No time to learn all the things you think you need to learn to stay ahead of the curve. No time to go back and refactor that ugly piece of code. It works (sort of) and there’s a deadline approaching. No time to write unit tests for everything. No time to write documentation or comments for the next guy who gets stuck maintaining what you wrote. No time to think. No time to breathe. No time!

Well… if you take the time to read this article, I promise you’ll find yourself with more time for what’s important.

He breaks it down into five main tips (here's a tl;dr for those in a rush):

  • You don’t need to learn every new thing in order to stay relevant.
  • Writing good code takes less time than writing bad code, BUT it doesn’t feel that way.
  • Working 24/7 does NOT make you a hero. Managing expectations does.
  • Not all time spent “improving” code has the same ROI.
  • Scheduled down time makes you more productive.

Each item on the list has a paragraph or three explaining it in a bit more detail. There's also some other interesting ideas and thoughts in the comments of the post from other readers.

tagged: better developer time management suggestion tips top5

Link: https://medium.freecodecamp.com/finding-time-to-become-a-better-developer-eebc154881b2#.6ojvwlad0

SitePoint PHP Blog:
First Look at Pagekit CMS – Clean, Extensible, Fast, But…
Apr 26, 2016 @ 10:55:55

On the SitePoint PHP blog there's a post from Bruno Skvorc introducing the Pagekit CMS, a content management system that's "clean, extensible and fast" (but it does come with some caveats).

Pagekit hit version 1 recently, and as I’d been looking at personal blogging engines, I thought it’d only be fair to check it out. Granted, blogging is merely a subset of the functionality Pagekit can offer, but a good basic test-drive subset nonetheless.

He walks you through the installation and configuration of a new Pagekit-based site using their own installer script (after downloading it from their site). He then goes through some of the basic features of the CMS including native Markdown support, how the editor looks and how the results render. He includes a guide on setting up a blog too using a "blog" plugin and an extension to add in better syntax highlighting. He also looks at other features of the CMS including custom layouts and "pretty" URL support. He points out some security changes you'll want to make out of the box to protect sensitive files and briefly touches on deploying the site to production and links to their own guide for additional help.

tagged: pagekit cms content management introduction tutorial project

Link: http://www.sitepoint.com/first-look-at-pagekit-cms-clean-extensible-fast-but/

Symfony Finland:
What eZ Platform adds to Symfony
Feb 12, 2016 @ 10:44:01

On the Symfony Finland blog Jani Tarvainen has written up a new post sharing some of the things that eZ Platform adds to Symfony and what kind of functionality it brings with it on top of the usual Symfony featureset.

eZ Platform is a Content Management System built with the Symfony Full Stack framework. While this may be clear to developers who have worked with, it maybe somewhat vague for the unitiated, especially when compared with Concrete5 or Drupal, which have adopted Symfony components into their core. [...] The relationship between Symfony and eZ Platform is very similar to Expression Engine using Code Igniter or EPiServer using ASP.NET MVC.

He then goes on to talk about the things Symfony includes by default including the request/response structure, internationalization handling and Twig integration. From there he lists out the things that the eZ Platform adds on top of the standard Symfony including:

  • a content repository
  • dynamic routing
  • a user interface
  • user and permission management

He ends the post with a look at some of the other bundles and features eZ Platform also provides around HTTP caching, image manipulation and more.

tagged: ezplatform symfony project framework content management system

Link: https://www.symfony.fi/entry/what-ez-platform-adds-to-symfony

Tighten.co:
Statamic v2 Beta: First Impressions of a new Laravel-based flat-file CMS
Feb 01, 2016 @ 13:37:14

On the Tighten.co blog they've posted their own review of Statamic, the flat-file based content management system with a Laravel backend. Statamic is a project that hopes to provide easy content management, responsive layouts and plenty of features to make an easy-to-use and robust CMS.

Among the developers I know who used to use ExpressionEngine but have since left, most work in Craft and/or Laravel. I kept hearing folks mention Statamic, but all I knew about it was that it was flat file, which wasn't particularly compelling to me.

Fast forward two years, and they've re-written the entire application to run on Laravel (now released as v2 beta). [...] Their documentation is hilarious, the community is welcoming and helpful, and the code—granted, I'm only a few weeks in—seems super easy to work with. So, what's the deal? Why have we set up Tighten's blog on Statamic?

The post then goes on to talk about the "quest" for a good Laravel-based content management system. They also talk about some of the essentials they see a CMS needing to be effective: good user interaction (UI/UX), how much and how difficult it is to customize and how it is configured. For each point they talk about how Statamic does things and their own verdict on the software and how good it does at filling these requirements.

tagged: statamic beta laravel content management system cms flatfile

Link: http://blog.tighten.co/statamic-v2-beta-first-impressions-of-a-new-laravel-based-flat-file-cms

SitePoint PHP Blog:
OctoberCMS CRUD – Building a Team/Project Management Plugin
Jan 28, 2016 @ 10:32:47

The SitePoint PHP blog continues their series covering the use of the OctoberCMS product to create a custom content management system tailored to your needs. In this new part of the series they show how to build a custom plugin for team management, showing how to use models and controllers along the way.

So far, we covered different aspects of OctoberCMS. This is a follow up article to discover how to use OctoberCMS for CRUD applications and take a detailed view at how to work with models, relations and controllers. [...] We are going to build a project management plugin where you can add different users to teams and assign them to projects.

You'll need to follow the first part of the series if you want to be able to follow along. Once you have that set up they show how to use the artisan command to create the plugin scaffold code and what the resulting pluginDetails function should look like. The tutorial then shows you how to create the related database tables and how to add the "team" column to the current user table. They then get in to creating the models to work with the tables, building out the controllers and view to manage the teams and the same kinds of handling for the "projects" the teams are related to. The post ends with a look at creating lists of projects/teams, adding in filtering and working with permissions for the management of teams.

tagged: octobercms series plugin custom team project management

Link: http://www.sitepoint.com/octobercms-crud-building-a-teamproject-management-plugin/