Skip to content

Commit

Permalink
Update StatsController.php
Browse files Browse the repository at this point in the history
  • Loading branch information
rcomunica authored Dec 1, 2024
1 parent a898903 commit 1c23688
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions app/Http/Resources/StatsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

namespace App\Http\Controllers\Api;


use App\Contracts\Controller;
use App\Http\Resources\Stats;
use App\Models\Enums\PirepState;
Expand All @@ -12,8 +11,6 @@

class StatsController extends Controller
{


public function index(Request $request)
{
$table = 'pireps';
Expand All @@ -23,7 +20,6 @@ public function index(Request $request)
$avgStats = ['flight_time', 'landing_rate', 'fuel_used', 'score'];
$response = [];


$response['flights'] = DB::table($table)->selectRaw('count(id) as count')->where($where)->value('count');
$response['flight_time'] = DB::table($table)->selectRaw('sum(flight_time) as count')->where($where)->value('count');

Expand Down

0 comments on commit 1c23688

Please sign in to comment.