Namespaced models and refactored filters
This commit is contained in:
38
src/Http/Controllers/DashUserController.php
Normal file
38
src/Http/Controllers/DashUserController.php
Normal file
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
namespace CachetHQ\Cachet\Http\Controllers;
|
||||
|
||||
use Illuminate\Routing\Controller;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Illuminate\Support\Facades\Input;
|
||||
use Illuminate\Support\Facades\Redirect;
|
||||
use Illuminate\Support\Facades\View;
|
||||
|
||||
class DashUserController extends Controller
|
||||
{
|
||||
/**
|
||||
* Shows the user view.
|
||||
*
|
||||
* @return \Illuminate\View\View
|
||||
*/
|
||||
public function showUser()
|
||||
{
|
||||
return View::make('dashboard.user.index')->with([
|
||||
'pageTitle' => 'User - Dashboard',
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates the current user.
|
||||
*
|
||||
* @return \Illuminate\View\View
|
||||
*/
|
||||
public function postUser()
|
||||
{
|
||||
$items = Input::all();
|
||||
|
||||
$updated = Auth::user()->update($items);
|
||||
|
||||
return Redirect::back()->with('updated', $updated);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user