GithubHelp home page GithubHelp logo

datamweb / codeigniter-htmx-demo Goto Github PK

View Code? Open in Web Editor NEW

This project forked from michalsn/codeigniter-htmx-demo

0.0 1.0 0.0 810 KB

This is a demo for CodeIgniter HTMX helper library.

Home Page: https://michalsn.github.io/codeigniter-htmx/

License: MIT License

PHP 100.00%

codeigniter-htmx-demo's Introduction

CodeIgniter HTMX Demo

This is a demo for CodeIgniter HTMX helper library. Demo requires:

  • CodeIgniter HTMX library installed via composer or manually,
  • CodeIgniter 4.3 or later version.

CodeIgniter HTMX Demo

Available demos:

  • Books - searching, pagination, inline edit
  • Tasks - events
  • Paragraphs - sorting, modal edit
  • Controlled Cells - widget like components, signed-urls (the last one requires CodeIgniter Signed-URL library)

Installation

  1. Install CodeIgniter 4 with composer (command below) or manually.
composer create-project codeigniter4/appstarter codeigniterhtmx
cd codeigniterhtmx
  1. Install CodeIgniter HTMX library with composer (command below) or manually.
composer require michalsn/codeigniter-htmx
  1. Manually download ZIP file of this project and place it in the desired folder.

    • The example will assume that it will be codeigniterhtmx/app/ThirdParty/htmx-demo.
    • Then enable it by editing the codeigniterhtmx/app/Config/Autoload.php file and adding the Michalsn\CodeIgniterHtmxDemo namespace to the $psr4 array, like in the below example:
<?php

// ...

public $psr4 = [
    APP_NAMESPACE => APPPATH, // For custom app namespace
    'Config'      => APPPATH . 'Config',
    'Michalsn\CodeIgniterHtmxDemo' => APPPATH . 'ThirdParty/htmx-demo/src',
];

// ...

Database

First, make sure to create a database for the project. You can name it codeigniterhtmx and set credentials for the database connection in codeigniterhtmx/app/Config/Database.php, see framework's user guide for more information.

Before running the examples you have to migrate the database. Make sure you have set correct credentials to the database and then run the command:

php spark migrate --all

And preferably run the seeds:

For Unix:

php spark db:seed Michalsn\\CodeIgniterHtmxDemo\\Database\\Seeds\\SeedDemo

For Windows:

php spark db:seed Michalsn\CodeIgniterHtmxDemo\Database\Seeds\SeedDemo

Running the demo

The default route to the demo page is demo.

codeigniter-htmx-demo's People

Contributors

datamweb avatar jozefrebjak avatar michalsn avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.