Skip to content

Instantly share code, notes, and snippets.

View juslintek's full-sized avatar
🎯
Focusing

Linas Jusys juslintek

🎯
Focusing
View GitHub Profile
@juslintek
juslintek / ConfigRepo.php
Created February 21, 2023 18:25
Fluent Configs Setter Getter and Availability Checker
<?php
namespace App;
use Illuminate\Support\Str;
class ConfigRepo extends \Illuminate\Config\Repository
{
public function __call($method, array $parameters)
{
$verb = Str::lcfirst($method);
@juslintek
juslintek / Handler.php
Created September 26, 2023 10:18
Allows to passover exception that is derivative of ApiException its message and code as response code and error payload
<?php
use Illuminate\Http\JsonResponse;
use Throwable;
class Handler extends ExceptionHandler
{
/**
* A list of the exception types that are not reported.
*