Edit File: ResetDailyViewCount.php
<?php namespace App\Console\Commands; use App\Models\Anime; use Illuminate\Console\Command; class ResetDailyViewCount extends Command { /** * The name and signature of the console command. * * @var string */ protected $signature = 'animes:reset-daily-view-count'; /** * The console command description. * * @var string */ protected $description = 'Reset Daily View Count For All Animes'; public function __construct(){ parent::__construct(); } /** * Execute the console command. */ public function handle() { Anime::query()->update(['view_daily' => 0]); $this->info("Daily view count has been reset for all animes"); } }
Back