Recommend this page to a friend! |
Download .zip |
Info | View files (80) | Download .zip | Reputation | Support forum | Blog | Links |
Last Updated | Ratings | Unique User Downloads | Download Rankings | |||||
2021-09-05 (6 days ago) | Not yet rated by the users | Total: 17 This week: 17 | All time: 10,373 This week: 9 |
Version | License | PHP version | Categories | |||
expenses-management 1.0 | Shareware | 5 | PHP 5, Web services, Finances |
Description | Author | ||||||||||||||
This package provides an API to manage records of expenses of users. |
|
The installation of this project requires composer
Step 1: Clone this repository
git clone git@github.com:ahmard/ict-expenses-management.git
Step 2: Change directory ownership
chown www-data:www-data ict-expenses-management -R
Step 3: Install composer dependencies
cd ict-expenses-management
composer update
Step 5: Generate application key
php artisan key:generate
Step 7: Restart nginx
service nginx restart
cd ict-expenses-management
php artisan serve
And all your requests should be sent to http://localhost:8000
Send GET request to /api/expenses endpoint
Send POST request to /api/expenses endpoint with following json-payload
{
"user": 1,
"reason" : "Your expense reason",
"value": "Your expense value",
"date": "YYYY-MM-DD"
}
If your expense is created, you'll receive something like
{
"success": true,
"status": 200,
"data": {
"user": 1,
"reason": "Fri",
"value": 2384,
"date": "2021-08-19",
"updated_at": "2021-08-19T11:44:27.000000Z",
"created_at": "2021-08-19T11:44:27.000000Z",
"expense_id": 8
}
}
In case of any validation error, you'll receive response similar to below
{
"success": false,
"status": 500,
"data": {
"reason": [
"The reason must be at least 3 characters."
]
}
}
php artisan test
Files |
File | Role | Description | ||
---|---|---|---|---|
app (1 file, 5 directories) | ||||
bootstrap (1 file) | ||||
config (16 files) | ||||
database (3 directories) | ||||
public (4 files) | ||||
resources (3 directories) | ||||
routes (4 files) | ||||
tests (2 files, 2 directories) | ||||
.editorconfig | Data | Auxiliary data | ||
.env.example | Data | Auxiliary data | ||
.styleci.yml | Data | Auxiliary data | ||
artisan | Class | Class source | ||
composer.json | Data | Auxiliary data | ||
composer.lock | Data | Auxiliary data | ||
package.json | Data | Auxiliary data | ||
phpunit.xml | Data | Auxiliary data | ||
README.md | Doc. | Documentation | ||
requests.http | Data | Auxiliary data | ||
server.php | Aux. | Auxiliary script | ||
webpack.mix.js | Data | Auxiliary data |
Files | / | app |
File | Role | Description | ||
---|---|---|---|---|
Console (1 file) | ||||
Exceptions (1 file) | ||||
Http (1 file, 3 directories) | ||||
Models (2 files) | ||||
Providers (5 files) | ||||
JsonResponseDecorator.php | Class | Class source |
Files | / | app | / | Http |
File | Role | Description | ||
---|---|---|---|---|
Controllers (2 files) | ||||
Middleware (8 files) | ||||
Resources (1 file) | ||||
Kernel.php | Class | Class source |
Files | / | app | / | Http | / | Controllers |
File | Role | Description |
---|---|---|
Controller.php | Class | Class source |
ExpensesController.php | Class | Class source |
Files | / | app | / | Http | / | Middleware |
File | Role | Description |
---|---|---|
Authenticate.php | Class | Class source |
EncryptCookies.php | Class | Class source |
PreventRequestsDuringMaintenance.php | Class | Class source |
RedirectIfAuthenticated.php | Class | Class source |
TrimStrings.php | Class | Class source |
TrustHosts.php | Class | Class source |
TrustProxies.php | Class | Class source |
VerifyCsrfToken.php | Class | Class source |
Files | / | app | / | Models |
File | Role | Description |
---|---|---|
Expense.php | Class | Class source |
User.php | Class | Class source |
Files | / | app | / | Providers |
File | Role | Description |
---|---|---|
AppServiceProvider.php | Class | Class source |
AuthServiceProvider.php | Class | Class source |
BroadcastServiceProvider.php | Class | Class source |
EventServiceProvider.php | Class | Class source |
RouteServiceProvider.php | Class | Class source |
Files | / | config |
File | Role | Description |
---|---|---|
app.php | Class | Class source |
auth.php | Class | Class source |
broadcasting.php | Aux. | Auxiliary script |
cache.php | Aux. | Auxiliary script |
cors.php | Aux. | Auxiliary script |
database.php | Aux. | Auxiliary script |
dev.conf | Data | Auxiliary data |
filesystems.php | Aux. | Auxiliary script |
hashing.php | Aux. | Auxiliary script |
logging.php | Class | Class source |
mail.php | Aux. | Auxiliary script |
queue.php | Aux. | Auxiliary script |
sanctum.php | Class | Class source |
services.php | Aux. | Auxiliary script |
session.php | Aux. | Auxiliary script |
view.php | Aux. | Auxiliary script |
Files | / | database | / | migrations |
File | Role | Description |
---|---|---|
2014_10_12_000000_create_users_table.php | Class | Class source |
2014_10_12_100000_...rd_resets_table.php | Class | Class source |
2019_08_19_000000_...iled_jobs_table.php | Class | Class source |
2019_12_14_000001_...ss_tokens_table.php | Class | Class source |
2021_08_19_103631_..._expenses_table.php | Class | Class source |
Files | / | database | / | seeders |
File | Role | Description |
---|---|---|
DatabaseSeeder.php | Class | Class source |
ExpenseSeeder.php | Class | Class source |
UserSeeder.php | Class | Class source |
Files | / | public |
File | Role | Description |
---|---|---|
.htaccess | Data | Auxiliary data |
index.php | Class | Class source |
robots.txt | Doc. | Documentation |
web.config | Data | Auxiliary data |
Files | / | resources | / | js |
File | Role | Description |
---|---|---|
app.js | Data | Auxiliary data |
bootstrap.js | Data | Auxiliary data |
Files | / | resources | / | lang | / | en |
File | Role | Description |
---|---|---|
auth.php | Aux. | Auxiliary script |
pagination.php | Aux. | Auxiliary script |
passwords.php | Aux. | Auxiliary script |
validation.php | Aux. | Auxiliary script |
Files | / | routes |
File | Role | Description |
---|---|---|
api.php | Class | Class source |
channels.php | Example | Example script |
console.php | Example | Example script |
web.php | Aux. | Auxiliary script |
Files | / | tests |
File | Role | Description | ||
---|---|---|---|---|
Feature (2 files) | ||||
Unit (1 file) | ||||
CreatesApplication.php | Class | Class source | ||
TestCase.php | Class | Class source |
Files | / | tests | / | Feature |
File | Role | Description |
---|---|---|
ExampleTest.php | Class | Class source |
ExpensesEndpointTest.php | Class | Class source |
expenses-management-2021-09-05.zip 83KB | |
expenses-management-2021-09-05.tar.gz 63KB | |
Install with Composer |
Version Control | Unique User Downloads | Download Rankings | |||||||||||||||
100% |
|
|
Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.