Skip to content

Instantly share code, notes, and snippets.

View techmahedy's full-sized avatar
🎯

Mahedi Hasan techmahedy

🎯
View GitHub Profile
@techmahedy
techmahedy / api.php
Last active June 13, 2021 19:24
Formatting api output using laravel collection
<?php
namespace App\Http\Resources;
use Illuminate\Http\Resources\Json\ResourceCollection;
class AddressCollection extends ResourceCollection
{
public function toArray($request)
{
@techmahedy
techmahedy / FirstTask.php
Last active March 26, 2021 19:25
Laravel Pipeline Example
<?php
namespace App\Features;
use Closure;
class FirstTask
{
public function handle($text, Closure $next)
{