Skip to main content

Black Friday 2025! Only until December 1st: coupon FRIDAY25 for 40% off Yearly/Lifetime membership!

Read more here

app/Console/Commands/ShowStats.php

Open in GitHub
use App\Models\Group;
use App\Models\Link;
use Illuminate\Console\Command;
use Spatie\Tags\Tag;
 
class ShowStats extends Command
{
protected $signature = 'servas:stats';
 
protected $description = 'Show Servas stats';
 
public function handle(Link $link, Group $group, Tag $tag)
{
$this->table(['Model', 'Count'], [
['Links', Link::all()->count()],
['Groups', Group::all()->count()],
['Tags', Tag::all()->count()],
]);
 
return Command::SUCCESS;
}
}

We'd Love Your Feedback

Tell us what you like or what we can improve

Feel free to share anything you like or dislike about this page or the platform in general.