I’ve lately been working on an administrative console for a client’s Laravel-driven SaaS, and wanted to create an easy solution for exporting invoice-related data to a spreadsheet which can then be periodically provided to the company accountant. In this tutorial I’ll show you just how easy it is to integrate such a feature into your Laravel application.
I’ve recently been integrating quite a few Bootstrap modals into a client project. The process is pretty straightforward however can be rather confusing the first few times around and so I thought I’d put together a blog post which outlines the various steps.
Many applications require a certain level of ongoing monitoring and maintenance beyond the typical code-based improvements. For instance you might wish to add new categories or edit existing names and descriptions, view a comprehensive list of registered users, or keep tabs on content creation and interaction trends. Such features should logically be accessible only by project administrators, yet be conveniently accessible. One effective way to integrate these capabilities is via a restricted web-based administration console. In this post (adapted from my bestselling book, Easy Laravel 5) I’ll show you a particularly simple yet effective solution for creating such a console.
You’ll use the many-to-many relation when the need arises to relate a record in one table to one or several records in another table, and vice versa. Consider some future version of TODOParrot that allowed users to classify lists using one or more categories, such as “leisure”, “exercise”, “work”, “vacation”, and “cooking”. A list titled “San Juan Vacation” might be associated with several categories such as “leisure” and “vacation”, and the “leisure” category would likely be associated with more than one list, meaning a list can be associated with many categories, and a category can be associated with many lists. In this detailed post you’ll learn all about the many-to-many relation.
There’s a matter known as the “N + 1 Queries” problem that has long confused web developers to the detriment of their application’s performance. In this post you’ll learn more about the problem, and how easy it is to resolve it using Laravel’s native syntax.
It’s often useful to count the number of times a column value appears in a database table, however doing so using Laravel’s fantastic ORM might not be so obvious. In this post you’ll learn how to use Laravel’s Query builder to easily group records according to a specific column and order the results.
Laravel really excels at facilitating deft management and navigation of table relations, but you’ll need to understand how to properly configure these relationships before taking advantage of them.
find() method works great in a perfect world, but what happens if the user attempts to access a record that doesn’t exist, such as
find method would return a
null value, meaning any attempts to retrieve a property of a non-object within the view would result in a view exception. Logically you’ll want to avoid this sort of mishap, and can do so using the
findOrFail method instead:
Once acquainted with Laravel’s Homestead virtual machine, I quickly became so enamored that within days I was managing all of my development projects on it. In this post I’ll show you how to do so.
The default registration form only includes fields for the user’s name, e-mail address, and password. However, what if you wanted to additionally ask for a username or perhaps a location such as the user’s country? Fortunately, Laravel’s authentication implementation makes this an incredibly easy task.