Author: Sakral Technology

Laravel 5.7 Improved Error Messages for Dynamic Calls

Laravel 5.7 makes it easier than ever to track down error messages caused by dynamic calls to Eloquent models (and other parts of the framework) thanks to Bouncer developer Joseph Silber! You’ll get a more clear picture of the error caused by a missing method instead of a possibly confusing error on the underlying object: Ever mistyped a method on an Eloquent model and got a cryptic error saying that the method doesn't exist *on the query builder* ???? Well, in @laravelphp 5.7 you'll now get a clear, concise message saying that the method doesn't exist on the model...

Read More

Data Science Jobs: How (and Why) to Land One

Even though data science is one of this century’s hottest fields, how to break into the field is still a little confusing, especially to those who don’t have technical backgrounds. Truth is, data science is a popular and emerging field, but depending on the company, a company’s leadership may not truly know what a “data scientist” does either. And as the field defines itself with more and more opportunities, it’ll be no time at all before data scientists are in even higher demand than they currently are. Data Science, Machine Learning & AI If you have some technical interest...

Read More

Coding Bootcamp vs. Codecademy: 7 Ways Codecademy Teaches Differently

Learning to code is a significant opportunity to level up your skills in your current career. Your coding knowledge becomes your greatest superpower—transforming you from a tech novice into a builder. It’s an important step toward investing in yourself. Now, the only decision left to make is how you will learn to code. You’re probably searching for classes that will adapt to your learning style and help you achieve your specific professional goals. With this in mind, let’s dig into the key differences between Codecademy and the traditional coding bootcamps. Access From Anywhere As a professional, you probably balance...

Read More

Laravel Love: Likes and Dislikes for Eloquent Models

Laravel Love is a package by Anton Komarev that lets people express how they feel about content by liking and disliking Eloquent models. The package works by defining a “liker” model defined with a contract. Most likely this will be your application’s User model: <?php use CogContractsLoveLikerModelsLiker as LikerContract; use CogLaravelLoveLikerModelsTraitsLiker; use IlluminateFoundationAuthUser as Authenticatable; class User extends Authenticatable implements LikerContract { use Liker; } On the other end, you define Eloquent models that can be “liked” by your “liker” model: use CogContractsLoveLikeableModelsLikeable as LikeableContract; use CogLaravelLoveLikeableModelsTraitsLikeable; use IlluminateDatabaseEloquentModel; class Article extends Model implements LikeableContract { use Likeable; }...

Read More

Laravel 5.7 Callable Action URLs

A new callable-like syntax for action URLs is coming to Laravel 5.7 thanks to Sebastian De Deyne! You might also hear this feature called “tuple notation” or a “callable array syntax” for URL generation actions. Here’s how it works starting in 5.7: <?php $url = action([PostsController::class, 'index']); Currently (as of Laravel 5.6) the action helper only supports the following style that you’re probably already familiar with: <?php $url = action('UserController@profile', ['id' => 1]); One benefit of the new callable array syntax format is the ability to navigate to directly to the controller if you use a text editor or...

Read More