installer file deletion after install
This commit is contained in:
parent
7efcdefc6a
commit
308b3be1d8
|
|
@ -14,25 +14,25 @@ class AddRemainingColumnInProductFlatTable extends Migration
|
||||||
public function up()
|
public function up()
|
||||||
{
|
{
|
||||||
Schema::table('product_flat', function (Blueprint $table) {
|
Schema::table('product_flat', function (Blueprint $table) {
|
||||||
if (! Schema::hasColumn('short_description'))
|
if (! Schema::hasColumn('short_description')) {
|
||||||
$table->text('short_description')->nullable();
|
$table->text('short_description')->nullable();
|
||||||
}
|
}
|
||||||
if (! Schema::hasColumn('meta_title'))
|
if (! Schema::hasColumn('meta_title')) {
|
||||||
$table->text('meta_title')->nullable();
|
$table->text('meta_title')->nullable();
|
||||||
}
|
}
|
||||||
if (! Schema::hasColumn('meta_keywords'))
|
if (! Schema::hasColumn('meta_keywords')) {
|
||||||
$table->text('meta_keywords')->nullable();
|
$table->text('meta_keywords')->nullable();
|
||||||
}
|
}
|
||||||
if (! Schema::hasColumn('meta_description'))
|
if (! Schema::hasColumn('meta_description')) {
|
||||||
$table->text('meta_description')->nullable();
|
$table->text('meta_description')->nullable();
|
||||||
}
|
}
|
||||||
if (! Schema::hasColumn('width'))
|
if (! Schema::hasColumn('width')) {
|
||||||
$table->decimal('width', 12, 4)->nullable();
|
$table->decimal('width', 12, 4)->nullable();
|
||||||
}
|
}
|
||||||
if (! Schema::hasColumn('height'))
|
if (! Schema::hasColumn('height')) {
|
||||||
$table->decimal('height', 12, 4)->nullable();
|
$table->decimal('height', 12, 4)->nullable();
|
||||||
}
|
}
|
||||||
if (! Schema::hasColumn('depth'))
|
if (! Schema::hasColumn('depth')) {
|
||||||
$table->decimal('depth', 12, 4)->nullable();
|
$table->decimal('depth', 12, 4)->nullable();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@ namespace Webkul\User\Http\Controllers;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
use Illuminate\Http\Response;
|
use Illuminate\Http\Response;
|
||||||
use Auth;
|
use Auth;
|
||||||
|
use File;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Admin user session controller
|
* Admin user session controller
|
||||||
|
|
@ -42,6 +43,10 @@ class SessionController extends Controller
|
||||||
*/
|
*/
|
||||||
public function create()
|
public function create()
|
||||||
{
|
{
|
||||||
|
if (File::exists(public_path('installer'))) {
|
||||||
|
File::deleteDirectory(public_path('installer'));
|
||||||
|
}
|
||||||
|
|
||||||
if (auth()->guard('admin')->check()) {
|
if (auth()->guard('admin')->check()) {
|
||||||
return redirect()->route('admin.dashboard.index');
|
return redirect()->route('admin.dashboard.index');
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,15 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
$location = str_replace('\\', '/', getcwd());
|
||||||
|
$currentLocation = explode("/", $location);
|
||||||
|
$desiredLocation = implode("/", $currentLocation);
|
||||||
|
$installFile = $desiredLocation . '/installer' . '/install.php';
|
||||||
|
|
||||||
|
if (file_exists($installFile)) {
|
||||||
$install = require __DIR__.'/installer/install.php';
|
$install = require __DIR__.'/installer/install.php';
|
||||||
|
} else {
|
||||||
|
$install = null;
|
||||||
|
}
|
||||||
|
|
||||||
if (! is_null($install)) {
|
if (! is_null($install)) {
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue