Created
October 30, 2020 10:43
-
-
Save reinink/ff99740e102a1aa71333318e44cab665 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Providers; | |
use Inertia\ServiceProvider; | |
use Illuminate\Http\Request; | |
class InertiaServiceProvider extends ServiceProvider | |
{ | |
/** | |
* The root template that's loaded on the first page visit. | |
* | |
* @see https://inertiajs.com/server-side-setup#root-template | |
* @var string | |
*/ | |
protected $rootView = 'app'; | |
/** | |
* Determines the current asset version. | |
* | |
* @see https://inertiajs.com/asset-versioning | |
* | |
* @return string|null | |
*/ | |
public function version(Request $request) | |
{ | |
return parent::version($request); | |
} | |
/** | |
* Defines the props that are shared by default. | |
* | |
* @see https://inertiajs.com/shared-data | |
* | |
* @return array | |
*/ | |
public function share(Request $request) | |
{ | |
return array_merge(parent::share($request), [ | |
// your data | |
]); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment