2016-01-11 13:41:57 -06:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* RuleController.php
|
|
|
|
* Copyright (C) 2016 Sander Dorigo
|
|
|
|
*
|
|
|
|
* This software may be modified and distributed under the terms
|
|
|
|
* of the MIT license. See the LICENSE file for details.
|
|
|
|
*/
|
|
|
|
|
|
|
|
namespace FireflyIII\Http\Controllers;
|
|
|
|
|
2016-01-13 08:59:45 -06:00
|
|
|
use Auth;
|
2016-01-11 13:41:57 -06:00
|
|
|
use FireflyIII\Http\Requests;
|
2016-01-13 09:05:39 -06:00
|
|
|
use FireflyIII\Models\Rule;
|
2016-01-11 13:41:57 -06:00
|
|
|
use View;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Class RuleController
|
|
|
|
*
|
|
|
|
* @package FireflyIII\Http\Controllers
|
|
|
|
*/
|
|
|
|
class RuleController extends Controller
|
|
|
|
{
|
2016-01-12 13:56:53 -06:00
|
|
|
/**
|
|
|
|
* RuleController constructor.
|
|
|
|
*/
|
2016-01-11 13:41:57 -06:00
|
|
|
public function __construct()
|
|
|
|
{
|
|
|
|
parent::__construct();
|
|
|
|
View::share('title', trans('firefly.rules'));
|
|
|
|
View::share('mainTitleIcon', 'fa-random');
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2016-01-12 13:56:53 -06:00
|
|
|
/**
|
|
|
|
* @return View
|
|
|
|
*/
|
2016-01-11 13:41:57 -06:00
|
|
|
public function index()
|
|
|
|
{
|
2016-01-13 08:59:45 -06:00
|
|
|
$ruleGroups = Auth::user()->ruleGroups()->with('rules')->get();
|
|
|
|
|
|
|
|
return view('rules.index', compact('ruleGroups'));
|
2016-01-11 13:41:57 -06:00
|
|
|
}
|
2016-01-13 09:05:39 -06:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @param Rule $rule
|
|
|
|
*/
|
|
|
|
public function upRule(Rule $rule)
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|
2016-01-11 13:41:57 -06:00
|
|
|
}
|