Uses Config Option for Livewire Location

This commit is contained in:
Refringe 2024-06-19 15:20:43 -04:00
parent 2bbe715342
commit d1cdc46548
Signed by: Refringe
SSH Key Fingerprint: SHA256:t865XsQpfTeqPRBMN2G6+N8wlDjkgUCZF3WGW6O9N/k
2 changed files with 13 additions and 8 deletions

View File

@ -4,9 +4,7 @@ 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
{ {
@ -23,11 +21,6 @@ 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();

View File

@ -114,7 +114,7 @@ return [
| |
*/ */
'inject_assets' => true, 'inject_assets' => false,
/* /*
|--------------------------------------------------------------------------- |---------------------------------------------------------------------------
@ -157,4 +157,16 @@ return [
*/ */
'pagination_theme' => 'tailwind', 'pagination_theme' => 'tailwind',
/*
|---------------------------------------------------------------------------
| Asset URL
|---------------------------------------------------------------------------
|
| When serving assets from a CDN, you may need to override the asset URL
| that Livewire uses to include assets in the response.
|
*/
'asset_url' => env('ASSET_URL_LIVEWIRE'),
]; ];