mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Updated various classes and tests.
This commit is contained in:
@@ -1,99 +1,99 @@
|
||||
<?php
|
||||
|
||||
use Firefly\Storage\Account\AccountRepositoryInterface as ARI;
|
||||
//use Firefly\Storage\Account\AccountRepositoryInterface as ARI;
|
||||
|
||||
class AccountController extends \BaseController {
|
||||
|
||||
public function __construct(ARI $accounts) {
|
||||
$this->accounts = $accounts;
|
||||
}
|
||||
|
||||
/**
|
||||
* Display a listing of the resource.
|
||||
*
|
||||
* @return Response
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Show the form for creating a new resource.
|
||||
*
|
||||
* @return Response
|
||||
*/
|
||||
public function create()
|
||||
{
|
||||
if($this->accounts->count() == 0) {
|
||||
return View::make('accounts.create-first-time');
|
||||
}
|
||||
return View::make('accounts');
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Store a newly created resource in storage.
|
||||
*
|
||||
* @return Response
|
||||
*/
|
||||
public function store()
|
||||
{
|
||||
$account = $this->accounts->store();
|
||||
if($account === false) {
|
||||
Session::flash('error','Could not create account with provided information');
|
||||
return Redirect::route('accounts.create')->withInput()->withErrors($this->accounts->validator);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Display the specified resource.
|
||||
*
|
||||
* @param int $id
|
||||
* @return Response
|
||||
*/
|
||||
public function show($id)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Show the form for editing the specified resource.
|
||||
*
|
||||
* @param int $id
|
||||
* @return Response
|
||||
*/
|
||||
public function edit($id)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Update the specified resource in storage.
|
||||
*
|
||||
* @param int $id
|
||||
* @return Response
|
||||
*/
|
||||
public function update($id)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Remove the specified resource from storage.
|
||||
*
|
||||
* @param int $id
|
||||
* @return Response
|
||||
*/
|
||||
public function destroy($id)
|
||||
{
|
||||
//
|
||||
}
|
||||
// public function __construct(ARI $accounts) {
|
||||
// $this->accounts = $accounts;
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * Display a listing of the resource.
|
||||
// *
|
||||
// * @return Response
|
||||
// */
|
||||
// public function index()
|
||||
// {
|
||||
//
|
||||
// }
|
||||
//
|
||||
//
|
||||
// /**
|
||||
// * Show the form for creating a new resource.
|
||||
// *
|
||||
// * @return Response
|
||||
// */
|
||||
// public function create()
|
||||
// {
|
||||
// if($this->accounts->count() == 0) {
|
||||
// return View::make('accounts.create-first-time');
|
||||
// }
|
||||
// return View::make('accounts');
|
||||
// }
|
||||
//
|
||||
//
|
||||
// /**
|
||||
// * Store a newly created resource in storage.
|
||||
// *
|
||||
// * @return Response
|
||||
// */
|
||||
// public function store()
|
||||
// {
|
||||
// $account = $this->accounts->store();
|
||||
// if($account === false) {
|
||||
// Session::flash('error','Could not create account with provided information');
|
||||
// return Redirect::route('accounts.create')->withInput()->withErrors($this->accounts->validator);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
//
|
||||
// /**
|
||||
// * Display the specified resource.
|
||||
// *
|
||||
// * @param int $id
|
||||
// * @return Response
|
||||
// */
|
||||
// public function show($id)
|
||||
// {
|
||||
// //
|
||||
// }
|
||||
//
|
||||
//
|
||||
// /**
|
||||
// * Show the form for editing the specified resource.
|
||||
// *
|
||||
// * @param int $id
|
||||
// * @return Response
|
||||
// */
|
||||
// public function edit($id)
|
||||
// {
|
||||
// //
|
||||
// }
|
||||
//
|
||||
//
|
||||
// /**
|
||||
// * Update the specified resource in storage.
|
||||
// *
|
||||
// * @param int $id
|
||||
// * @return Response
|
||||
// */
|
||||
// public function update($id)
|
||||
// {
|
||||
// //
|
||||
// }
|
||||
//
|
||||
//
|
||||
// /**
|
||||
// * Remove the specified resource from storage.
|
||||
// *
|
||||
// * @param int $id
|
||||
// * @return Response
|
||||
// */
|
||||
// public function destroy($id)
|
||||
// {
|
||||
// //
|
||||
// }
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user