1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-09-21 00:41:34 +02:00
invoiceninja/app/Models/Bank.php
David Bomba 62e2444a2c
Sign Up Scaffolding (#2453)
* Fix js dependencies

* Breadcrumb implementation

* Test for UniqueEmailRule Validation

* reduce length of account_key to prevent key too long error

* Fixes for travis - reduce user email length

* Reduce all unique field lengths to 100 to prevent key overflow

* Fix for Bank Model

* Prevent a user from registering multiple account with one email address when using multiple databases
2018-10-17 23:26:27 +11:00

29 lines
462 B
PHP

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
/**
* Class Bank.
*/
class Bank extends Model
{
/**
* @var bool
*/
public $timestamps = false;
/**
* @param $finance
*
* @return \App\Libraries\Bank
*/
public function getOFXBank($finance)
{
$config = json_decode($this->config);
return new \App\Libraries\Bank($finance, $config->fid, $config->url, $config->org);
}
}