• File: MonthCloseController.php
  • Full Path: /var/www/imaliapi/app/Http/Controllers/MonthCloseController.php
  • Date Modified: 04/15/2024 8:53 PM
  • File size: 428 bytes
  • MIME-type: text/x-php
  • Charset: utf-8
<?php

namespace App\Http\Controllers;

use App\MonthClose;
use Illuminate\Http\Request;

class MonthCloseController extends Controller
{
    public function getMonthClose(Request $request)
    {
        $month = MonthClose::query()
            ->where('user_id', $request->user()->id)
            ->orderByDesc('created_at')
            ->get();

        return response()->json(['data' => $month]);
    }
}