Skip to content

Instantly share code, notes, and snippets.

View saniyathossain's full-sized avatar

Saniyat Hossain saniyathossain

View GitHub Profile
@a-h-abid
a-h-abid / ValidationResponseWithRuleName.php
Last active March 17, 2023 08:19
Laravel Validation Response for API with Rule Key
<?php
namespace App\Http\Middleware;
use Closure;
use Illuminate\Http\Request;
class ValidationResponseWithRuleName
{
/**
@saniyathossain
saniyathossain / postman-pre-request.js
Created May 6, 2020 09:50 — forked from bcnzer/postman-pre-request.js
Postman pre-request script to automatically get a bearer token from Auth0 and save it for reuse
const echoPostRequest = {
url: 'https://<my url>.auth0.com/oauth/token',
method: 'POST',
header: 'Content-Type:application/json',
body: {
mode: 'application/json',
raw: JSON.stringify(
{
client_id:'<your client ID>',
client_secret:'<your client secret>',