This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace traits; | |
use \App; | |
use exception\NestException; | |
use \DB; | |
use Illuminate\Support\MessageBag; | |
use Illuminate\Database\Eloquent\Collection; | |
trait NestedAttributes | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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](); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
en: | |
notifications: | |
post: | |
after_update: | |
subject: | |
default: "%{sender} has updated his post" | |
notifiable_attributes: | |
state: | |
published: "%{sender} has published his post" |