Skip to content

Commit

Permalink
laravel 5.4 updates
Browse files Browse the repository at this point in the history
  • Loading branch information
Neil Jennings committed Jun 2, 2017
1 parent cf06893 commit 511bbdd
Show file tree
Hide file tree
Showing 15 changed files with 56 additions and 30 deletions.
2 changes: 1 addition & 1 deletion app/Exceptions/Handler.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,6 @@ protected function unauthenticated($request, AuthenticationException $exception)
return response()->json(['error' => 'Unauthenticated.'], 401);
}

return redirect()->guest('login');
return redirect()->guest(route('login'));
}
}
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
4 changes: 2 additions & 2 deletions bootstrap/autoload.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
|
| 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.
|
*/

Expand Down
5 changes: 3 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"php artisan key:generate"
],
"post-install-cmd": [
"Illuminate\\Foundation\\ComposerScripts::postUpdate",
"Illuminate\\Foundation\\ComposerScripts::postInstall",
"php artisan optimize",
"php vendor/web-feet/coasterframework/updateAssets"
],
Expand All @@ -58,7 +58,8 @@
},
"config": {
"preferred-install": "dist",
"sort-packages": true
"sort-packages": true,
"optimize-autoloader": true
},
"minimum-stability": "dev",
"prefer-stable": true
Expand Down
2 changes: 1 addition & 1 deletion config/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
| any other location as required by the application or its packages.
*/

'name' => 'Coaster CMS',
'name' => env('APP_NAME', 'Coaster CMS'),

/*
|--------------------------------------------------------------------------
Expand Down
12 changes: 12 additions & 0 deletions config/database.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
'database' => env('DB_DATABASE', 'forge'),
'username' => env('DB_USERNAME', 'forge'),
'password' => env('DB_PASSWORD', ''),
'unix_socket' => env('DB_SOCKET', ''),
'charset' => 'utf8mb4',
'collation' => 'utf8mb4_unicode_ci',
'prefix' => env('DB_PREFIX', ''),
Expand All @@ -66,6 +67,17 @@
'sslmode' => 'prefer',
],

'sqlsrv' => [
'driver' => 'sqlsrv',
'host' => env('DB_HOST', 'localhost'),
'port' => env('DB_PORT', '1433'),
'database' => env('DB_DATABASE', 'forge'),
'username' => env('DB_USERNAME', 'forge'),
'password' => env('DB_PASSWORD', ''),
'charset' => 'utf8',
'prefix' => '',
],

],

/*
Expand Down
4 changes: 2 additions & 2 deletions config/filesystems.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
|
*/

'default' => 'local',
'default' => env('FILESYSTEM_DRIVER', 'local'),

/*
|--------------------------------------------------------------------------
Expand All @@ -26,7 +26,7 @@
|
*/

'cloud' => 's3',
'cloud' => env('FILESYSTEM_CLOUD', 's3'),

/*
|--------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion config/view.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
*/

'paths' => [
realpath(base_path('resources/views')),
resource_path('views'),
],

/*
Expand Down
4 changes: 2 additions & 2 deletions phpunit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
processIsolation="false"
stopOnFailure="false">
<testsuites>
<testsuite name="Feature Tests">
<testsuite name="Feature">
<directory suffix="Test.php">./tests/Feature</directory>
</testsuite>

<testsuite name="Unit Tests">
<testsuite name="Unit">
<directory suffix="Test.php">./tests/Unit</directory>
</testsuite>
</testsuites>
Expand Down
2 changes: 1 addition & 1 deletion public/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
| Composer provides a convenient, automatically generated class loader for
| our application. We just need to utilize it! We'll simply require it
| into the script here so that we don't have to worry about manual
| loading any of our classes later on. It feels nice to relax.
| loading any of our classes later on. It feels great to relax.
|
*/

Expand Down
2 changes: 2 additions & 0 deletions resources/assets/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

require('./bootstrap');

window.Vue = require('vue');

/**
* Next, we will create a fresh Vue application instance and attach it to
* the page. Then, you may begin adding components to this application
Expand Down
37 changes: 22 additions & 15 deletions resources/assets/js/bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,11 @@ window._ = require('lodash');
* code may be modified to fit the specific needs of your application.
*/

window.$ = window.jQuery = require('jquery');
try {
window.$ = window.jQuery = require('jquery');

require('bootstrap-sass');

/**
* Vue is a modern JavaScript library for building interactive web interfaces
* using reactive data binding and reusable components. Vue's API is clean
* and simple, leaving you to focus on building your next great project.
*/

window.Vue = require('vue');
require('bootstrap-sass');
} catch (e) {}

/**
* We'll load the axios HTTP library which allows us to easily issue requests
Expand All @@ -27,18 +21,31 @@ window.Vue = require('vue');

window.axios = require('axios');

window.axios.defaults.headers.common = {
'X-CSRF-TOKEN': window.Laravel.csrfToken,
'X-Requested-With': 'XMLHttpRequest'
};
window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';

/**
* Next we will register the CSRF Token as a common header with Axios so that
* all outgoing HTTP requests automatically have it attached. This is just
* a simple convenience so we don't have to attach every token manually.
*/

let token = document.head.querySelector('meta[name="csrf-token"]');

if (token) {
window.axios.defaults.headers.common['X-CSRF-TOKEN'] = token.content;
} else {
console.error('CSRF token not found: https://laravel.com/docs/csrf#csrf-x-csrf-token');
}

/**
* Echo exposes an expressive API for subscribing to channels and listening
* for events that are broadcast by Laravel. Echo and event broadcasting
* allows your team to easily build robust real-time web applications.
*/

// import Echo from "laravel-echo"
// import Echo from 'laravel-echo'

// window.Pusher = require('pusher-js');

// window.Echo = new Echo({
// broadcaster: 'pusher',
Expand Down
4 changes: 3 additions & 1 deletion resources/lang/en/validation.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,14 @@
'email' => 'The :attribute must be a valid email address.',
'exists' => 'The selected :attribute is invalid.',
'file' => 'The :attribute must be a file.',
'filled' => 'The :attribute field is required.',
'filled' => 'The :attribute field must have a value.',
'image' => 'The :attribute must be an image.',
'in' => 'The selected :attribute is invalid.',
'in_array' => 'The :attribute field does not exist in :other.',
'integer' => 'The :attribute must be an integer.',
'ip' => 'The :attribute must be a valid IP address.',
'ipv4' => 'The :attribute must be a valid IPv4 address.',
'ipv6' => 'The :attribute must be a valid IPv6 address.',
'json' => 'The :attribute must be a valid JSON string.',
'max' => [
'numeric' => 'The :attribute may not be greater than :max.',
Expand Down
2 changes: 2 additions & 0 deletions storage/framework/testing/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*
!.gitignore
2 changes: 1 addition & 1 deletion webpack.mix.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const { mix } = require('laravel-mix');
let mix = require('laravel-mix');

/*
|--------------------------------------------------------------------------
Expand Down

0 comments on commit 511bbdd

Please sign in to comment.