From ec601efa6eee858ca05163f318d644bf3db475fe Mon Sep 17 00:00:00 2001 From: Sander Dorigo Date: Sun, 5 Oct 2014 08:27:49 +0200 Subject: [PATCH] close #11, close #10 --- app/breadcrumbs.php | 7 +++++++ app/config/app.php | 4 ++-- .../davejamesmiller/laravel-breadcrumbs/config.php | 5 +++++ app/controllers/HomeController.php | 2 +- app/start/global.php | 14 ++++++++++++++ app/views/index.blade.php | 1 + bootstrap/start.php | 13 ++++++------- 7 files changed, 36 insertions(+), 10 deletions(-) create mode 100644 app/breadcrumbs.php create mode 100644 app/config/packages/davejamesmiller/laravel-breadcrumbs/config.php diff --git a/app/breadcrumbs.php b/app/breadcrumbs.php new file mode 100644 index 0000000000..0aff5d9441 --- /dev/null +++ b/app/breadcrumbs.php @@ -0,0 +1,7 @@ +push('Home', route('index')); +}); \ No newline at end of file diff --git a/app/config/app.php b/app/config/app.php index 4edef323d3..85182e8c8e 100644 --- a/app/config/app.php +++ b/app/config/app.php @@ -37,8 +37,8 @@ return [ 'Illuminate\Validation\ValidationServiceProvider', 'Illuminate\View\ViewServiceProvider', 'Illuminate\Workbench\WorkbenchServiceProvider', -# 'Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider', -# 'Barryvdh\Debugbar\ServiceProvider', + 'Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider', + 'Barryvdh\Debugbar\ServiceProvider', 'Firefly\Storage\StorageServiceProvider', 'Firefly\Helper\HelperServiceProvider', 'Firefly\Validation\ValidationServiceProvider', diff --git a/app/config/packages/davejamesmiller/laravel-breadcrumbs/config.php b/app/config/packages/davejamesmiller/laravel-breadcrumbs/config.php new file mode 100644 index 0000000000..a46482b491 --- /dev/null +++ b/app/config/packages/davejamesmiller/laravel-breadcrumbs/config.php @@ -0,0 +1,5 @@ + 'laravel-breadcrumbs::bootstrap3', +); diff --git a/app/controllers/HomeController.php b/app/controllers/HomeController.php index 4570ee1635..cc531aa560 100644 --- a/app/controllers/HomeController.php +++ b/app/controllers/HomeController.php @@ -100,6 +100,6 @@ class HomeController extends BaseController // build the home screen: return View::make('index')->with('count', $count)->with('transactions', $transactions)->with('title', 'Firefly') - ->with('subTitle', 'What\'s playing?'); + ->with('subTitle', 'What\'s playing?')->with('mainTitleIcon','fa-fire'); } } \ No newline at end of file diff --git a/app/start/global.php b/app/start/global.php index c082c61d28..2a9c06beca 100644 --- a/app/start/global.php +++ b/app/start/global.php @@ -71,6 +71,20 @@ App::down( } ); +// forms: +\Form::macro('ffText', function ($name, $value = null, array $options = []) { + return \Firefly\Form\Form::ffText($name, $value, $options); +}); +\Form::macro('ffSelect', function ($name, array $list = [], $selected = null, array $options = []) { + return \Firefly\Form\Form::ffSelect($name, $list, $selected, $options); +}); +\Form::macro('ffAmount', function ($name, $value = null, array $options = []) { + return \Firefly\Form\Form::ffAmount($name, $value, $options); +}); +\Form::macro('ffDate', function ($name, $value = null, array $options = []) { + return \Firefly\Form\Form::ffDate($name, $value, $options); +}); + /* |-------------------------------------------------------------------------- | Require The Filters File diff --git a/app/views/index.blade.php b/app/views/index.blade.php index ed0a039e7c..82e261d62f 100644 --- a/app/views/index.blade.php +++ b/app/views/index.blade.php @@ -1,5 +1,6 @@ @extends('layouts.default') @section('content') +{{ Breadcrumbs::render('home') }} @if($count == 0)
diff --git a/bootstrap/start.php b/bootstrap/start.php index 08314820de..7edb58f2c9 100644 --- a/bootstrap/start.php +++ b/bootstrap/start.php @@ -37,12 +37,11 @@ $app = new Illuminate\Foundation\Application; | */ -$env = $app->detectEnvironment( - function () { - // Default to production if LARAVEL_ENV is not set - return getenv('LARAVEL_ENV') ? : 'production'; - } -); +$env = $app->detectEnvironment(array( + + 'local' => array('homestead', 'SMJD*'), + + )); /* @@ -70,7 +69,7 @@ $app->bindInstallPaths(require __DIR__ . '/paths.php'); */ $framework = $app['path.base'] . - '/vendor/laravel/framework/src'; + '/vendor/laravel/framework/src'; require $framework . '/Illuminate/Foundation/start.php';