<?php

namespace App\Http\Controllers;

use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
use Illuminate\Foundation\Bus\DispatchesJobs;
use Illuminate\Foundation\Validation\ValidatesRequests;
use Illuminate\Routing\Controller as BaseController;

class Controller extends BaseController
{
    use AuthorizesRequests, DispatchesJobs, ValidatesRequests;
    
    public function returnResponse($message = "", $data = [], $status = "success")
    {
        return response()->json(['status' => $status, 'message' => __($message), 'data' => $data]);
    }

    public function returnErrorResponse($message = "Something went wrong", $status = "error")
    {
        return response()->json(['status' => $status, 'message' => __($message)]);
    }
}
