PHP code example of repat / laravel-migration-model

1. Go to this page and download the library: Download repat/laravel-migration-model 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/ */

    

repat / laravel-migration-model example snippets


$migration = \Repat\Laravel\Migration::first();

// Attributes from table
$migration->id;
$migration->migration;
$migration->batch;

// Mutator attributes
$migration->filename;

// Methods
$migration->fileExists();

// list all files from migrations folder
$migrations = Migration::listFiles();

// list all files from migrations folder as migration name (without '.php')
$migrations = Migration::listFiles(true);