Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Письменов Дмитрий Иванович
/
yourroomads
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Settings
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 0b6114dd
authored
Apr 18, 2019
by
Jonathan Reinink
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Setup Inertia version tracking
1 parent
46764b2e
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
5 additions
and
2 deletions
app/Http/Kernel.php
app/Providers/AppServiceProvider.php
composer.lock
package-lock.json
resources/js/app.js
app/Http/Kernel.php
View file @
0b6114d
...
@@ -29,6 +29,7 @@ class Kernel extends HttpKernel
...
@@ -29,6 +29,7 @@ class Kernel extends HttpKernel
*/
*/
protected
$middlewareGroups
=
[
protected
$middlewareGroups
=
[
'web'
=>
[
'web'
=>
[
\Inertia\CheckInertiaVersion
::
class
,
\App\Http\Middleware\EncryptCookies
::
class
,
\App\Http\Middleware\EncryptCookies
::
class
,
\Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse
::
class
,
\Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse
::
class
,
\Illuminate\Session\Middleware\StartSession
::
class
,
\Illuminate\Session\Middleware\StartSession
::
class
,
...
...
app/Providers/AppServiceProvider.php
View file @
0b6114d
...
@@ -25,6 +25,9 @@ class AppServiceProvider extends ServiceProvider
...
@@ -25,6 +25,9 @@ class AppServiceProvider extends ServiceProvider
public
function
register
()
public
function
register
()
{
{
Inertia
::
version
(
function
()
{
return
md5_file
(
public_path
(
'mix-manifest.json'
));
});
Inertia
::
share
(
'app.name'
,
Config
::
get
(
'app.name'
));
Inertia
::
share
(
'app.name'
,
Config
::
get
(
'app.name'
));
Inertia
::
share
(
'errors'
,
function
()
{
Inertia
::
share
(
'errors'
,
function
()
{
return
Session
::
get
(
'errors'
)
?
Session
::
get
(
'errors'
)
->
getBag
(
'default'
)
->
getMessages
()
:
(
object
)
[];
return
Session
::
get
(
'errors'
)
?
Session
::
get
(
'errors'
)
->
getBag
(
'default'
)
->
getMessages
()
:
(
object
)
[];
...
...
composer.lock
View file @
0b6114d
This diff is collapsed.
Click to expand it.
package-lock.json
View file @
0b6114d
This diff is collapsed.
Click to expand it.
resources/js/app.js
View file @
0b6114d
...
@@ -11,8 +11,7 @@ let app = document.getElementById('app')
...
@@ -11,8 +11,7 @@ let app = document.getElementById('app')
new
Vue
({
new
Vue
({
render
:
h
=>
h
(
Inertia
,
{
render
:
h
=>
h
(
Inertia
,
{
props
:
{
props
:
{
component
:
app
.
dataset
.
component
,
initialPage
:
JSON
.
parse
(
app
.
dataset
.
page
),
props
:
JSON
.
parse
(
app
.
dataset
.
props
),
resolveComponent
:
(
component
)
=>
{
resolveComponent
:
(
component
)
=>
{
return
import
(
`@/Pages/
${
component
}
`
).
then
(
module
=>
module
.
default
)
return
import
(
`@/Pages/
${
component
}
`
).
then
(
module
=>
module
.
default
)
},
},
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment