Recommend this page to a friend! |
Download |
Info | Files | Install with Composer | Download | Reputation | Support forum | Blog | Links |
Ratings | Unique User Downloads | Download Rankings | ||||
Not yet rated by the users | Total: 26 | All time: 11,193 This week: 455 |
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 (80) |
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 (80) | / | 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 (80) | / | app | / | Http |
File | Role | Description | ||
---|---|---|---|---|
Controllers (2 files) | ||||
Middleware (8 files) | ||||
Resources (1 file) | ||||
Kernel.php | Class | Class source |
Files (80) | / | app | / | Http | / | Controllers |
File | Role | Description |
---|---|---|
Controller.php | Class | Class source |
ExpensesController.php | Class | Class source |
Files (80) | / | 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 (80) | / | app | / | Models |
File | Role | Description |
---|---|---|
Expense.php | Class | Class source |
User.php | Class | Class source |
Files (80) | / | 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 (80) | / | 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 (80) | / | database |
File | Role | Description | ||
---|---|---|---|---|
factories (1 file) | ||||
migrations (5 files) | ||||
seeders (3 files) |
Files (80) | / | 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 (80) | / | database | / | seeders |
File | Role | Description |
---|---|---|
DatabaseSeeder.php | Class | Class source |
ExpenseSeeder.php | Class | Class source |
UserSeeder.php | Class | Class source |
Files (80) | / | public |
File | Role | Description |
---|---|---|
.htaccess | Data | Auxiliary data |
index.php | Class | Class source |
robots.txt | Doc. | Documentation |
web.config | Data | Auxiliary data |
Files (80) | / | resources | / | js |
File | Role | Description |
---|---|---|
app.js | Data | Auxiliary data |
bootstrap.js | Data | Auxiliary data |
Files (80) | / | 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 (80) | / | 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 (80) | / | tests |
File | Role | Description | ||
---|---|---|---|---|
Feature (2 files) | ||||
Unit (1 file) | ||||
CreatesApplication.php | Class | Class source | ||
TestCase.php | Class | Class source |
Files (80) | / | tests | / | Feature |
File | Role | Description |
---|---|---|
ExampleTest.php | Class | Class source |
ExpensesEndpointTest.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 |
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.