jensramakers / laravel-async-route
laravel async route class
Installs: 26
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 1
Open Issues: 1
Language:Blade
This package is not auto-updated.
Last update: 2024-12-26 06:00:30 UTC
README
install composer package
composer require jensramakers/laravel-async-route
publish views
php artisan vendor:publish --provider="Jensramakers\LaravelAsyncRoute\LaravelAsyncRouteServiceProvider"
install jquery
npm i jquery
and include it in your javascript file
window.$ = window.jQuery = require('jquery'); asyncDeletionModal = function (url) { let el = $("[data-async-container='deletionModal']")[0]; el.innerHTML = ''; $.get(url, function (data) { el.innerHTML = data; }); }
add this to web.php with needed middleware
Route::get('/admin/modal/deletion/{route}', function ($route) { return view('vendor.jensramakers.modal_delete', ['route' => str_replace('\\', '/', $route)])->render(); })->name('admin.deletion.async.modal');
install tailwind elements for modal functionality https://tailwind-elements.com/quick-start/
install fontawesome
npm install --save @fortawesome/fontawesome-free
and add this line in your scss file
@import '~@fortawesome/fontawesome-free/css/all';