PHP Classes

PHP Todo List: Application to manage a list of tasks to do

Recommend this page to a friend!
     
  Info   Example   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not yet rated by the usersTotal: 84 All time: 10,045 This week: 53Up
Version License PHP version Categories
fake-todo 1.0.0Shareware5PHP 5, Content management, Web services
Description 

Author

This package implements an application to manage a list of tasks to do.

It provides a controller that can handle API requests to perform several types of operations to manage pending tasks.

The controller returns responses in JSON format to tell the API clients about the results of the actions.

The package also provides a model class that performs the actual operations to store and retrieve the objects that store and retrieve the task object values like the task title, status, and owner user.

Currently, the model class implements operations to create tasks.

Picture of Ahmad Mustapha
Name: Ahmad Mustapha <contact>
Classes: 24 packages by
Country: Nigeria Nigeria
Age: ???
All time rank: 226511 in Nigeria Nigeria
Week rank: 178 Up7 in Nigeria Nigeria Up
Innovation award
Innovation award
Nominee: 9x

Example

<?php

/*
|--------------------------------------------------------------------------
| Create The Application
|--------------------------------------------------------------------------
|
| First we need to get an application instance. This creates an instance
| of the application / container and bootstraps the application so it
| is ready to receive HTTP / Console requests from the environment.
|
*/

$app = require __DIR__ . '/../bootstrap/app.php';

/*
|--------------------------------------------------------------------------
| Run The Application
|--------------------------------------------------------------------------
|
| Once we have the application, we can handle the incoming request
| through the kernel, and send the associated response back to
| the client's browser allowing them to enjoy the creative
| and wonderful application we have prepared for them.
|
*/

$app->withEloquent();

$app->run();


Details

Fake Todo

A fake todo api-based application

Live Version

Visit Fake Todo

Note

I added some custom routes such as /todos/{id}/put and /todos/{id}/patch to help expose their respective functionality through POST method. <br/>This happen because jQuery & axios converts PATCH, PUT and DELETE requests to OPTIONS which will return error response.

Installation

Clone the repository

I've added some decorator to decorate the json response syntax.

Please note that this project requires PHP 8.1

git clone git@github.com:ahmard/fake-todo.git

Install composer packages

cd fake-todo
composer update

Configuration

Edit .env file to provide database & other configurable information

Database

php artisan migrate --seed

Running

php -S localhost:8000 -t public

Endpoints

Please take a look at requests.http for sample


  Files folder image Files (206)  
File Role Description
Files folder imageapp (8 directories)
Files folder imagebootstrap (1 file)
Files folder imagedatabase (3 directories)
Files folder imagepublic (2 files, 3 directories)
Files folder imageresources (1 directory)
Files folder imageroutes (1 file)
Files folder imagetests (2 files)
Accessible without login Plain text file .editorconfig Data Auxiliary data
Accessible without login Plain text file .env.example Data Auxiliary data
Accessible without login Plain text file .styleci.yml Data Auxiliary data
Accessible without login Plain text file artisan Example Example script
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file composer.lock Data Auxiliary data
Accessible without login Plain text file phpunit.xml Data Auxiliary data
Accessible without login Plain text file Procfile Data Auxiliary data
Accessible without login Plain text file README.md Doc. Documentation
Accessible without login Plain text file requests.http Data Auxiliary data

  Files folder image Files (206)  /  app  
File Role Description
Files folder imageConsole (1 file)
Files folder imageEvents (2 files)
Files folder imageExceptions (1 file)
Files folder imageHttp (1 file, 2 directories)
Files folder imageJobs (2 files)
Files folder imageListeners (1 file)
Files folder imageModels (2 files)
Files folder imageProviders (3 files)

  Files folder image Files (206)  /  app  /  Console  
File Role Description
  Plain text file Kernel.php Class Class source

  Files folder image Files (206)  /  app  /  Events  
File Role Description
  Plain text file Event.php Class Class source
  Plain text file ExampleEvent.php Class Class source

  Files folder image Files (206)  /  app  /  Exceptions  
File Role Description
  Plain text file Handler.php Class Class source

  Files folder image Files (206)  /  app  /  Http  
File Role Description
Files folder imageControllers (2 files)
Files folder imageMiddleware (3 files)
  Plain text file JsonResponse.php Class Class source

  Files folder image Files (206)  /  app  /  Http  /  Controllers  
File Role Description
  Plain text file Controller.php Class Class source
  Plain text file TodoController.php Class Class source

  Files folder image Files (206)  /  app  /  Http  /  Middleware  
File Role Description
  Plain text file Authenticate.php Class Class source
  Plain text file CorsMiddleware.php Class Class source
  Plain text file ExampleMiddleware.php Class Class source

  Files folder image Files (206)  /  app  /  Jobs  
File Role Description
  Plain text file ExampleJob.php Class Class source
  Plain text file Job.php Class Class source

  Files folder image Files (206)  /  app  /  Listeners  
File Role Description
  Plain text file ExampleListener.php Class Class source

  Files folder image Files (206)  /  app  /  Models  
File Role Description
  Plain text file Todo.php Class Class source
  Plain text file User.php Class Class source

  Files folder image Files (206)  /  app  /  Providers  
File Role Description
  Plain text file AppServiceProvider.php Class Class source
  Plain text file AuthServiceProvider.php Class Class source
  Plain text file EventServiceProvider.php Class Class source

  Files folder image Files (206)  /  bootstrap  
File Role Description
  Plain text file app.php Class Class source

  Files folder image Files (206)  /  database  
File Role Description
Files folder imagefactories (1 file)
Files folder imagemigrations (2 files)
Files folder imageseeders (3 files)

  Files folder image Files (206)  /  database  /  factories  
File Role Description
  Plain text file UserFactory.php Class Class source

  Files folder image Files (206)  /  database  /  migrations  
File Role Description
  Plain text file 2022_02_19_061753_create_users_table.php Class Class source
  Plain text file 2022_02_19_193352_create_todos_table.php Class Class source

  Files folder image Files (206)  /  database  /  seeders  
File Role Description
  Plain text file DatabaseSeeder.php Class Class source
  Plain text file TodoSeeder.php Class Class source
  Plain text file UserSeeder.php Class Class source

  Files folder image Files (206)  /  public  
File Role Description
Files folder imagefontawesome (2 directories)
Files folder imagemdb (4 directories)
Files folder image_nuxt (24 files, 2 directories)
  Accessible without login Plain text file .htaccess Data Auxiliary data
  Accessible without login Plain text file index.php Example Example script

  Files folder image Files (206)  /  public  /  fontawesome  
File Role Description
Files folder imagecss (1 file)
Files folder imagewebfonts (3 files)

  Files folder image Files (206)  /  public  /  fontawesome  /  css  
File Role Description
  Accessible without login Plain text file all.min.css Data Auxiliary data

  Files folder image Files (206)  /  public  /  fontawesome  /  webfonts  
File Role Description
  Accessible without login Plain text file fa-brands-400.svg Data Auxiliary data
  Accessible without login Plain text file fa-regular-400.svg Data Auxiliary data
  Accessible without login Plain text file fa-solid-900.svg Data Auxiliary data

  Files folder image Files (206)  /  public  /  mdb  
File Role Description
Files folder imagecss (8 files, 2 directories)
Files folder imageimg (1 file, 2 directories)
Files folder imagejs (10 files, 2 directories)
Files folder imagescss (4 files, 3 directories)

  Files folder image Files (206)  /  public  /  mdb  /  css  
File Role Description
Files folder imageaddons (16 files)
Files folder imagemodules (2 files)
  Accessible without login Plain text file bootstrap.css Data Auxiliary data
  Accessible without login Plain text file bootstrap.min.css Data Auxiliary data
  Accessible without login Plain text file mdb.css Data Auxiliary data
  Accessible without login Plain text file mdb.lite.css Data Auxiliary data
  Accessible without login Plain text file mdb.lite.min.css Data Auxiliary data
  Accessible without login Plain text file mdb.lite.min.css.map Data Auxiliary data
  Accessible without login Plain text file mdb.min.css Data Auxiliary data
  Accessible without login Plain text file mdb.min.css.map Data Auxiliary data

  Files folder image Files (206)  /  public  /  mdb  /  css  /  addons  
File Role Description
  Accessible without login Plain text file datatables-select.min.css Data Auxiliary data
  Accessible without login Plain text file datatables-select.min.css.map Data Auxiliary data
  Accessible without login Plain text file datatables-select2.min.css Data Auxiliary data
  Accessible without login Plain text file datatables-select2.min.css.map Data Auxiliary data
  Accessible without login Plain text file datatables.min.css Data Auxiliary data
  Accessible without login Plain text file datatables.min.css.map Data Auxiliary data
  Accessible without login Plain text file datatables2.min.css Data Auxiliary data
  Accessible without login Plain text file datatables2.min.css.map Data Auxiliary data
  Accessible without login Plain text file directives.min.css Data Auxiliary data
  Accessible without login Plain text file directives.min.css.map Data Auxiliary data
  Accessible without login Plain text file flag.min.css Data Auxiliary data
  Accessible without login Plain text file flag.min.css.map Data Auxiliary data
  Accessible without login Plain text file jquery.zmd.hierarchical-display.min.css Data Auxiliary data
  Accessible without login Plain text file jquery.zmd.hierarc...display.min.css.map Data Auxiliary data
  Accessible without login Plain text file rating.min.css Data Auxiliary data
  Accessible without login Plain text file rating.min.css.map Data Auxiliary data

  Files folder image Files (206)  /  public  /  mdb  /  css  /  modules  
File Role Description
  Accessible without login Plain text file animations-extended.min.css Data Auxiliary data
  Accessible without login Plain text file animations-extended.min.css.map Data Auxiliary data

  Files folder image Files (206)  /  public  /  mdb  /  img  
File Role Description
Files folder imageoverlays (9 files)
Files folder imagesvg (2 files)
  Accessible without login Image file mdb-favicon.ico Data Auxiliary data

  Files folder image Files (206)  /  public  /  mdb  /  img  /  overlays  
File Role Description
  Accessible without login Image file 01.png Icon Icon image
  Accessible without login Image file 02.png Icon Icon image
  Accessible without login Image file 03.png Icon Icon image
  Accessible without login Image file 04.png Icon Icon image
  Accessible without login Image file 05.png Icon Icon image
  Accessible without login Image file 06.png Icon Icon image
  Accessible without login Image file 07.png Icon Icon image
  Accessible without login Image file 08.png Icon Icon image
  Accessible without login Image file 09.png Icon Icon image

  Files folder image Files (206)  /  public  /  mdb  /  img  /  svg  
File Role Description
  Accessible without login Plain text file arrow_left.svg Data Auxiliary data
  Accessible without login Plain text file arrow_right.svg Data Auxiliary data

  Files folder image Files (206)  /  public  /  mdb  /  js  
File Role Description
Files folder imageaddons (20 files)
Files folder imagemodules (10 files)
  Accessible without login Plain text file bootstrap.js Data Auxiliary data
  Accessible without login Plain text file bootstrap.min.js Data Auxiliary data
  Accessible without login Plain text file jquery.js Data Auxiliary data
  Accessible without login Plain text file jquery.min.js Data Auxiliary data
  Accessible without login Plain text file mdb.js Data Auxiliary data
  Accessible without login Plain text file mdb.lite.min.js.map Data Auxiliary data
  Accessible without login Plain text file mdb.min.js Data Auxiliary data
  Accessible without login Plain text file mdb.min.js.map Data Auxiliary data
  Accessible without login Plain text file popper.js Data Auxiliary data
  Accessible without login Plain text file popper.min.js Data Auxiliary data

  Files folder image Files (206)  /  public  /  mdb  /  js  /  addons  
File Role Description
  Accessible without login Plain text file datatables-select.min.js Data Auxiliary data
  Accessible without login Plain text file datatables-select.min.js.map Data Auxiliary data
  Accessible without login Plain text file datatables-select2.min.js Data Auxiliary data
  Accessible without login Plain text file datatables-select2.min.js.map Data Auxiliary data
  Accessible without login Plain text file datatables.min.js Data Auxiliary data
  Accessible without login Plain text file datatables.min.js.map Data Auxiliary data
  Accessible without login Plain text file datatables2.min.js Data Auxiliary data
  Accessible without login Plain text file datatables2.min.js.map Data Auxiliary data
  Accessible without login Plain text file directives.min.js Data Auxiliary data
  Accessible without login Plain text file directives.min.js.map Data Auxiliary data
  Accessible without login Plain text file flag.min.js Data Auxiliary data
  Accessible without login Plain text file flag.min.js.map Data Auxiliary data
  Accessible without login Plain text file imagesloaded.pkgd.min.js Data Auxiliary data
  Accessible without login Plain text file imagesloaded.pkgd.min.js.map Data Auxiliary data
  Accessible without login Plain text file jquery.zmd.hierarchical-display.min.js Data Auxiliary data
  Accessible without login Plain text file jquery.zmd.hierarc...-display.min.js.map Data Auxiliary data
  Accessible without login Plain text file masonry.pkgd.min.js Data Auxiliary data
  Accessible without login Plain text file masonry.pkgd.min.js.map Data Auxiliary data
  Accessible without login Plain text file rating.min.js Data Auxiliary data
  Accessible without login Plain text file rating.min.js.map Data Auxiliary data

  Files folder image Files (206)  /  public  /  mdb  /  js  /  modules  
File Role Description
  Accessible without login Plain text file animations-extended.min.js Data Auxiliary data
  Accessible without login Plain text file animations-extended.min.js.map Data Auxiliary data
  Accessible without login Plain text file forms-free.min.js Data Auxiliary data
  Accessible without login Plain text file forms-free.min.js.map Data Auxiliary data
  Accessible without login Plain text file scrolling-navbar.min.js Data Auxiliary data
  Accessible without login Plain text file scrolling-navbar.min.js.map Data Auxiliary data
  Accessible without login Plain text file treeview.min.js Data Auxiliary data
  Accessible without login Plain text file treeview.min.js.map Data Auxiliary data
  Accessible without login Plain text file wow.min.js Data Auxiliary data
  Accessible without login Plain text file wow.min.js.map Data Auxiliary data

  Files folder image Files (206)  /  public  /  mdb  /  scss  
File Role Description
Files folder imageaddons (8 files)
Files folder imagecore (8 files, 1 directory)
Files folder imagefree (19 files, 1 directory)
  Accessible without login Plain text file mdb-free.scss Data Auxiliary data
  Accessible without login Plain text file mdb-lite-free.scss Data Auxiliary data
  Accessible without login Plain text file _custom-styles.scss Data Auxiliary data
  Accessible without login Plain text file _custom-variables.scss Data Auxiliary data

  Files folder image Files (206)  /  public  /  mdb  /  scss  /  addons  
File Role Description
  Accessible without login Plain text file _datatables-select.scss Data Auxiliary data
  Accessible without login Plain text file _datatables-select2.scss Data Auxiliary data
  Accessible without login Plain text file _datatables.scss Data Auxiliary data
  Accessible without login Plain text file _datatables2.scss Data Auxiliary data
  Accessible without login Plain text file _directives.scss Data Auxiliary data
  Accessible without login Plain text file _flag.scss Data Auxiliary data
  Accessible without login Plain text file _hierarchical-display.scss Data Auxiliary data
  Accessible without login Plain text file _rating.scss Data Auxiliary data

  Files folder image Files (206)  /  public  /  mdb  /  scss  /  core  
File Role Description
Files folder imagebootstrap (3 files)
  Accessible without login Plain text file _colors.scss Data Auxiliary data
  Accessible without login Plain text file _global.scss Data Auxiliary data
  Accessible without login Plain text file _helpers.scss Data Auxiliary data
  Accessible without login Plain text file _masks.scss Data Auxiliary data
  Accessible without login Plain text file _mixins.scss Data Auxiliary data
  Accessible without login Plain text file _typography.scss Data Auxiliary data
  Accessible without login Plain text file _variables.scss Data Auxiliary data
  Accessible without login Plain text file _waves.scss Data Auxiliary data

  Files folder image Files (206)  /  public  /  mdb  /  scss  /  core  /  bootstrap  
File Role Description
  Accessible without login Plain text file _functions.scss Data Auxiliary data
  Accessible without login Plain text file _rfs.scss Data Auxiliary data
  Accessible without login Plain text file _variables.scss Data Auxiliary data

  Files folder image Files (206)  /  public  /  mdb  /  scss  /  free  
File Role Description
Files folder imagemodules (1 directory)
  Accessible without login Plain text file _animations-basic.scss Data Auxiliary data
  Accessible without login Plain text file _badges.scss Data Auxiliary data
  Accessible without login Plain text file _buttons.scss Data Auxiliary data
  Accessible without login Plain text file _cards.scss Data Auxiliary data
  Accessible without login Plain text file _carousels.scss Data Auxiliary data
  Accessible without login Plain text file _depreciated.scss Data Auxiliary data
  Accessible without login Plain text file _dropdowns.scss Data Auxiliary data
  Accessible without login Plain text file _footers.scss Data Auxiliary data
  Accessible without login Plain text file _forms.scss Data Auxiliary data
  Accessible without login Plain text file _input-group.scss Data Auxiliary data
  Accessible without login Plain text file _list-group.scss Data Auxiliary data
  Accessible without login Plain text file _loader.scss Data Auxiliary data
  Accessible without login Plain text file _modals.scss Data Auxiliary data
  Accessible without login Plain text file _msc.scss Data Auxiliary data
  Accessible without login Plain text file _navbars.scss Data Auxiliary data
  Accessible without login Plain text file _pagination.scss Data Auxiliary data
  Accessible without login Plain text file _steppers.scss Data Auxiliary data
  Accessible without login Plain text file _tables.scss Data Auxiliary data
  Accessible without login Plain text file _treeview.scss Data Auxiliary data

  Files folder image Files (206)  /  public  /  mdb  /  scss  /  free  /  modules  
File Role Description
Files folder imageanimations-extended (2 files)

  Files folder image Files (206)  /  public  /  mdb  /  scss  /  free  /  modules  /  animations-extended  
File Role Description
  Accessible without login Plain text file animations-extended.scss Data Auxiliary data
  Accessible without login Plain text file _module.scss Data Auxiliary data

  Files folder image Files (206)  /  public  /  _nuxt  
File Role Description
Files folder imageimg (3 files)
Files folder imagestatic (6 directories)
  Accessible without login Plain text file 20da742.js Data Auxiliary data
  Accessible without login Plain text file 2bc9bd2.js Data Auxiliary data
  Accessible without login Plain text file 2f877f6.js Data Auxiliary data
  Accessible without login Plain text file 32b7254.js Data Auxiliary data
  Accessible without login Plain text file 369382c.js Data Auxiliary data
  Accessible without login Plain text file 3d892a7.js Data Auxiliary data
  Accessible without login Plain text file 4bd8b1d.js Data Auxiliary data
  Accessible without login Plain text file 5995da7.js Data Auxiliary data
  Accessible without login Plain text file 6b648fb.js Data Auxiliary data
  Accessible without login Plain text file 7550acb.js Data Auxiliary data
  Accessible without login Plain text file 7730cd8.js Data Auxiliary data
  Accessible without login Plain text file 78570a3.js Data Auxiliary data
  Accessible without login Plain text file 88858fc.js Data Auxiliary data
  Accessible without login Plain text file 9026bd6.js Data Auxiliary data
  Accessible without login Plain text file 96d42cb.js Data Auxiliary data
  Accessible without login Plain text file a036e54.js Data Auxiliary data
  Accessible without login Plain text file a8099ec.js Data Auxiliary data
  Accessible without login Plain text file a8e4944.js Data Auxiliary data
  Accessible without login Plain text file aba2bc4.js Data Auxiliary data
  Accessible without login Plain text file be8b119.js Data Auxiliary data
  Accessible without login Plain text file e5462a6.js Data Auxiliary data
  Accessible without login Plain text file fa0e860.js Data Auxiliary data
  Accessible without login Plain text file ff38817.js Data Auxiliary data
  Accessible without login Plain text file LICENSES Lic. License text

  Files folder image Files (206)  /  public  /  _nuxt  /  img  
File Role Description
  Accessible without login Plain text file fa-brands-400.2f517e0.svg Data Auxiliary data
  Accessible without login Plain text file fa-regular-400.4689f52.svg Data Auxiliary data
  Accessible without login Plain text file fa-solid-900.7a8b4f1.svg Data Auxiliary data

  Files folder image Files (206)  /  public  /  _nuxt  /  static  
File Role Description
Files folder image1645378653 (2 files)
Files folder image1645398277 (2 files)
Files folder image1645398497 (2 files)
Files folder image1645399012 (2 files)
Files folder image1645399294 (2 files)
Files folder image1645399733 (2 files)

  Files folder image Files (206)  /  public  /  _nuxt  /  static  /  1645378653  
File Role Description
  Accessible without login Plain text file manifest.js Data Auxiliary data
  Accessible without login Plain text file payload.js Data Auxiliary data

  Files folder image Files (206)  /  public  /  _nuxt  /  static  /  1645398277  
File Role Description
  Accessible without login Plain text file manifest.js Data Auxiliary data
  Accessible without login Plain text file payload.js Data Auxiliary data

  Files folder image Files (206)  /  public  /  _nuxt  /  static  /  1645398497  
File Role Description
  Accessible without login Plain text file manifest.js Data Auxiliary data
  Accessible without login Plain text file payload.js Data Auxiliary data

  Files folder image Files (206)  /  public  /  _nuxt  /  static  /  1645399012  
File Role Description
  Accessible without login Plain text file manifest.js Data Auxiliary data
  Accessible without login Plain text file payload.js Data Auxiliary data

  Files folder image Files (206)  /  public  /  _nuxt  /  static  /  1645399294  
File Role Description
  Accessible without login Plain text file manifest.js Data Auxiliary data
  Accessible without login Plain text file payload.js Data Auxiliary data

  Files folder image Files (206)  /  public  /  _nuxt  /  static  /  1645399733  
File Role Description
  Accessible without login Plain text file manifest.js Data Auxiliary data
  Accessible without login Plain text file payload.js Data Auxiliary data

  Files folder image Files (206)  /  resources  
File Role Description
Files folder imageviews (1 file)

  Files folder image Files (206)  /  resources  /  views  
File Role Description
  Accessible without login Plain text file index.blade.php Aux. Auxiliary script

  Files folder image Files (206)  /  routes  
File Role Description
  Accessible without login Plain text file web.php Example Example script

  Files folder image Files (206)  /  tests  
File Role Description
  Plain text file ExampleTest.php Class Class source
  Plain text file TestCase.php Class Class source

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 100%
Total:84
This week:0
All time:10,045
This week:53Up