Merge branch 'develop'

This commit is contained in:
Refringe 2024-06-19 14:41:20 -04:00
commit 0b0cd2ea92
Signed by: Refringe
SSH Key Fingerprint: SHA256:t865XsQpfTeqPRBMN2G6+N8wlDjkgUCZF3WGW6O9N/k
5 changed files with 10 additions and 6 deletions

View File

@ -4,7 +4,9 @@ namespace App\Providers;
use App\Models\User;
use Illuminate\Support\Facades\Gate;
use Illuminate\Support\Facades\Route;
use Illuminate\Support\ServiceProvider;
use Livewire\Livewire;
class AppServiceProvider extends ServiceProvider
{
@ -21,6 +23,11 @@ class AppServiceProvider extends ServiceProvider
*/
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.
Gate::define('viewPulse', function (User $user) {
return $user->isAdmin();

View File

@ -114,7 +114,7 @@ return [
|
*/
'inject_assets' => false,
'inject_assets' => true,
/*
|---------------------------------------------------------------------------

View File

@ -1,7 +1,4 @@
import { Livewire } from "../../vendor/livewire/livewire/dist/livewire.esm";
import axios from "axios";
Livewire.start();
window.axios = axios;
window.axios.defaults.headers.common["X-Requested-With"] = "XMLHttpRequest";

View File

@ -56,6 +56,6 @@
@livewire('global-search')
@stack('modals')
@livewireScriptConfig
@livewireScripts
</body>
</html>

View File

@ -35,6 +35,6 @@
{{ $slot }}
</div>
@livewireScriptConfig
@livewireScripts
</body>
</html>