for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Chriscreate\Blog\Traits\Comment;
use Carbon\Carbon;
use Illuminate\Database\Eloquent\Builder;
trait CommentScopes
{
public function scopeLatest(Builder $query)
return $query->orderBy('created_at', 'DESC');
orderBy()
Illuminate\Database\Eloquent\Builder
enforceOrderBy()
This check marks calls to methods that do not seem to exist on an object.
This is most likely the result of a method being renamed without all references to it being renamed likewise.
}
public function scopeLastMonth(Builder $query)
return $query->whereBetween('created_at', [
Carbon::now()->subMonth(), Carbon::now(),
])
->latest();
public function scopeLastWeek(Builder $query)
Carbon::now()->subWeek(), Carbon::now(),
This check marks calls to methods that do not seem to exist on an object.
This is most likely the result of a method being renamed without all references to it being renamed likewise.