Invoice Ninja Setup

@if (version_compare(phpversion(), '5.4.0', '<'))
Warning: The application requires PHP >= 5.4.0
@endif @if (!function_exists('proc_open'))
Warning: proc_open must be enabled.
@endif @if (!@fopen(base_path()."/.env", 'a'))
Warning: Permission denied to write config file
sudo chown yourname:www-data /path/to/ninja
@endif If you need help you can either post to our support forum or email us at contact@invoiceninja.com.

-- Commands to create a MySQL database and user
CREATE SCHEMA `ninja` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
CREATE USER 'ninja'@'localhost' IDENTIFIED BY 'ninja';
GRANT ALL PRIVILEGES ON `ninja`.* TO 'ninja'@'localhost';
FLUSH PRIVILEGES;

{!! Former::open()->rules([ 'app[url]' => 'required', 'database[type][host]' => 'required', 'database[type][database]' => 'required', 'database[type][username]' => 'required', 'database[type][password]' => 'required', 'first_name' => 'required', 'last_name' => 'required', 'email' => 'required|email', 'password' => 'required', 'terms_checkbox' => 'required' ]) !!}

Application Settings

{!! Former::text('app[url]')->label('URL')->value(isset($_ENV['APP_URL']) ? $_ENV['APP_URL'] : Request::root()) !!}

Database Connection

{!! Former::select('database[default]')->label('Driver')->options(['mysql' => 'MySQL', 'pgsql' => 'PostgreSQL', 'sqlite' => 'SQLite']) ->value(isset($_ENV['DB_TYPE']) ? $_ENV['DB_TYPE'] : 'mysql') !!} {!! Former::text('database[type][host]')->label('Host')->value('localhost') ->value(isset($_ENV['DB_HOST']) ? $_ENV['DB_HOST'] : '') !!} {!! Former::text('database[type][database]')->label('Database')->value('ninja') ->value(isset($_ENV['DB_DATABASE']) ? $_ENV['DB_DATABASE'] : '') !!} {!! Former::text('database[type][username]')->label('Username')->value('ninja') ->value(isset($_ENV['DB_USERNAME']) ? $_ENV['DB_USERNAME'] : '') !!} {!! Former::password('database[type][password]')->label('Password')->value('ninja') ->value(isset($_ENV['DB_PASSWORD']) ? $_ENV['DB_PASSWORD'] : '') !!} {!! Former::actions( Button::primary('Test connection')->small()->withAttributes(['onclick' => 'testDatabase()']), '  ' ) !!}

Email Settings

{!! Former::select('mail[driver]')->label('Driver')->options(['smtp' => 'SMTP', 'mail' => 'Mail', 'sendmail' => 'Sendmail']) ->value(isset($_ENV['MAIL_DRIVER']) ? $_ENV['MAIL_DRIVER'] : 'smtp') !!} {!! Former::text('mail[host]')->label('Host') ->value(isset($_ENV['MAIL_HOST']) ? $_ENV['MAIL_HOST'] : '') !!} {!! Former::text('mail[port]')->label('Port') ->value(isset($_ENV['MAIL_PORT']) ? $_ENV['MAIL_PORT'] : '587') !!} {!! Former::select('mail[encryption]')->label('Encryption')->options(['tls' => 'TLS', 'ssl' => 'SSL']) ->value(isset($_ENV['MAIL_ENCRYPTION']) ? $_ENV['MAIL_ENCRYPTION'] : 'tls') !!} {!! Former::text('mail[from][name]')->label('From Name') ->value(isset($_ENV['MAIL_FROM_NAME']) ? $_ENV['MAIL_FROM_NAME'] : '') !!} {!! Former::text('mail[username]')->label('Email') ->value(isset($_ENV['MAIL_USERNAME']) ? $_ENV['MAIL_USERNAME'] : '') !!} {!! Former::password('mail[password]')->label('Password') ->value(isset($_ENV['MAIL_PASSWORD']) ? $_ENV['MAIL_PASSWORD'] : '') !!} {!! Former::actions( Button::primary('Send test email')->small()->withAttributes(['onclick' => 'testMail()']), '  ' ) !!}

User Details

{!! Former::text('first_name') !!} {!! Former::text('last_name') !!} {!! Former::text('email') !!} {!! Former::password('password') !!}
{!! Former::checkbox('terms_checkbox')->label(' ')->text(trans('texts.agree_to_terms', ['terms' => ''.trans('texts.terms_of_service').''])) !!} {!! Former::actions( Button::primary('Submit')->large()->submit() ) !!} {!! Former::close() !!}