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

TutsPlus.com:
Using Illuminate Database With Eloquent in Your PHP App Without Laravel
Jan 26, 2017 @ 15:51:05

The TutsPlus.com site has posted a new tutorial showing you how you can use the Eloquent ORM from Laravel without having to use Laravel itself. There's already functionality built into the popular database interface that makes it possible, it's just a matter of turning it on.

Illuminate is Laravel’s database engine minus Laravel. It comes bundled with the Eloquent ORM in Laravel. If you would like to build your PHP apps with ORMs and prefer not to use Laravel, this tutorial is for you.

In this tutorial, we are going to build the back end for a Q&A App with PHP, Illuminate Database, and the Eloquent ORM.

They start the post with a list of requirements and a brief outline of what functionality the end result will include. With that defined the tutorial starts in on the directory structure of the application and the Composer configuration to pull in Eloquent and its requirements. Next up is the code to define the connection credentials and (raw) SQL to create the tables in the database. The database "capsule" is created and the code is shared to create simple controllers and matching models for users, questions, answers and upvotes. They show how to use relationships to get the linked objects between tables and how to perform update and delete operations.

tagged: illuminate database eloquent laravel outside tutorial capsule

Link: https://code.tutsplus.com/tutorials/using-illuminate-database-with-eloquent-in-your-php-app-without-laravel--cms-27247

SitePoint PHP Blog:
Removing the Pain of User Authorization with Sentinel
Sep 21, 2015 @ 19:23:10

The SitePoint PHP blog has posted a tutorial showing you how to "take the pain out of user authorization" with the help of Sentinel, a package from Cartalyst that already includes functionality for both user authorization and authentication.

Most non-basic multi-user applications need some roles and permission levels. If you ever used WordPress, you must have noticed that they have a super admin, admin, editor, author, etc. Simplifying the development and integration of a permission system is what Cartalyst’s Sentinel package is trying to accomplish. The package provides an API for dealing with users, groups, permissions, etc. In this article, we’ll use it to create a small demo app.

They walk through the creation of a simple Slim framework application, installing it, Sentinel and other suggested packages via Composer. They then help you execute the migrations to create the necessary tables and set up a basic front controller file. From there they configure Twig templating, the Illuminate database connection and finally adding a Sentinel instance to the application's DI container. They include code to help you create roles for "user" and "admin". From there the tutorial shows how to create a login & registration form, send a registration email, create permissions and activating users. Finally they build a simple administration page that allows you to hide functionality from normal users.

tagged: tutorial authentication authorization sentinel cartalyst slim illuminate

Link: http://www.sitepoint.com/removing-the-pain-of-user-authorization-with-sentinel/

PHP Town Hall:
Episode 27: Josh Lockhart and Jeremy Mikola
Jun 30, 2014 @ 14:30:35

The PHP Town Hall podcast is back with their latest episode, number 27, featuring two special guests: Jeremy Mikola and Josh Lockhart.

This episode is a long one, but we are back to improved audio and the video is not just one dude eating pizza for an hour. Josh Lockhart of PHP The Right Way and Slim fame, and Jeremy Mikola who is well known for banging on about clouds and playing magic the gathering. Oh, he also works for MongoDB.

The episode's discussion includes a wide range of topics (and plenty of rambling) about things like plans for Slim 3, Silex vs Slim, PHP The Right Way, Illuminate/Pagination and difficulties around pull requests. You can listen to this latest episode either through the in-page player, by downloading the mp3 or you can watch the video of the live Google Hangout recording.

tagged: phptownhall ep27 jeremymikola joshlockhart slim phptherightway illuminate pullrequest

Link: http://phptownhall.com//blog/2014/06/29/episode-27-foo/


Trending Topics: