Download the PHP package somarkn99/apibasicsetting without Composer
On this page you can find all versions of the php package somarkn99/apibasicsetting. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package apibasicsetting
API Basic Setting Package
This package allows you to secure and configure the essentials of your business using the API. :sunglasses:
Installation
You can install the package via composer:
Middleware
-
AcceptJsonResponse Middleware.
It Ensures you will get a response in JSON
-
CORS.
In order to avoid getting a CORS Error :triumph:
-
FingerPrintHeader
Delete personal information sent with unnecessary requests (in order to increase security) :no_bell: :mute:
-
Host
As an additional security step, applications are not accepted to a specific domain and are pre-defined in the .env file. :lock: :shield:
- Add this only for your dashboard or frontend app Don't use it for mobile application because it recognize it by Ip address for each user mobile
Note: Local server is accepted by default :v:
You can add more than one domain and be added as follows: in your .env file add this:
separated between each domain by ","
-
localization
When you work with SPA or Mobile Apps, you do not want to send messages by language other than the user language, for example user language is EN and you send it in Spanish!!
Here you can select the language you want to send to the user, all you need to do is add the language file to the lang folder and add a new item to the array.
From Client side you should send 'X-localization' header, if you don't english will be considered the default language of messages.
-
SecureCheck
You are building apps for many customers but don't know if they will use SSL certificates or not, which may cause some features in your app to break down. For that, this middleware prepares to rejected all requests that don't use https Protocol (Under Development until know)
Helpers
-
_dd
it's allow you to read the dd value from developer section in your browser.
-
setEnv
You can easily adjust the value of the variables in the .env file
-
checkIfFileExists
This function to check if request has file
-
dateFormat
It's allow you to format your date in function nested of write it every time for example:
Note :warning:
Not all of these codes have to be from my pure work, there are many of them on the Internet that I may have done some but not limited to some modification, improvement, or modification of the appearance of the code to become readable, understandable or appropriate to the place of use. If you have any code you think will be useful and people will use frequently in many projects do not hesitate to do a pull request to this repo.
Let's Connect
Hire Me :fire:
By the way, I'm available to work as freelancer, feel free to communicate with me in order to transform your project from an idea to reality.
Security
If you discover any security related issues, please email them first to [email protected], if we do not fix it within a short period of time please open a new issue describe your problem.