Skip to content

Commit

Permalink
## v1.6.1 (2018-04-06)
Browse files Browse the repository at this point in the history
### Bugfix
- AdminMedtodsCreate. Use AdminMedtodsStore in anonymous function
  • Loading branch information
Alexandr Fanamurov committed Apr 6, 2018
1 parent dc2bb0f commit cff3e6a
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
@@ -1,5 +1,9 @@
# Release Notes

## v1.6.1 (2018-04-06)
### Bugfix
- AdminMedtodsCreate. Use AdminMedtodsStore in anonymous function

## v1.6 (2018-04-06)
### Changed
- Component shareConfig method. Now config component in var "package" (old "app")
Expand Down
4 changes: 2 additions & 2 deletions src/Traits/AdminMethodsCreate.php
Expand Up @@ -15,7 +15,7 @@ trait AdminMethodsCreate
/**
* Creating a new resource.
* @param Request $request
* @return \Illuminate\Http\Response
* @return \Illuminate\Http\Response|\Illuminate\Http\RedirectResponse
* @throws \Exception
*/
public function create(Request $request)
Expand Down Expand Up @@ -54,7 +54,7 @@ public function create(Request $request)
use AdminMethodsStore;
};

return $trait->store($test);
return $trait->setConfig($this->config)->store($test);
}

return $this->store($test);
Expand Down
11 changes: 11 additions & 0 deletions src/Traits/AdminMethodsStore.php
Expand Up @@ -22,6 +22,17 @@ trait AdminMethodsStore
*/
public $allow_redirect = true;

/**
* @param Component $config
* @return bool
*/
public function setConfig($config)
{
$this->config = $config;

return true;
}

/**
* Store a newly created resource in storage.
*
Expand Down

0 comments on commit cff3e6a

Please sign in to comment.