Skip to content

Commit

Permalink
Followed Laravel 5.1 upgrade guide
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisforrence committed Jun 11, 2015
1 parent 7c72b83 commit 5a3753f
Show file tree
Hide file tree
Showing 10 changed files with 356 additions and 336 deletions.
7 changes: 0 additions & 7 deletions app/Commands/Command.php

This file was deleted.

42 changes: 33 additions & 9 deletions app/Http/Controllers/Auth/AuthController.php
@@ -1,10 +1,9 @@
<?php namespace App\Http\Controllers\Auth;

use App\Http\Controllers\Controller;
use Illuminate\Contracts\Auth\Guard;
use Illuminate\Contracts\Auth\Registrar;
use Illuminate\Foundation\Auth\AuthenticatesAndRegistersUsers;
use App\User;
use Validator;

class AuthController extends Controller {

Expand All @@ -24,19 +23,44 @@ class AuthController extends Controller {
//protected $redirectTo = '/projects';
protected $redirectPath = '/projects';

/**
/**
* Create a new authentication controller instance.
*
* @param \Illuminate\Contracts\Auth\Guard $auth
* @param \Illuminate\Contracts\Auth\Registrar $registrar
* @return void
*/
public function __construct(Guard $auth, Registrar $registrar)
public function __construct()
{
$this->auth = $auth;
$this->registrar = $registrar;

$this->middleware('guest', ['except' => 'getLogout']);
}

/**
* Get a validator for an incoming registration request.
*
* @param array $data
* @return \Illuminate\Contracts\Validation\Validator
*/
public function validator(array $data)
{
return Validator::make($data, [
'name' => 'required|max:255',
'email' => 'required|email|max:255|unique:users',
'password' => 'required|confirmed|min:6',
]);
}

/**
* Create a new user instance after a valid registration.
*
* @param array $data
* @return User
*/
public function create(array $data)
{
return User::create([
'name' => $data['name'],
'email' => $data['email'],
'password' => bcrypt($data['password']),
]);
}

}
9 changes: 1 addition & 8 deletions app/Http/Controllers/Auth/PasswordController.php
@@ -1,8 +1,6 @@
<?php namespace App\Http\Controllers\Auth;

use App\Http\Controllers\Controller;
use Illuminate\Contracts\Auth\Guard;
use Illuminate\Contracts\Auth\PasswordBroker;
use Illuminate\Foundation\Auth\ResetsPasswords;

class PasswordController extends Controller {
Expand All @@ -23,15 +21,10 @@ class PasswordController extends Controller {
/**
* Create a new password controller instance.
*
* @param \Illuminate\Contracts\Auth\Guard $auth
* @param \Illuminate\Contracts\Auth\PasswordBroker $passwords
* @return void
*/
public function __construct(Guard $auth, PasswordBroker $passwords)
public function __construct()
{
$this->auth = $auth;
$this->passwords = $passwords;

$this->middleware('guest');
}

Expand Down
7 changes: 7 additions & 0 deletions app/Jobs/Job.php
@@ -0,0 +1,7 @@
<?php namespace App\Jobs;

abstract class Job {

//

}
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion bootstrap/autoload.php
Expand Up @@ -27,7 +27,7 @@
|
*/

$compiledPath = __DIR__.'/../vendor/compiled.php';
$compiledPath = __DIR__.'/cache/compiled.php';

if (file_exists($compiledPath))
{
Expand Down
2 changes: 2 additions & 0 deletions bootstrap/cache/.gitignore
@@ -0,0 +1,2 @@
*
!.gitignore

0 comments on commit 5a3753f

Please sign in to comment.