mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Added webbased update support
This commit is contained in:
parent
1a0090c810
commit
c535afa5ed
@ -19,6 +19,49 @@ class AccountController extends \BaseController {
|
||||
$this->contactMailer = $contactMailer;
|
||||
}
|
||||
|
||||
public function install()
|
||||
{
|
||||
if (!Utils::isNinja() && !Schema::hasTable('accounts')) {
|
||||
try {
|
||||
Artisan::call('migrate');
|
||||
Artisan::call('db:seed');
|
||||
} catch (Exception $e) {
|
||||
Response::make($e->getMessage(), 500);
|
||||
}
|
||||
}
|
||||
|
||||
return Redirect::to('/');
|
||||
}
|
||||
|
||||
public function update()
|
||||
{
|
||||
if (!Utils::isNinja()) {
|
||||
try {
|
||||
Artisan::call('migrate');
|
||||
} catch (Exception $e) {
|
||||
Response::make($e->getMessage(), 500);
|
||||
}
|
||||
}
|
||||
|
||||
return Redirect::to('/');
|
||||
}
|
||||
|
||||
public function reset()
|
||||
{
|
||||
if (Utils::isNinjaDev()) {
|
||||
Confide::logout();
|
||||
try {
|
||||
Artisan::call('migrate:reset');
|
||||
Artisan::call('migrate');
|
||||
Artisan::call('db:seed');
|
||||
} catch (Exception $e) {
|
||||
Response::make($e->getMessage(), 500);
|
||||
}
|
||||
}
|
||||
|
||||
return Redirect::to('/');
|
||||
}
|
||||
|
||||
public function getStarted()
|
||||
{
|
||||
if (Auth::check())
|
||||
|
@ -331,11 +331,11 @@ class ConfideSetupUsersTable extends Migration {
|
||||
$t->decimal('amount', 13, 2);
|
||||
$t->decimal('balance', 13, 2);
|
||||
|
||||
$t->foreign('client_id')->references('id')->on('clients')->onDelete('cascade');
|
||||
$t->foreign('client_id')->references('id')->on('clients')->onDelete('cascade');
|
||||
$t->foreign('account_id')->references('id')->on('accounts');
|
||||
$t->foreign('user_id')->references('id')->on('users')->onDelete('cascade');;
|
||||
$t->foreign('user_id')->references('id')->on('users')->onDelete('cascade');
|
||||
$t->foreign('invoice_status_id')->references('id')->on('invoice_statuses');
|
||||
$t->foreign('recurring_invoice_id')->references('id')->on('invoices');
|
||||
$t->foreign('recurring_invoice_id')->references('id')->on('invoices')->onDelete('cascade');
|
||||
|
||||
$t->unsignedInteger('public_id')->index();
|
||||
$t->unique( array('account_id','public_id') );
|
||||
|
@ -21,7 +21,7 @@ class Gateway extends Eloquent
|
||||
|
||||
if ($paymentLibrary->id == PAYMENT_LIBRARY_OMNIPAY)
|
||||
{
|
||||
$fields = Omnipay::create($this->provider)->getDefaultParameters();
|
||||
$fields = Omnipay::create($this->provider)->getDefaultParameters();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -22,6 +22,9 @@
|
||||
//dd(gethostname());
|
||||
//Log::error('test');
|
||||
|
||||
Route::get('install', 'AccountController@install');
|
||||
Route::get('update', 'AccountController@update');
|
||||
Route::get('reset', 'AccountController@reset');
|
||||
|
||||
Route::get('/', 'HomeController@showIndex');
|
||||
Route::get('/rocksteady', 'HomeController@showIndex');
|
||||
@ -52,7 +55,6 @@ Route::post('signup/validate', 'AccountController@checkEmail');
|
||||
Route::post('signup/submit', 'AccountController@submitSignup');
|
||||
|
||||
|
||||
|
||||
// Confide routes
|
||||
Route::get('login', 'UserController@login');
|
||||
Route::post('login', 'UserController@do_login');
|
||||
|
@ -3,7 +3,9 @@
|
||||
@section('content')
|
||||
@parent
|
||||
|
||||
{{ Former::open($url)->method($method)->addClass('col-md-8 col-md-offset-2 warn-on-exit') }}
|
||||
{{ Former::open($url)->method($method)
|
||||
->rules(['product_key' => 'required|max:20'])
|
||||
->addClass('col-md-8 col-md-offset-2 warn-on-exit') }}
|
||||
|
||||
|
||||
{{ Former::legend($title) }}
|
||||
|
Loading…
x
Reference in New Issue
Block a user