Skip to main content

Black Friday 2025! Only until December 1st: coupon FRIDAY25 for 40% off Yearly/Lifetime membership!

Read more here

Hi-Folks/gh-actions-yaml-generator

331 stars
2 code files
View Hi-Folks/gh-actions-yaml-generator on GitHub

routes/web.php

Open in GitHub
use Illuminate\Support\Facades\Route;
 
Route::get('/configurations', function () {
return ConfigurationResource::collection(Configuration::all());
});

app/Http/Resources/ConfigurationResource.php

Open in GitHub
use Illuminate\Http\Resources\Json\JsonResource;
 
class ConfigurationResource extends JsonResource
{
public function toArray($request)
{
return [
'code' => $this->code,
'counts' => $this->counts,
'created_at' => $this->created_at,
'updated_at' => $this->updated_at,
];
}
}

We'd Love Your Feedback

Tell us what you like or what we can improve

Feel free to share anything you like or dislike about this page or the platform in general.