GithubHelp home page GithubHelp logo

mattthurling / core Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ml-archive/nodes-php-core

0.0 1.0 0.0 113 KB

Required package for all Nodes packages

Home Page: http://nodesagency.com

License: MIT License

PHP 100.00%

core's Introduction

Core

The main package used by most Nodes packages.

Total downloads Monthly downloads Latest release Open issues License Star repository on GitHub Watch repository on GitHub Fork repository on GitHub StyleCI

๐Ÿ“ 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

Follow Nodes PHP on Twitter Tweet Nodes PHP

๐Ÿ“„ License

This package is open-sourced software licensed under the MIT license

core's People

Contributors

casperhr avatar joscdk avatar pcoutinho avatar rasmusebbesen avatar rugaard avatar zeneo avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.