Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions .env.behat
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
APP_NAME="Hackspace Managment System"
APP_ENV=acceptance
APP_DEBUG=true
APP_KEY=12345678123456781234567812345678
APP_DEBUG=true

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
Expand All @@ -21,10 +22,13 @@ REDIS_PASSWORD=null
REDIS_PORT=6379

MAIL_DRIVER=smtp
MAIL_HOST=mailtrap.io
MAIL_HOST=smtp.mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
MAIL_FROM_ADDRESS=null
MAIL_FROM_NAME=null

PASSWORDSTORE=FileBased
PASSWORDSTORE_FILE=users.json
9 changes: 6 additions & 3 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
APP_NAME=Laravel
APP_ENV=local
APP_KEY=
APP_DEBUG=true
Expand All @@ -21,12 +22,14 @@ REDIS_PASSWORD=null
REDIS_PORT=6379

MAIL_DRIVER=smtp
MAIL_HOST=mailtrap.io
MAIL_HOST=smtp.mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
MAIL_FROM_ADDRESS=null
MAIL_FROM_NAME=null

PUSHER_APP_ID=
PUSHER_KEY=
PUSHER_SECRET=
PUSHER_APP_KEY=
PUSHER_APP_SECRET=
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
* text=auto
*.css linguist-vendored
*.scss linguist-vendored
*.js linguist-vendored
CHANGELOG.md export-ignore
11 changes: 6 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
### Vagrant ###
.vagrant/


### Laravel ###
/node_modules
/public/hot
/public/storage
/storage/*.key
/public/build
/vendor
/.idea
/.vagrant
Homestead.json
Homestead.yaml
npm-debug.log
.env
database/database.sqlite

Expand All @@ -25,4 +25,5 @@ Thumbs.db

/public/css
/public/js
gulpwatch.log
mixwatch.log
/public/mix-manifest.json
2 changes: 1 addition & 1 deletion Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.provision :shell, path: "dev/vagrant-config/scripts/kerberos.sh"
config.vm.provision :shell, path: "dev/vagrant-config/scripts/node.sh"
config.vm.provision :shell, path: "dev/vagrant-config/scripts/laravel.sh"
config.vm.provision :shell, path: "dev/vagrant-config/scripts/gulp.sh", privileged: false
config.vm.provision :shell, path: "dev/vagrant-config/scripts/mix.sh", privileged: false
config.vm.provision :shell, path: "dev/vagrant-config/scripts/finish.sh"

config.vm.network "private_network", ip: "192.168.25.35"
Expand Down
2 changes: 1 addition & 1 deletion app/Exceptions/Handler.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ protected function unauthenticated($request, AuthenticationException $exception)
return response()->json(['error' => 'Unauthenticated.'], 401);
}

return redirect()->guest('login');
return redirect()->guest(route('login'));
}

/**
Expand Down
2 changes: 1 addition & 1 deletion app/Http/Controllers/Auth/LoginController.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class LoginController extends Controller
*/
public function __construct()
{
$this->middleware('guest', ['except' => 'logout']);
$this->middleware('guest')->except('logout');
}

/**
Expand Down
4 changes: 4 additions & 0 deletions app/Http/Kernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ class Kernel extends HttpKernel
*/
protected $middleware = [
\Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode::class,
\Illuminate\Foundation\Http\Middleware\ValidatePostSize::class,
\App\Http\Middleware\TrimStrings::class,
\Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull::class,
];

/**
Expand All @@ -27,6 +30,7 @@ class Kernel extends HttpKernel
\App\Http\Middleware\EncryptCookies::class,
\Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
\Illuminate\Session\Middleware\StartSession::class,
// \Illuminate\Session\Middleware\AuthenticateSession::class,
\Illuminate\View\Middleware\ShareErrorsFromSession::class,
\App\Http\Middleware\VerifyCsrfToken::class,
\App\Http\Middleware\SubstituteEntityBindings::class,
Expand Down
18 changes: 18 additions & 0 deletions app/Http/Middleware/TrimStrings.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?php

namespace App\Http\Middleware;

use Illuminate\Foundation\Http\Middleware\TrimStrings as BaseTrimmer;

class TrimStrings extends BaseTrimmer
{
/**
* The names of the attributes that should not be trimmed.
*
* @var array
*/
protected $except = [
'password',
'password_confirmation',
];
}
7 changes: 1 addition & 6 deletions app/Providers/BroadcastServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,6 @@ public function boot()
{
Broadcast::routes();

/*
* Authenticate the user's personal channel...
*/
Broadcast::channel('App.User.*', function ($user, $userId) {
return (int) $user->id === (int) $userId;
});
require base_path('routes/channels.php');
}
}
20 changes: 7 additions & 13 deletions app/Providers/RouteServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,9 @@ public function map()
*/
protected function mapWebRoutes()
{
Route::group([
'middleware' => 'web',
'namespace' => $this->namespace,
], function ($router) {
require base_path('routes/web.php');
});
Route::middleware('web')
->namespace($this->namespace)
->group(base_path('routes/web.php'));
}

/**
Expand All @@ -68,12 +65,9 @@ protected function mapWebRoutes()
*/
protected function mapApiRoutes()
{
Route::group([
'middleware' => 'api',
'namespace' => $this->namespace,
'prefix' => 'api',
], function ($router) {
require base_path('routes/api.php');
});
Route::prefix('api')
->middleware('api')
->namespace($this->namespace)
->group(base_path('routes/api.php'));
}
}
2 changes: 1 addition & 1 deletion artisan
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ $status = $kernel->handle(
| Shutdown The Application
|--------------------------------------------------------------------------
|
| Once Artisan has finished running. We will fire off the shutdown events
| Once Artisan has finished running, we will fire off the shutdown events
| so that any final work may be done by the application before we shut
| down the process. This is the last thing to happen to the request.
|
Expand Down
21 changes: 2 additions & 19 deletions bootstrap/autoload.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,26 +9,9 @@
|
| Composer provides a convenient, automatically generated class loader
| for our application. We just need to utilize it! We'll require it
| into the script here so that we do not have to worry about the
| loading of any our classes "manually". Feels great to relax.
| into the script here so we do not have to manually load any of
| our application's PHP classes. It just feels great to relax.
|
*/

require __DIR__.'/../vendor/autoload.php';

/*
|--------------------------------------------------------------------------
| Include The Compiled Class File
|--------------------------------------------------------------------------
|
| To dramatically increase your application's performance, you may use a
| compiled class file which contains all of the classes commonly used
| by a request. The Artisan "optimize" is used to create this file.
|
*/

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

if (file_exists($compiledPath)) {
require $compiledPath;
}
23 changes: 12 additions & 11 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,24 @@
"type": "project",
"require": {
"php": ">=5.6.4",
"laravel/framework": "5.3.*",
"laravel-doctrine/orm": "1.2.*",
"laravel/framework": "5.4.*",
"laravel/tinker": "~1.0",
"laravel-doctrine/orm": "1.3.*",
"laravel-doctrine/acl": "1.0.*",
"laravel-doctrine/migrations": "1.0.*",
"laravel-doctrine/migrations": "1.1.*",
"laravel-doctrine/extensions": "^1.0",
"gedmo/doctrine-extensions": "^2.4",
"spatie/laravel-cookie-consent": "^1.6",
"guzzlehttp/guzzle": "^6.2",
"laracasts/flash": "^2.0"
"laracasts/flash": "^3.0"
},
"require-dev": {
"behat/behat": "^3.0",
"behat/mink-extension": "^2.1",
"fzaninotto/faker": "~1.4",
"laracasts/behat-laravel-extension": "^1.0",
"mockery/mockery": "0.9.*",
"phpunit/phpunit": "~5.0",
"symfony/css-selector": "3.1.*",
"symfony/dom-crawler": "3.1.*"
"phpunit/phpunit": "~5.7"
},
"autoload": {
"classmap": [
Expand All @@ -36,9 +35,9 @@
}
},
"autoload-dev": {
"classmap": [
"tests/TestCase.php"
]
"psr-4": {
"Tests\\": "tests/"
}
},
"scripts": {
"post-root-package-install": [
Expand All @@ -57,6 +56,8 @@
]
},
"config": {
"preferred-install": "dist"
"preferred-install": "dist",
"sort-packages": true,
"optimize-autoloader": true
}
}
Loading