Back

I was studying a way to return the version of an API tag in an endpoint and look how simple it is to do using PHP and Laravel:

You just need to create a "git.php" file inside the project's config folder with the code below:


<?php
 return'tag' => exec('git describe --tags --abbrev=0'), ];

Then just access the key using the config('git.tag') helper and you're done. And you can still make it simpler than that lol
#laravel #git

1

241

In response to @MrPunyapal

Alright

204

  • No matching results...
  • Searching...

/ 1000