<?php

class LReport {

    public static function remove($id)
    {
        $report = Report::find($id);
        $report->status = -1;

        if ($report->save()) {
            return [
                'status'    => true,
                'message' => 'Remove successfuly'
            ];
        }

        return [
            'status' => false,
            'errors' => 'Error an Ocurred'
        ];
    }


    public static function get($id)
    {
        $report = Report::where('id', $id)->where('status', '!=', -1)->firstOrFail();
        $report->status = 1;
        $report->save();

        return $report;
    }

}