Category: Laravel

Win $1500 in the first Laravel Blog Writing Contest

Taylor Otwell is hosting a contest for the “most helpful/insightful/useful” Laravel blog post written by a community member. The grand prize for the winner is $1,500 cash delivered via PayPal. What Topics are OK? Since this is a Laravel blog contest, the post should be about something in the Laravel ecosystem: The post can be about any technical topic related to Laravel, Forge, Envoyer, Spark, Horizon, Echo, Cashier, etc. Feel free to share helpful tricks you learned while working on a project, architecture tips, or general tutorials about working with Laravel. Winner Selection You need to submit your article...

Read More

GitHub Releases Desktop App Version 1.2

A brand-new release of the GitHub Desktop app just shipped yesterday that will help you more easily sync up your changes with coworkers and teammates. The headline release feature is that you can compare your branch to another branch in the repository. You can then merge that branch (i.e., master) into your current working branch. Next up, you can select multiple files and perform actions on them like discarding changes. You can select multiple files with Shift + Command/Ctrl and clicking on individual files. If you weren’t aware, GitHub desktop is an Electron-based application, which enables you to build...

Read More

Five Useful Laravel Blade Directives

We’re going to look at five Laravel Blade directives you can use to simplify your templates, and learn about some convenient directives that make solving specific problems a cinch! If you’re new to the framework, these tips will help you discover the excellent features of Blade, Laravel’s templating engine. Let’s get started. 1. Check if the user is authenticated When checking if the user is authenticated, you could check if the user isn’t null: @if(auth()->user()) // The user is authenticated. @endif However, Laravel ships with a custom Blade directive that provides the same functionality more cleanly: @auth // The...

Read More

Eloquent Sluggable Package

Adding unique slugs to your eloquent models is made simple through the Eloquent Sluggable package by Colin Viebrock. The gist of using this package is making your Eloquent models “sluggable” through the Sluggable trait provided by the package, which defines an abstract sluggable() method you use to configure your model-specific configuration. For example, if you wanted to use the title field on a model with the slug column: use CviebrockEloquentSluggableSluggable; class Post extends Model { use Sluggable; /** * Return the sluggable configuration array for this model. * * @return array */ public function sluggable() { return [ 'slug'...

Read More

Add User Email Confirmation to Your Laravel Projects

If you want to add an email verification step to user registration in your Laravel Projects, Marcel Pociot has a new package aptly named laravel-confirm-email. New users are required to confirm their registration through an email to proceed. The package works by providing two traits that replace the AuthenticatesUsers and RegistersUsers that come with Laravel. After registering, users are required to confirm their account via email. To get started, install the package via Composer: composer require beyondcode/laravel-confirm-email This package requires a database migration, which you need to get by running the vendor:publish command: php artisan vendor:publish --provider=BeyondCodeEmailConfirmationEmailConfirmationServiceProvider You’ll also...

Read More