Commit bfa9df26 authored by nirgendswo's avatar nirgendswo

repo

parent 40e55f89
......@@ -86,7 +86,7 @@ class ViewHelper
}
$string = array_slice($string, 0, 1);
$result = Lang::trans('date.ago', ['date' => implode(', ', $string)]);
$result = Lang::choice('date.ago', ['date' => implode(', ', $string)]);
return $result;
}
......
......@@ -78,8 +78,9 @@ class PageRepository
/**
* find pages
*
* @param
* @param string $datetime
* @param array $parameters
* @param array $options [description]
* @return array
*/
public function find($parameters = [], $options = [])
{
......@@ -87,7 +88,7 @@ class PageRepository
$parameters = array_merge($this->parameters, $parameters);
$options = array_merge($this->options, $options);
// @TODO basepath
// adding parent if
$path = $this->repositoryPath.'/'.$parameters['parent'];
unset($parameters['parent']);
......@@ -113,8 +114,10 @@ class PageRepository
}
/**
* parse slug from $filePathname
*
* @param string $filePath
* @param string $filePathname
* @param string $repositoryPath
* @return string
*/
protected function parseSlug($filePathname, $repositoryPath)
......@@ -218,7 +221,7 @@ class PageRepository
/**
* where
*
* @param Array $parameters
* @param array $parameters
* @param Page $page
* @return mixed
*/
......@@ -228,8 +231,10 @@ class PageRepository
if (!isset($page->data['hidden'])) {
foreach($parameters as $key => $parameter) {
if (isset($page->data[$key]) && $page->data[$key] === $parameter) {
$result = $page;
if (isset($page->data[$key])) {
if ($page->data[$key] === $parameter) {
$result = $page;
}
}
}
}
......
......@@ -24,6 +24,7 @@ $app = new Laravel\Lumen\Application(
);
$app->withFacades();
$app->configure('app');
/*
|--------------------------------------------------------------------------
......@@ -96,9 +97,4 @@ $app->group(['namespace' => 'App\Http\Controllers'], function ($app) {
require __DIR__.'/../routes/web.php';
});
/*
| Call configure
*/
$app->configure('app');
return $app;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment