| 1 |
<?php |
| 2 |
|
| 3 |
namespace FluentCommunity\Modules\Migrations\Http\Controllers; |
| 4 |
|
| 5 |
use FluentCommunity\App\Http\Controllers\Controller; |
| 6 |
use FluentCommunity\Framework\Http\Request\Request; |
| 7 |
|
| 8 |
class MigrationController extends Controller |
| 9 |
{ |
| 10 |
public function getAvailableMigrations(Request $request) |
| 11 |
{ |
| 12 |
$migrations = []; |
| 13 |
|
| 14 |
if (defined('BP_PLATFORM_VERSION')) { |
| 15 |
$migrations[] = [ |
| 16 |
'key' => 'buddyboss', |
| 17 |
'title' => 'BuddyBoss', |
| 18 |
'logo' => FLUENT_COMMUNITY_PLUGIN_URL . 'assets/images/brands/bboss_logo.png' |
| 19 |
]; |
| 20 |
} else if (defined('BP_PLUGIN_DIR')) { |
| 21 |
$migrations[] = [ |
| 22 |
'key' => 'buddypress', |
| 23 |
'title' => 'BuddyPress', |
| 24 |
'logo' => FLUENT_COMMUNITY_PLUGIN_URL . 'assets/images/brands/buddypress.svg' |
| 25 |
]; |
| 26 |
} |
| 27 |
|
| 28 |
return [ |
| 29 |
'migrations' => $migrations |
| 30 |
]; |
| 31 |
} |
| 32 |
} |
| 33 |
|