Laravel API Resource Tutorial

Laravel API Resource Tutorial

In this tutorial we’ll build a full json crud api using Laravel and the new Eloquent API Resources feature. This approach is used when you want to build the entire back end of your application using Laravel, while leaving the front end to Vue, React, or Angular. By using Laravel and Eloquent API Resources, you can format your data responses however you like while also adding meta information, pagination links and information, custom data wrapping, conditional attributes, and relationships.…

How To Quickly Test PHP Snippets

quickly-test-php-snippets

Have you ever wanted to quickly test small PHP snippets of code, but you became bogged down in opening up your favorite IDE, preparing a simple test.php file, loading it in the browser, etc.? Sometimes, all you want to do is quickly test some logic. Perhaps you’re even just browsing some of the example snippets at the PHP online manual, and thought it might be nice to just quickly run these examples and see them in action.…

How To Compare Two Arrays of Data and Calculate Position Differences

How To Compare Two Arrays of Data and Calculate Position Differences

Sometimes we might want to compare two arrays of data, and determine the positional difference of each value in the array from one to the next. One example of such an application of this might be similar to what you see where a website is keeping track of the position of a programming language for instance. Consider the Tiobe Index which tracks the position of a programming language from month to month.…

PHP Simple HTML DOM Parser vs FriendsOfPHP Goutte

PHP Simple HTML DOM Parser vs FriendsOfPHP Goutte

In this tutorial, we’ll examine how the PHP Simple HTML DOM Parser compares to the powerful FriendsOfPHP Goutte. In the early days, the PHP Simple HTML DOM Parser was all we had to work with concerning data extraction from HTML. Now that we have FriendsOfPHP Goutte, there is a more feature rich way of doing this type of work. Before you get going, you’ll need to configure a few things to get PHP Simple HTML DOM Parser, FriendsOfPHP Goutte, and Guzzle PHP HTTP client up and running.…

Developing With VueJS and PHP

vuejs and php

In this tutorial, we will make use of VueJS and PHP to build a really cool keyword density tool. On the Vue side, we’ll make use of components, templates, and root elements, and more. We will use PHP to generate the form we need, as well as to handle form processing, in addition to making use of the substr_count() function to provide the data we need.…

Flarum Forum Software

flarum forum software

Flarum Forum Software is a really cool open source project that makes Forums fun again. One look at the official website, and you’ll know this is a project to keep your eyes on. The design is really slick, with an attention grabbing Ubuntu like orange color with easy on the eyes color palette choices. Flarum is the creation of software developers Toby Zerner and Franz Liedke.…

Easy PHP Dates and Times With Carbon

Easy PHP Dates and Times With Carbon

PHP Dates and Times With Carbon are made incredibly simple with the intuitive API provided by this great library. Carbon extends the native PHP DateTime class which gives it access to all of the functions you are familiar with, in addition to some other great new features. Carbon makes use of it’s own namespace aptly named Carbon. When you get started, make sure to import that namespace such as use Carbon/Carbon; to get up and running quickly.…