Skip to content

Commit

Permalink
Merge branch 'feature/v3' into develop
Browse files Browse the repository at this point in the history
* feature/v3:
  Update navbar laravel/framework#23191
  Asset fixes
  Apply fixes from StyleCI (#20)
  Add socialite fuctionality
  Asset updates and tests
  Navbar accessibility update laravel/framework@07950f9
  Blade updates and directory refactor
  Apply fixes from StyleCI (#19)
  Package updates and helper classes
  Models directory refactor
  Updated composer config and webpack
  Updated the readme
  Update npm to yarn
  Adds travis config
  Apply fixes from StyleCI (#18)
  Update the .env variables
  Fresh L5.6 installation
  • Loading branch information
austintoddj committed Feb 17, 2018
2 parents 04b6aa2 + 068075f commit 7b80c3d
Show file tree
Hide file tree
Showing 76 changed files with 1,033 additions and 877 deletions.
8 changes: 6 additions & 2 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@ APP_NAME="Laravel Zoom"
APP_ENV=local
APP_KEY=
APP_DEBUG=true
APP_LOG_LEVEL=debug
APP_URL=http://laravel-zoom.test
APP_REGISTRATION=true

LOG_CHANNEL=stack

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
Expand Down Expand Up @@ -53,4 +54,7 @@ MAIL_ENCRYPTION=null
PUSHER_APP_ID=
PUSHER_APP_KEY=
PUSHER_APP_SECRET=
PUSHER_APP_CLUSTER=mt1
PUSHER_APP_CLUSTER=mt1

MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ Homestead.json
Homestead.yaml
npm-debug.log
yarn-error.log
.env
.env
1 change: 1 addition & 0 deletions admin/img/laravel-zoom.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion app/Http/Controllers/Auth/LoginController.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,13 @@ public function handleProviderCallback($social)
{
$userSocial = Socialite::driver($social)->user();
$user = User::where(['email' => $userSocial->getEmail()])->first();

if ($user) {
Auth::login($user);

return redirect(route('dashboard'));
} else {
return view('auth.register', ['name' => $userSocial->getName(), 'email' => $userSocial->getEmail()]);
return view('auth.register', ['name' => $userSocial->name, 'email' => $userSocial->email]);
}
}
}
2 changes: 1 addition & 1 deletion app/Http/Controllers/Auth/RegisterController.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ protected function validator(array $data)
* Create a new user instance after a valid registration.
*
* @param array $data
* @return \App\User
* @return \App\Models\User
*/
protected function create(array $data)
{
Expand Down
1 change: 1 addition & 0 deletions app/Http/Kernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ class Kernel extends HttpKernel
'auth' => \Illuminate\Auth\Middleware\Authenticate::class,
'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
'bindings' => \Illuminate\Routing\Middleware\SubstituteBindings::class,
'cache.headers' => \Illuminate\Http\Middleware\SetCacheHeaders::class,
'can' => \Illuminate\Auth\Middleware\Authorize::class,
'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class,
'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
Expand Down
12 changes: 3 additions & 9 deletions app/Http/Middleware/TrustProxies.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,9 @@ class TrustProxies extends Middleware
protected $proxies;

/**
* The current proxy header mappings.
* The headers that should be used to detect proxies.
*
* @var array
* @var string
*/
protected $headers = [
Request::HEADER_FORWARDED => 'FORWARDED',
Request::HEADER_X_FORWARDED_FOR => 'X_FORWARDED_FOR',
Request::HEADER_X_FORWARDED_HOST => 'X_FORWARDED_HOST',
Request::HEADER_X_FORWARDED_PORT => 'X_FORWARDED_PORT',
Request::HEADER_X_FORWARDED_PROTO => 'X_FORWARDED_PROTO',
];
protected $headers = Request::HEADER_X_FORWARDED_ALL;
}
3 changes: 3 additions & 0 deletions app/Models/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,14 @@
class User extends Authenticatable
{
use Notifiable;

/**
* The database table used by the model.
*
* @string $table
*/
protected $table = 'users';

/**
* The attributes that are mass assignable.
*
Expand All @@ -22,6 +24,7 @@ class User extends Authenticatable
protected $fillable = [
'name', 'email', 'password',
];

/**
* The attributes that should be hidden for arrays.
*
Expand Down
2 changes: 0 additions & 2 deletions app/Providers/EventServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,9 @@ class EventServiceProvider extends ServiceProvider
'Illuminate\Auth\Events\Registered' => [
'App\Listeners\LogRegisteredUser',
],

'Illuminate\Auth\Events\Login' => [
'App\Listeners\LogSuccessfulLogin',
],

'Illuminate\Auth\Events\Failed' => [
'App\Listeners\LogFailedLogin',
],
Expand Down
Empty file modified artisan
100644 → 100755
Empty file.
Empty file modified bootstrap/cache/.gitignore
100755 → 100644
Empty file.
21 changes: 12 additions & 9 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,23 @@
}
],
"require": {
"php": ">=7.0.0",
"php": ">=7.1.3",
"bepsvpt/secure-headers": "^4.1",
"fideloper/proxy": "~3.3",
"laravel/framework": "5.5.*",
"fideloper/proxy": "~4.0",
"laravel/framework": "5.6.*",
"laravel/socialite": "^3.0",
"laravel/tinker": "~1.0",
"spatie/laravel-activitylog": "^2.3"
"spatie/laravel-activitylog": "^2.5"
},
"require-dev": {
"barryvdh/laravel-debugbar": "^3.1",
"barryvdh/laravel-ide-helper": "^2.4",
"filp/whoops": "~2.0",
"fzaninotto/faker": "~1.4",
"mockery/mockery": "~1.0",
"phpunit/phpunit": "~6.0",
"symfony/thanks": "^1.0",
"barryvdh/laravel-debugbar": "^3.1",
"barryvdh/laravel-ide-helper": "^2.4"
"nunomaduro/collision": "~1.1",
"phpunit/phpunit": "~7.0",
"symfony/thanks": "^1.0"
},
"autoload": {
"classmap": [
Expand Down Expand Up @@ -64,5 +65,7 @@
"preferred-install": "dist",
"sort-packages": true,
"optimize-autoloader": true
}
},
"minimum-stability": "dev",
"prefer-stable": true
}
Loading

0 comments on commit 7b80c3d

Please sign in to comment.