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,053 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
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

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,053
This week:53Up