First version almost done
This commit is contained in:
parent
b5c1f40a45
commit
7a33f5f889
14 changed files with 274 additions and 28 deletions
|
|
@ -49,6 +49,8 @@ class UsersController extends Controller
|
|||
public function store() {
|
||||
$season_id = Season::getCurrent()->id;
|
||||
|
||||
|
||||
|
||||
// Validate form
|
||||
$this->validate(request(), [
|
||||
'id' => 'required',
|
||||
|
|
@ -63,13 +65,20 @@ class UsersController extends Controller
|
|||
$user->name=request('name');
|
||||
$user->email=request('email');
|
||||
|
||||
if (request()->has('admin')) { $user->admin=request('admin'); }
|
||||
if (request()->has('admin')) {
|
||||
$user->admin = true;
|
||||
|
||||
} else {
|
||||
$user->admin=false;
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
$user->save();
|
||||
|
||||
//dd(request('id'), $season_id, request('paid'));
|
||||
Payment::set_payment_date(request('id'), $season_id, request('paid'));
|
||||
|
||||
if (request()->has('paid')) {
|
||||
Payment::set_payment_date(request('id'), $season_id, request('paid'));
|
||||
}
|
||||
|
||||
// Redirect to the home page
|
||||
return redirect('/users');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue