![]() Server : Apache System : Linux server2.thebrownbagmedia.com 4.18.0-553.34.1.el8_10.x86_64 #1 SMP Wed Jan 8 09:40:06 EST 2025 x86_64 User : topnotchcv ( 1029) PHP Version : 8.1.32 Disable Function : NONE Directory : /home/topnotchcv/public_html/vendor/rachidlaasri/laravel-installer/src/Helpers/ |
<?php namespace RachidLaasri\LaravelInstaller\Helpers; use Illuminate\Support\Facades\DB; trait MigrationsHelper { /** * Get the migrations in /database/migrations. * * @return array Array of migrations name, empty if no migrations are existing */ public function getMigrations() { $migrations = glob(database_path().DIRECTORY_SEPARATOR.'migrations'.DIRECTORY_SEPARATOR.'*.php'); return str_replace('.php', '', $migrations); } /** * Get the migrations that have already been ran. * * @return \Illuminate\Support\Collection List of migrations */ public function getExecutedMigrations() { // migrations table should exist, if not, user will receive an error. return DB::table('migrations')->get()->pluck('migration'); } }