Skip to content
This repository has been archived by the owner on Jun 24, 2024. It is now read-only.

Commit

Permalink
Merge branch 'release/1.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgecancinof committed Feb 8, 2016
2 parents 10b4d1f + bc6fdca commit 110813d
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 15 deletions.
25 changes: 13 additions & 12 deletions src/Flow.php
Original file line number Diff line number Diff line change
Expand Up @@ -400,25 +400,26 @@ private function flow_pack() {
}

/**
* Genera una URL de acuerdo al método de Laravel
* Genera una URL utilizando las funciones de Laravel
*
* @param array $url
* @param mixed $url
* @return string
*/
private function generarUrl($url)
{
if (array_key_exists('url', $url)) {
return url($url['url']);
}
if (is_array($url)) {
if (array_key_exists('url', $url))
return url($url['url']);

if (array_key_exists('route', $url)) {
return route($url['route']);
}
if (array_key_exists('route', $url))
return route($url['route']);

if (array_key_exists('action', $url)) {
return action($url['action']);
}
if (array_key_exists('action', $url))
return action($url['action']);

return '';
return '';
} else {
return $url;
}
}
}
4 changes: 1 addition & 3 deletions src/FlowServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,7 @@ public function register()
private function bindFlowClass()
{
$this->app->bind(Flow::class, function ($app) {
$flow = new Flow();

return $flow;
return new Flow();
});
}

Expand Down
3 changes: 3 additions & 0 deletions src/config/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
|--------------------------------------------------------------------------
|
| Valores posibles:
| 'http://www.comercio.cl/kpf/exito.php',
| ['url' => 'flow/exito'],
| ['route' => 'flow.exito'],
| ['action' => 'FlowController@exito'],
Expand All @@ -22,6 +23,7 @@
|--------------------------------------------------------------------------
|
| Valores posibles:
| 'http://www.comercio.cl/kpf/fracaso.php',
| ['url' => 'flow/fracaso'],
| ['route' => 'flow.fracaso'],
| ['action' => 'FlowController@fracaso'],
Expand All @@ -36,6 +38,7 @@
|--------------------------------------------------------------------------
|
| Valores posibles:
| 'http://www.comercio.cl/kpf/confirma.php',
| ['url' => 'flow/confirmacion'],
| ['route' => 'flow.confirmacion'],
| ['action' => 'FlowController@confirmacion'],
Expand Down

0 comments on commit 110813d

Please sign in to comment.