I’ve hidden the Ajax code within the HTMX

I ran a tutorial on using HTMX to dynamically manipulate the DOM via Ajax.

<!DOCTYPE html><html></html>Creating an outer frame definition file

As the <head></head> section is largely common across all pages, it has been designed to be reusable. The
[layouts] folder is intended, according to local conventions,
to ‘define layouts common to all applications’
.
/mutunet/resources/views/layouts/app.blade.php

copy

Creating screen templates that respond to the controller

I find it more motivating to build things from the screen.
The controller name is ‘test’
The default action is ‘index’
So the URL is ‘http://localhost/mutunet/public/test/index’
Add the HTMX functionality to the <button>
Use the following file path in the local rules
/mutunet/resources/views/Controller name/Action Name.blade.php
/mutunet/resources/views/test/index.blade.php

copy

Creating a component screen template that is loaded dynamically

HTMX Tutorial
Under the local rules, components use the following file paths
/mutunet/resources/views/Control Name/partials/Action name.blade.php
/mutunet/resources/views/test/partials/fetchPartial.blade.php

copy

Creating a PHP Controller

/mutunet/app/Http/Controllers/TestController.php

copy

Add routing

Under the local rules, routing configurations are managed in separate files for each controller, so the path is as follows.
/mutunet/routes/controllers/routesController filename.php
/mutunet/routes/controllers/routesTestController.php

copy

/mutunet/routes/web.php

copy
 Content is now inserted when you click [Asynchronous Retrieval of Parts (Partial)].