PHP code example of mydnic / changelog-commit-for-laravel

1. Go to this page and download the library: Download mydnic/changelog-commit-for-laravel library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

mydnic / changelog-commit-for-laravel example snippets


return [
    /**
     * The name of the table to store the changelog in.
     */
    'table_name' => 'changelogs',

    /**
     * The GitHub access token to use to fetch the commit history.
     */
    'github_access_token' => env('GITHUB_ACCESS_TOKEN'),

    /**
     * The GitHub repositories to fetch the commit history from.
     */
    'github_repositories' => [
        'mydnic/changelog-commit-for-laravel', // change me
        // other repositories if you want to fetch the commit history from multiple repositories
    ],
];

use Mydnic\ChangelogCommitForLaravel\Models\Changelog;

$changelogs = Changelog::latest()->paginate(50);

return view('changelog', compact('changelogs'));
// or return JSON response
return response()->json($changelogs);
bash
php artisan vendor:publish --tag="changelog-commit-for-laravel-migrations"
php artisan migrate
bash
php artisan vendor:publish --tag="changelog-commit-for-laravel-config"
bash
php artisan changelog:fetch