Articles tagged with: php
Using Laravel Passport with AJAX requests
When building an app which requires users to log in, Laravel makes authentication
easy with its Auth classes. Similarly, the Passport package can be used to facilitate
building an API without the hassle of writing an OAuth framework. But Passport also
includes a middleware that allows you to consume your API directly from the browser,
meaning your API can be used to serve AJAX requests. The benefit to this approach
is twofold. You simply only need to maintain a single set of controllers to…
Read More →
Using UUIDs with Laravel
A UUID, short for Universally Unique Identifier, is a 128-bit number often used as
a database primary key. It's often notated as a 32 character, hexadecimal string
seperated in to five groups with hyphens. It has been widely adopted in a variety
of applications since the chance of duplicating another of the same value is infinitesimally
small.
UUIDs come with both pros and cons and your application should dictate whether or
not to use them.
They're unique. UUIDs can be generated prior to a database …
Read More →