This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Authentication Routes... | |
$this->get('login', 'Auth\AuthController@showLoginForm'); | |
$this->post('login', 'Auth\AuthController@login'); | |
$this->get('logout', 'Auth\AuthController@logout'); | |
// Registration Routes... | |
$this->get('register', 'Auth\AuthController@showRegistrationForm'); | |
$this->post('register', 'Auth\AuthController@register'); | |
// Password Reset Routes... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Http\Controllers; | |
use Illuminate\Http\Request; | |
use App\Http\Requests; | |
class UserController extends Controller | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@extends('layouts.app') | |
@section('content') | |
<div class="container"> | |
@if(session()->has('status')) | |
<p class="alert alert-info"> | |
{{ session()->get('status') }} | |
</p> | |
@endif | |
<div class="col-sm-6 col-sm-offset-3"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@if (isset($errors) && (count($errors) > 0)) | |
<div class="alert alert-danger"> | |
<ul> | |
@foreach ($errors->all() as $error) | |
<li>{{ $error }}</li> | |
@endforeach | |
</ul> | |
</div> | |
@endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Show the form for creating a new resource. | |
* | |
* @return \Illuminate\Http\Response | |
*/ | |
public function create() | |
{ | |
return view('users.create'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
private function rules($user = null) { | |
$rules = [ | |
'name' => 'required|min:4', | |
'email' => 'required|email|unique:users', | |
'password' => 'required|min:8' | |
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
private function save($request, $user = null) { | |
$status = "update"; | |
if (! $user) { | |
$user = new User; | |
$status = "create"; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@extends('layouts.app') | |
@section('content') | |
<div class="container"> | |
@if(session()->has('status')) | |
<p class="alert alert-info"> | |
{{ session()->get('status') }} | |
</p> | |
@endif | |
<div class="col-sm-6 col-sm-offset-3"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Display the specified resource. | |
* | |
* @param App\User $user | |
* @return \Illuminate\Http\Response | |
*/ | |
public function show($user) | |
{ | |
return view('users.view', compact('user')); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Show the form for editing the specified resource. | |
* | |
* @param App\User $user | |
* @return \Illuminate\Http\Response | |
*/ | |
public function edit($user) | |
{ | |
return view('users.update', compact('user')); | |
} |
OlderNewer