adds button to email user list of assets from profile
This commit is contained in:
@@ -23,6 +23,7 @@ use Redirect;
|
||||
use Str;
|
||||
use Symfony\Component\HttpFoundation\StreamedResponse;
|
||||
use View;
|
||||
use App\Notifications\CurrentInventory;
|
||||
|
||||
/**
|
||||
* This controller handles all actions related to Users for
|
||||
@@ -614,6 +615,19 @@ class UsersController extends Controller
|
||||
->with('show_user', $show_user)
|
||||
->with('settings', Setting::getSettings());
|
||||
}
|
||||
public function emailAssetList($id)
|
||||
{
|
||||
$this->authorize('view', User::class);
|
||||
|
||||
if( User::where('id', $id)->first()->exists())
|
||||
{
|
||||
$user= User::where('id', $id)->first();
|
||||
$user->notify((new CurrentInventory($user)));
|
||||
return redirect()->back()->with('success', 'admin/users/general.user_notified');
|
||||
}
|
||||
|
||||
return redirect()->back()->with('error', 'admin/accessories/message.user_does_not_exist');
|
||||
}
|
||||
|
||||
/**
|
||||
* Send individual password reset email
|
||||
|
||||
Reference in New Issue
Block a user