nodes / core
Required for all Nodes packages
Requires
- browscap/browscap-php: ^4.1
- illuminate/support: >=5.2.0 <6.15.0
- symfony/http-kernel: 2.8.*||3.0.*||3.1.*||3.2.*||3.3.*||4.1.*||4.3.*||4.4.*
- dev-master
- 1.1.23
- 1.1.22
- 1.1.21
- 1.1.20
- 1.1.19
- 1.1.18
- 1.1.17
- 1.1.16
- 1.1.15
- 1.1.14
- 1.1.13
- 1.1.12
- 1.1.11
- 1.1.10
- 1.1.9
- 1.1.8
- 1.1.7
- 1.1.6
- 1.1.5
- 1.1.4
- 1.1.3
- 1.1.2
- 1.1.1
- 1.1.0
- 1.0.11
- 1.0.10
- 1.0.9
- 1.0.8
- 1.0.7
- 1.0.6
- 1.0.5
- 1.0.4
- 1.0.3
- 1.0.2
- 1.0.1
- 1.0.0
- 0.1.27
- 0.1.26
- 0.1.25
- 0.1.24
- 0.1.23
- 0.1.22
- 0.1.21
- 0.1.20
- 0.1.19
- 0.1.18
- 0.1.17
- 0.1.16
- 0.1.15
- 0.1.14
- 0.1.13
- 0.1.12
- 0.1.11
- 0.1.10
- 0.1.9
- 0.1.8
- 0.1.7
- 0.1.6
- 0.1.5
- 0.1.4
- 0.1.3
- 0.1.2
- 0.1.1
- 0.1.0
- dev-develop
- dev-feature/prepare_for_laravel_6
- dev-analysis-wjyE5o
- dev-analysis-L3mdRo
- dev-analysis-zDE0WL
- dev-analysis-Xa1E1W
- dev-analysis-8wB6W2
- dev-analysis-XkWZRR
- dev-hotfix/bypass-options-n-meta
This package is auto-updated.
Last update: 2024-05-17 19:25:54 UTC
README
The main package used by most Nodes packages.
📝 Introduction
This package is what we in Nodes call the "Core" package. It consists of a lot of helpful methods, which makes it easier to develop other packages and projects in general.
The most important thing about this package, is that it contains a modified version of the default Exception
. We've tweaked it a little bit, to add support for custom HTTP status codes and messages.
These custom HTTP status code are used in all of our projects to return project specific error codes to our mobile developers.
Therefore you will experience that a lot of the Nodes packages will have this core package as a required dependency, since it either utilizes the custom Exception
or any of our helper methods.
Last but not least, this package also contains the package Browscap, which makes it easier to parse user-agents, which is quite handy when used with services like Bugsnag.
📦 Installation
To install this package you will need:
- Laravel 5.1+
- PHP 5.5.9+
You must then modify your composer.json
file and run composer update
to include the latest version of the package in your project.
"require": { "nodes/core": "^1.0" }
Or you can run the composer require command from your terminal.
composer require nodes/core
🔧 Setup
Setup provider in config/app.php
Nodes\ServiceProvider::class,
Setup alias in config/app.php
(optional)
'NodesUserAgent' => Nodes\Support\Facades\UserAgent::class,
Publish config files
php artisan vendor:publish --provider="Nodes\ServiceProvider"
If you want to overwrite any existing config files use the --force
paramter
php artisan vendor:publish --provider="Nodes\ServiceProvider" --force
Notes
If you are using the Nodes\Http\Request\FormRequest
present in this class, you will notice that on Web calls if validation fails it will report the exception (this does not interfere with the UX). This can be avoided by adding Illuminate\Validation\ValidationException
to the $dontReport
array on app/Exceptions/Handler.php
. This is not needed for API calls since the exception will be Nodes\Validation\Exceptions\ValidationException
and this does not report by default.
🏆 Credits
This package is developed and maintained by the PHP team at Nodes
📄 License
This package is open-sourced software licensed under the MIT license