mirror of
https://github.com/cp6/my-idlers.git
synced 2024-11-16 23:42:32 +01:00
27 lines
571 B
PHP
27 lines
571 B
PHP
|
<?php
|
||
|
|
||
|
namespace App\Http\Controllers;
|
||
|
|
||
|
use Illuminate\Http\Request;
|
||
|
use Illuminate\Support\Facades\Auth;
|
||
|
use Illuminate\Support\Facades\DB;
|
||
|
|
||
|
class AccountController extends Controller
|
||
|
{
|
||
|
public function index()
|
||
|
{
|
||
|
return view('account.index');
|
||
|
}
|
||
|
|
||
|
public function update(Request $request)
|
||
|
{
|
||
|
$user = Auth::user();
|
||
|
$user->name = $request->name;
|
||
|
$user->email = $request->email;
|
||
|
$user->save();
|
||
|
|
||
|
return redirect()->route('account.index')
|
||
|
->with('success', 'Account Updated Successfully.');
|
||
|
}
|
||
|
}
|