mirror of
https://github.com/sp-tarkov/forge.git
synced 2025-02-13 04:30:41 -05:00
Updates Livewire Script Route
This commit is contained in:
parent
bf29b348a5
commit
2bbe715342
@ -4,7 +4,9 @@ namespace App\Providers;
|
|||||||
|
|
||||||
use App\Models\User;
|
use App\Models\User;
|
||||||
use Illuminate\Support\Facades\Gate;
|
use Illuminate\Support\Facades\Gate;
|
||||||
|
use Illuminate\Support\Facades\Route;
|
||||||
use Illuminate\Support\ServiceProvider;
|
use Illuminate\Support\ServiceProvider;
|
||||||
|
use Livewire\Livewire;
|
||||||
|
|
||||||
class AppServiceProvider extends ServiceProvider
|
class AppServiceProvider extends ServiceProvider
|
||||||
{
|
{
|
||||||
@ -21,6 +23,11 @@ class AppServiceProvider extends ServiceProvider
|
|||||||
*/
|
*/
|
||||||
public function boot(): void
|
public function boot(): void
|
||||||
{
|
{
|
||||||
|
// Register the Livewire script route.
|
||||||
|
Livewire::setScriptRoute(function ($handle) {
|
||||||
|
return Route::get('/vendor/livewire/livewire.js', $handle);
|
||||||
|
});
|
||||||
|
|
||||||
// This gate determines who can access the Pulse dashboard.
|
// This gate determines who can access the Pulse dashboard.
|
||||||
Gate::define('viewPulse', function (User $user) {
|
Gate::define('viewPulse', function (User $user) {
|
||||||
return $user->isAdmin();
|
return $user->isAdmin();
|
||||||
|
@ -114,7 +114,7 @@ return [
|
|||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'inject_assets' => false,
|
'inject_assets' => true,
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|---------------------------------------------------------------------------
|
|---------------------------------------------------------------------------
|
||||||
|
3
resources/js/bootstrap.js
vendored
3
resources/js/bootstrap.js
vendored
@ -1,7 +1,4 @@
|
|||||||
import { Livewire } from "../../vendor/livewire/livewire/dist/livewire.esm";
|
|
||||||
import axios from "axios";
|
import axios from "axios";
|
||||||
|
|
||||||
Livewire.start();
|
|
||||||
|
|
||||||
window.axios = axios;
|
window.axios = axios;
|
||||||
window.axios.defaults.headers.common["X-Requested-With"] = "XMLHttpRequest";
|
window.axios.defaults.headers.common["X-Requested-With"] = "XMLHttpRequest";
|
||||||
|
@ -56,6 +56,6 @@
|
|||||||
@livewire('global-search')
|
@livewire('global-search')
|
||||||
@stack('modals')
|
@stack('modals')
|
||||||
|
|
||||||
@livewireScriptConfig
|
@livewireScripts
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@ -35,6 +35,6 @@
|
|||||||
{{ $slot }}
|
{{ $slot }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@livewireScriptConfig
|
@livewireScripts
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user