Attachment controller basic index.

This commit is contained in:
James Cole
2018-04-28 06:34:01 +02:00
parent 13b78bdc20
commit cabe90b2dd
4 changed files with 91 additions and 0 deletions

View File

@@ -248,6 +248,14 @@ Breadcrumbs::register(
);
// ATTACHMENTS
Breadcrumbs::register(
'attachments.index',
function (BreadCrumbsGenerator $breadcrumbs) {
$breadcrumbs->parent('home');
$breadcrumbs->push(trans('firefly.attachments'), route('attachments.index'));
}
);
Breadcrumbs::register(
'attachments.edit',
function (BreadCrumbsGenerator $breadcrumbs, Attachment $attachment) {

View File

@@ -140,6 +140,7 @@ Route::group(
*/
Route::group(
['middleware' => 'user-full-auth', 'namespace' => 'FireflyIII\Http\Controllers', 'prefix' => 'attachments', 'as' => 'attachments.'], function () {
Route::get('', ['uses' => 'AttachmentController@index', 'as' => 'index']);
Route::get('edit/{attachment}', ['uses' => 'AttachmentController@edit', 'as' => 'edit']);
Route::get('delete/{attachment}', ['uses' => 'AttachmentController@delete', 'as' => 'delete']);
Route::get('download/{attachment}', ['uses' => 'AttachmentController@download', 'as' => 'download']);