All Projects → nodes-php → Backend

nodes-php / Backend

Licence: mit
Nodes backend package

Projects that are alternatives of or similar to Backend

Doctype admin
Laravel Admin Panel for lazy developers. Contains User Management, Roles and Permission Management, Activity Logging and integratable packages
Stars: ✭ 44 (+238.46%)
Mutual labels:  laravel, admin-panel
Laravel Authentication Acl
Laravel authentication and ACL admin panel package based on sentry
Stars: ✭ 292 (+2146.15%)
Mutual labels:  laravel, admin-panel
Crudbooster
Laravel CRUD Generator, Make an Advanced Web Application Quickly
Stars: ✭ 1,580 (+12053.85%)
Mutual labels:  laravel, admin-panel
Coreui Free Laravel Admin Template
CoreUI Free Laravel Bootstrap Admin Template
Stars: ✭ 353 (+2615.38%)
Mutual labels:  laravel, admin-panel
Laratrust
Handle roles and permissions in your Laravel application
Stars: ✭ 1,799 (+13738.46%)
Mutual labels:  laravel, admin-panel
Litstack
Build content-administration-panels in Laravel
Stars: ✭ 602 (+4530.77%)
Mutual labels:  laravel, admin-panel
Laravelshoppingcart
Shopping Cart Implementation for Laravel Framework
Stars: ✭ 853 (+6461.54%)
Mutual labels:  laravel
Laravel Mention
a laravel user mentioned package
Stars: ✭ 12 (-7.69%)
Mutual labels:  laravel
Laravel Mail Preview
A mail driver to quickly preview mail
Stars: ✭ 851 (+6446.15%)
Mutual labels:  laravel
Foocart
A Laravel 5 eCommerce application with integrated Stripe payments.
Stars: ✭ 8 (-38.46%)
Mutual labels:  laravel
Laravel Smsgateway Notification Channel
SMS Gateway notification channel for Laravel
Stars: ✭ 13 (+0%)
Mutual labels:  laravel
Laravel Mailguneu
Allow customising the Mailgun server URL to use EU servers.
Stars: ✭ 13 (+0%)
Mutual labels:  laravel
Binding Of Isaac Api
A RESTful API for the Binding of Isaac game series
Stars: ✭ 11 (-15.38%)
Mutual labels:  laravel
Deployer
Deployer is a free and open source deployment tool.
Stars: ✭ 854 (+6469.23%)
Mutual labels:  laravel
Easy Cache
a cache trait for Laravel to do cache eaily
Stars: ✭ 12 (-7.69%)
Mutual labels:  laravel
Dockerized lara
Build your Laravel App with Redis - Mongodb - MariaDB - Nginx - php7 - zsh
Stars: ✭ 9 (-30.77%)
Mutual labels:  laravel
Laravel Image Optimizer
Optimize images in your Laravel app
Stars: ✭ 873 (+6615.38%)
Mutual labels:  laravel
Base
Until 2018, Backpack v3 used this Base package to offer admin authentication and a blank admin panel using AdminLTE. Backpack v4 no longer uses this package, they're now built-in - use Backpack/CRUD instead.
Stars: ✭ 848 (+6423.08%)
Mutual labels:  laravel
Blender
The Laravel template used for our CMS like projects
Stars: ✭ 862 (+6530.77%)
Mutual labels:  laravel
Laravel Test Factory Helper
Generate Laravel test factories from your existing models
Stars: ✭ 873 (+6615.38%)
Mutual labels:  laravel

Backend

A easy and clean backend to Laravel.

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

📝 Introduction

One thing we at Nodes have been missing in Laravel is a fast implemented backend which is easy to build on top of

📦 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/backend": "3.1.*",
}

Or you can run the composer require command from your terminal.

composer require nodes/backend

🔧 Setup

Setup service providers in config/app.php

Nodes\Backend\ServiceProvider::class,
Nodes\Assets\ServiceProvider::class,
Nodes\Validation\ServiceProvider::class,
Nodes\Cache\ServiceProvider::class,
Collective\Html\HtmlServiceProvider::class,
Nodes\ServiceProvider::class,

Setup alias in config/app.php

'Backend'        => Nodes\Backend\Support\Facades\Backend::class,
'Form'           => Collective\Html\FormFacade::class,
'Html'           => Collective\Html\HtmlFacade::class,

Publish config file all config files at once, we need to use force on backend, since we override gulp. The regular vendor:publish is for the 3 other packages

php artisan vendor:publish && php artisan vendor:publish --provider="Nodes\Backend\ServiceProvider" --force

Publish config file for backend plugin only

php artisan vendor:publish --provider="Nodes\Backend\ServiceProvider"

Overwrite config file for backend plugin only

php artisan vendor:publish --provider="Nodes\Backend\ServiceProvider" --force

Add following to your /database/seeds/DatabaseSeeder.php

$this->call('NodesBackendSeeder');

Dump

composer dump-autoload

Now you can call php artisan migrate --seed Which will add the new tables and seed the roles/users to get going

Add to config/nodes/autoload.php

'project/Routes/Backend/',

Run bower, npm & gulp to build css & js

bower install && npm install && gulp build

Set up CSRF by pass in App\Http\Middleware\VerifyCsrfToken.php

protected $except = [
    'admin/manager_auth',
];

Make TokenMismatch exceptions more user friendly, add following to App\Exceptions\Handler.php

public function render($request, Exception $e)
{
    // Just redirect back to previous route if there is any, else all the way back to dashboard
    // Instead of a ugly whoops error!
    if ($exception instanceof TokenMismatchException) {
        try {
            return redirect()->back()->with('error', 'Token mismatch, try again')->send();
        } catch (\Throwable $e) {}
    }
    ....
}

⚙ Usage

Global function

backend_auth - Access all other function on mananger
backend_user - Retrieve user object
backend_user_check - Check if there is authed user
backend_user_authenticate - Try to auth with current request, pass [] as providers are registered
backend_user_login - Force login another user
backend_user_logout - Logout user
backend_attempt - Attempt to authenticate a user using the given credentials
query_restorer - Use to restore query params from cookie, handy for routing between views with queries
query_restorer_with_flash - Use to restore query params from cookie, handy for routing between views with queries. Remembers the flash between reloads also
backend_router - Access all other router functions
backend_router_pattern - Used fx for selecting navigation item by path 
backend_router_alias - Used fx for selecting navigation item by route

Redirect with flash

redirect()->back()->withInput()->with('error', 'Unknown Error') // Only strings
redirect()->back()->withInput()->with('errors', $myErrorBag)
redirect()->back()->withInput()->with('errors', $myValidator->errorsBag());
redirect()->back()->withInput()->with('success', 'Everything is ok')
redirect()->back()->withInput()->with('info', 'Insert info')
redirect()->back()->withInput()->with('warning', 'Insert warning')

🏆 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

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].