Skip to content

Commit e2759cf

Browse files
authored
Merge pull request #132 from NottingHack/laravel-5.4
Laravel 5.4
2 parents 3c14909 + 3a0aee2 commit e2759cf

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+4327
-2792
lines changed

.env.behat

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1+
APP_NAME="Hackspace Managment System"
12
APP_ENV=acceptance
2-
APP_DEBUG=true
33
APP_KEY=12345678123456781234567812345678
4+
APP_DEBUG=true
45

56
DB_CONNECTION=mysql
67
DB_HOST=127.0.0.1
@@ -21,10 +22,13 @@ REDIS_PASSWORD=null
2122
REDIS_PORT=6379
2223

2324
MAIL_DRIVER=smtp
24-
MAIL_HOST=mailtrap.io
25+
MAIL_HOST=smtp.mailtrap.io
2526
MAIL_PORT=2525
2627
MAIL_USERNAME=null
2728
MAIL_PASSWORD=null
2829
MAIL_ENCRYPTION=null
30+
MAIL_FROM_ADDRESS=null
31+
MAIL_FROM_NAME=null
2932

3033
PASSWORDSTORE=FileBased
34+
PASSWORDSTORE_FILE=users.json

.env.example

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
APP_NAME=Laravel
12
APP_ENV=local
23
APP_KEY=
34
APP_DEBUG=true
@@ -21,12 +22,14 @@ REDIS_PASSWORD=null
2122
REDIS_PORT=6379
2223

2324
MAIL_DRIVER=smtp
24-
MAIL_HOST=mailtrap.io
25+
MAIL_HOST=smtp.mailtrap.io
2526
MAIL_PORT=2525
2627
MAIL_USERNAME=null
2728
MAIL_PASSWORD=null
2829
MAIL_ENCRYPTION=null
30+
MAIL_FROM_ADDRESS=null
31+
MAIL_FROM_NAME=null
2932

3033
PUSHER_APP_ID=
31-
PUSHER_KEY=
32-
PUSHER_SECRET=
34+
PUSHER_APP_KEY=
35+
PUSHER_APP_SECRET=

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
* text=auto
22
*.css linguist-vendored
33
*.scss linguist-vendored
4+
*.js linguist-vendored
5+
CHANGELOG.md export-ignore

.gitignore

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
### Vagrant ###
2-
.vagrant/
3-
4-
51
### Laravel ###
62
/node_modules
3+
/public/hot
74
/public/storage
5+
/storage/*.key
86
/public/build
97
/vendor
108
/.idea
9+
/.vagrant
1110
Homestead.json
1211
Homestead.yaml
12+
npm-debug.log
1313
.env
1414
database/database.sqlite
1515

@@ -25,4 +25,5 @@ Thumbs.db
2525

2626
/public/css
2727
/public/js
28-
gulpwatch.log
28+
mixwatch.log
29+
/public/mix-manifest.json

Vagrantfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
1919
config.vm.provision :shell, path: "dev/vagrant-config/scripts/kerberos.sh"
2020
config.vm.provision :shell, path: "dev/vagrant-config/scripts/node.sh"
2121
config.vm.provision :shell, path: "dev/vagrant-config/scripts/laravel.sh"
22-
config.vm.provision :shell, path: "dev/vagrant-config/scripts/gulp.sh", privileged: false
22+
config.vm.provision :shell, path: "dev/vagrant-config/scripts/mix.sh", privileged: false
2323
config.vm.provision :shell, path: "dev/vagrant-config/scripts/finish.sh"
2424

2525
config.vm.network "private_network", ip: "192.168.25.35"

app/Exceptions/Handler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ protected function unauthenticated($request, AuthenticationException $exception)
6969
return response()->json(['error' => 'Unauthenticated.'], 401);
7070
}
7171

72-
return redirect()->guest('login');
72+
return redirect()->guest(route('login'));
7373
}
7474

7575
/**

app/Http/Controllers/Auth/LoginController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class LoginController extends Controller
3535
*/
3636
public function __construct()
3737
{
38-
$this->middleware('guest', ['except' => 'logout']);
38+
$this->middleware('guest')->except('logout');
3939
}
4040

4141
/**

app/Http/Kernel.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ class Kernel extends HttpKernel
1515
*/
1616
protected $middleware = [
1717
\Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode::class,
18+
\Illuminate\Foundation\Http\Middleware\ValidatePostSize::class,
19+
\App\Http\Middleware\TrimStrings::class,
20+
\Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull::class,
1821
];
1922

2023
/**
@@ -27,6 +30,7 @@ class Kernel extends HttpKernel
2730
\App\Http\Middleware\EncryptCookies::class,
2831
\Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
2932
\Illuminate\Session\Middleware\StartSession::class,
33+
// \Illuminate\Session\Middleware\AuthenticateSession::class,
3034
\Illuminate\View\Middleware\ShareErrorsFromSession::class,
3135
\App\Http\Middleware\VerifyCsrfToken::class,
3236
\App\Http\Middleware\SubstituteEntityBindings::class,
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?php
2+
3+
namespace App\Http\Middleware;
4+
5+
use Illuminate\Foundation\Http\Middleware\TrimStrings as BaseTrimmer;
6+
7+
class TrimStrings extends BaseTrimmer
8+
{
9+
/**
10+
* The names of the attributes that should not be trimmed.
11+
*
12+
* @var array
13+
*/
14+
protected $except = [
15+
'password',
16+
'password_confirmation',
17+
];
18+
}

app/Providers/BroadcastServiceProvider.php

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,6 @@ public function boot()
1616
{
1717
Broadcast::routes();
1818

19-
/*
20-
* Authenticate the user's personal channel...
21-
*/
22-
Broadcast::channel('App.User.*', function ($user, $userId) {
23-
return (int) $user->id === (int) $userId;
24-
});
19+
require base_path('routes/channels.php');
2520
}
2621
}

0 commit comments

Comments
 (0)