Laravel Queue Mastery | Laracasts |
This code above below above any model class and will help to recognize methods that belong to the Laravel model
class. Also, check out ide-helper
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Builder;
/**
* @mixin Builder
@mixin Eloquent
*/
class Post extends Model {}
if ($coll->isEmpty()) {...}
if ($$coll->isNotEmpty()) { }
try {
$user = new User;
$user->fields = 'example';
$user->saveOrFail(); // save() returns only false
}
catch(\Exception $userSaveException)
{
// display of error
echo $userSaveException->getMessage();
}
---
Title & Link | Channel | Release Date |
---|---|---|
If vs. When - Let's See Which One Performs Better (Laravel Performance Tip) | Laratips | Sep 17, 2021 |
Title & Link | Channel | Release Date |
---|---|---|
Laravel Query Builder Usage With Example Code | Beachcasts Programming | Jan 18, 2022 |
Title & Link | Channel | Release Date |
---|---|---|
Laravel from Scratch: How to Create and Run Database Seeders | Alessandro Castellani | Nov 19, 2018 |
Seeds and Factories in Laravel 8 | Laravel Daily | Jan 6, 2021 |
Laravel Migrations, Seeding & Eloquent Relationships | Ryan Dobbs | Nov 21, 2016 |
---
Some good references to review: