Skip to content

Instantly share code, notes, and snippets.

import {AxiosRequestConfig, AxiosResponse, AxiosInstance, AxiosError} from 'axios';
import {MetaParams, ApiResponseErrorValidation, AxiosRequestConfigCustom} from "./types";
import store from "@/store";
import {default as axios} from "./api";
const getMetaParams = (config: AxiosRequestConfigCustom): MetaParams|undefined => {
if(config.meta){
return config.meta
}
return undefined
<?php
namespace traits;
use \App;
use exception\NestException;
use \DB;
use Illuminate\Support\MessageBag;
use Illuminate\Database\Eloquent\Collection;
trait NestedAttributes
{
trait Responder
{
#
#params options value must be closure
#
protected function respondTo(array $options=array())
{
$contentType= $this->requestContentType();
if ( array_key_exists($contentType, $options) && is_callable($options[$contentType])) return $options[$contentType]();
@ihsaneddin
ihsaneddin / en.yml
Last active February 26, 2016 07:25
en:
notifications:
post:
after_update:
subject:
default: "%{sender} has updated his post"
notifiable_attributes:
state:
published: "%{sender} has published his post"