Fixed user upload route

This commit is contained in:
snipe 2017-03-03 18:41:13 -08:00
parent 97dd5a58fb
commit 2e274b5f21
2 changed files with 11 additions and 2 deletions

View file

@ -126,6 +126,14 @@
<td>Name</td>
<td>{{ $user->present()->fullName() }}</td>
</tr>
@if ($user->last_login)
<tr>
<td>{{ trans('general.last_login') }}</td>
<td>{{ \App\Helpers\Helper::getFormattedDateObject($user->last_login, 'datetime', false) }}</td>
</tr>
@endif
@if ($user->jobtitle)
<tr>
<td>Title</td>
@ -232,12 +240,12 @@
<tr>
<td>
@if ($asset->physical=='1')
{!! $asset->model->present()->nameUrl() !!}
<a href="{{ route('models.show', $asset->model->id) }}">{{ $asset->model->name }}</a>
@endif
</td>
<td>
@can('view', $asset)
{!! $asset->present()->assetTagUrl() !!}
<a href="{{ route('hardware.show', $asset->id) }}">{{ $asset->asset_tag }}</a>
@endcan
</td>
<td>{!! $asset->present()->nameUrl() !!}</td>

View file

@ -12,6 +12,7 @@ Route::group([ 'prefix' => 'users', 'middleware' => ['web','auth']], function ()
Route::post('{userId}/clone', [ 'uses' => 'UsersController@postCreate' ]);
Route::get('{userId}/restore', [ 'as' => 'restore/user', 'uses' => 'UsersController@getRestore' ]);
Route::get('{userId}/unsuspend', [ 'as' => 'unsuspend/user', 'uses' => 'UsersController@getUnsuspend' ]);
Route::post('{userId}/upload', [ 'as' => 'upload/user', 'uses' => 'UsersController@postUpload' ]);
Route::get(
'{userId}/deletefile/{fileId}',
[ 'as' => 'delete/userfile', 'uses' => 'UsersController@getDeleteFile' ]