<?php


namespace Mehrab\Common\Responses;


class CrudResponse
{
    public static function CreatedResponse($object,$routeName){
        if ($object) {
            return redirect()->route($routeName)->with('status','created')->setStatusCode(201);
        }else{
            return redirect()->route($routeName)->with('status','error');
        }
    }
}
