for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/*
* This file is part of the Tinyissue package.
*
* (c) Mohamed Alsharaf <[email protected]>
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Tinyissue\Model\Message;
use Illuminate\Database\Eloquent\Builder;
/**
* QueueScopes is trait class containing the model scope methods.
* @author Mohamed Alsharaf <[email protected]>
* @property static $this
trait QueueScopes
{
* order by latest created and then id DESC.
* @param Builder $query
* @return Builder
public function scopeLatest(Builder $query)
return $query->orderBy('created_at', 'DESC')->orderBy('id', 'DESC');
}