nishchay / framework
Nishchay - Open Structure PHP framework
Requires
- php: ~8.0
- pear/console_table: ~1.3.1
- swiftmailer/swiftmailer: ~6.2.3
- twig/twig: ~3.0.3
Requires (Dev)
- phpunit/phpunit: ~8.5
README
Nishchay is open structure php framework which allows us to create web application, REST web services and more.
Install
This framework is installed using composer only. Use below command
composer create-project nishchay/nishchay {YourAppName}
Installaion guidelines
Learn
Learn everything about nishchay here.
Next thing
If you are using framework for the first time, please go throw implementation which came with installatiion.
This installation comes with following implementations:
- Login
- Register
- Get user detail
- Static pages
aboutUs
,help
&terms
.
Setup things
Setup your application by one of Installaion guidelines, once that is done follow below steps
Step 1: Database setting
Database settings are located in settings/configuration/database.php
, where you can place one or more database connection configuration.
Step 2: Import tables
In order to check implementation which came with installation, please execute db.sql
which is placed at root directory of application.
Step 3: Create account
If you have configured your app on domain name http://app.nishchay.local
, then make POST request to http://app.nishchay.local/service/account/register
with following parameters:
- firstName
- lastName
- password
- isTermAccepted = Y
- scope=user
This will return access token using which you can access services which requires token.
Step 4: Check login
Check login service by providing credential which you used while creating account in above step. This service is accessed at http://app.nishchay.local/service/account/authorize
. Pass following parameters:
- password
- scope=user
This service also returns access token.
Step 5: Get user detail
Using http://app.nishchay.local/service/account
service get user detail, You only need to following parameters:
- Pass access token in header with name
X-Service-Token
. - Pass
scope
in GET parameter.