36 lines
770 B
PHP
36 lines
770 B
PHP
|
<?php
|
||
|
|
||
|
namespace App\Http\Controllers\Installer;
|
||
|
|
||
|
use Illuminate\Routing\Controller;
|
||
|
use App\Helpers\Installer\DatabaseManager;
|
||
|
|
||
|
class DatabaseController extends Controller
|
||
|
{
|
||
|
/**
|
||
|
* @var DatabaseManager
|
||
|
*/
|
||
|
private $databaseManager;
|
||
|
|
||
|
/**
|
||
|
* @param DatabaseManager $databaseManager
|
||
|
*/
|
||
|
public function __construct(DatabaseManager $databaseManager)
|
||
|
{
|
||
|
$this->databaseManager = $databaseManager;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Migrate and seed the database.
|
||
|
*
|
||
|
* @return \Illuminate\View\View
|
||
|
*/
|
||
|
public function database()
|
||
|
{
|
||
|
$response = $this->databaseManager->migrateAndSeed();
|
||
|
|
||
|
return redirect()->route('LaravelInstaller::final')
|
||
|
->with(['message' => $response]);
|
||
|
}
|
||
|
}
|