Merge branch 'master' of https://github.com/brkcvn/akaunting
This commit is contained in:
commit
57c7984c65
@ -8,13 +8,16 @@ class CompanyCreated extends Event
|
||||
{
|
||||
public $company;
|
||||
|
||||
public $request;
|
||||
|
||||
/**
|
||||
* Create a new event instance.
|
||||
*
|
||||
* @param $company
|
||||
*/
|
||||
public function __construct($company)
|
||||
public function __construct($company, $request = null)
|
||||
{
|
||||
$this->company = $company;
|
||||
$this->request = $request;
|
||||
}
|
||||
}
|
||||
|
@ -29,12 +29,12 @@ class CreateCompany extends Job implements HasOwner, HasSource, ShouldCreate
|
||||
$this->updateSettings();
|
||||
});
|
||||
|
||||
event(new CompanyCreated($this->model));
|
||||
|
||||
if (! empty($current_company_id)) {
|
||||
company($current_company_id)->makeCurrent();
|
||||
}
|
||||
|
||||
event(new CompanyCreated($this->model, $this->request));
|
||||
|
||||
return $this->model;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user