firefly-iii/app/Http/Controllers/ImportController.php
James Cole a447c886c4
Basic for for #262
Signed-off-by: James Cole <thegrumpydictator@gmail.com>
2016-05-22 21:11:30 +02:00

42 lines
1.0 KiB
PHP

<?php
namespace FireflyIII\Http\Controllers;
use FireflyIII\Http\Requests;
use View;
/**
* Class ImportController
*
* @package FireflyIII\Http\Controllers
*/
class ImportController extends Controller
{
/**
*
*/
public function __construct()
{
parent::__construct();
View::share('mainTitleIcon', 'fa-archive');
View::share('title', trans('firefly.import_data'));
}
/**
* @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
*/
public function index()
{
$subTitle = trans('firefly.import_data_index');
$subTitleIcon = 'fa-home';
$importFileTypes = [];
$defaultImportType = config('firefly.default_import_format');
foreach (array_keys(config('firefly.import_formats')) as $type) {
$importFileTypes[$type] = trans('firefly.import_file_type_' . $type);
}
return view('import.index', compact('subTitle', 'subTitleIcon', 'importFileTypes', 'defaultImportType'));
}
}