<?php

class LContact {


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

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

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


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

        return $contact;
    }

}