Download the PHP package noeticitservices/plugindev without Composer

On this page you can find all versions of the php package noeticitservices/plugindev. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package plugindev

Nitseditor-Plugin-Environment

Latest Stable Version Total Downloads License

Environment for Nitseditor Plugin development

This package needs laravel installation, First install Laravel in your system, Now go to your installed directory and type:

$ composer require noeticitservices/plugindev

Now add the following service provider in config/app.php file

Nitseditor\System\Providers\NitsEditorServiceProvider::class,

Now publish the configuration files in config folder

php artisan vendor:publish

Configure passport setup,

Configure your model with:

<?php

namespace Noetic\Plugins\blog\Models;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Notifications\Notifiable;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Laravel\Passport\HasApiTokens;

class User extends Authenticatable
{
   use Notifiable, HasApiTokens; 

In you config\auth.php

'guards' => [
    'web' => [
        'driver' => 'session',
        'provider' => 'users',
    ],

    'api' => [
        'driver' => 'passport',
        'provider' => 'users',
    ],

    'nitseditor_blog' => [
        'driver' => 'passport',
        'provider' => 'blogUsers',
    ],
],

'providers' => [
    'users' => [
        'driver' => 'eloquent',
        'model' => App\Models\User::class,
    ],

    // 'users' => [
    //     'driver' => 'database',
    //     'table' => 'users',
    // ],

    'blogUsers' => [
        'driver' => 'eloquent',
        'model' => Noetic\Plugins\blog\Models\User::class,
    ]
],

Register the middleware AddCustomProvider and ConfigAccessTokenCustomProvider on app/Http/Kernel $middlewareGroups attribute.

'api' => [
        'throttle:60,1',
        'bindings',
        'nits-provider'
    ],

    'nits-provider' => [
        \Nitseditor\System\Middlewares\AddCustomProvider::class,
        \Nitseditor\System\Middlewares\ConfigAccessTokenCustomProvider::class,
    ]
];

Encapsulate the passport routes for access token with the registered middleware in AuthServiceProvider:

public function boot()
{
    $this->registerPolicies();

    Passport::routes();

    // Middleware `api` that contains the `custom-provider` middleware group defined on $middlewareGroups above
    Route::group(['middleware' => 'api'], function () {
        Passport::routes(function ($router) {
            return $router->forAccessTokens();
        });
    });
}

Now configure your composer.json file, you need define in psr-4 loader attributes, it should look something like this:

"autoload": {
    "classmap": [
        "database"
    ],
    "psr-4": {
        "App\\": "app/",
        "Noetic\\Plugins\\": "plugins/"
    }
},

You can check your installation by refreshing the home page, you will get home page of nits editor.

Usage

Add the provider parameter in your request at /oauth/token:

POST /oauth/token HTTP/1.1
Host: localhost
Accept: application/json, text/plain, */*
Content-Type: application/json;charset=UTF-8
Cache-Control: no-cache

{
    "username":"[email protected]",
    "password":"password",
    "grant_type" : "password",
    "client_id": "client-id",
    "client_secret" : "client-secret",
    "provider" : "blogUsers"
}    

You can pass your guards on auth middleware as you wish. Example:

Route::group(['middleware' => ['api', 'auth:nitseditor_blog']], function () {
    Route::get('/user', function ($request) {
        // Get the logged blog user instance
        return $request->user(); // You can use too `$request->user('nitseditor_blog')` passing the guard.
    });
});    

Do migration of passport by command php artisan migrate and then write php artisan passport:install to do the initial installation

To seed plugins database you can do command

php artisan db:seed --class="Noetic\Plugins\blog\Databases\seeds\InstallDatabase" 

and to uninstall you can do

php artisan db:seed --class="Noetic\Plugins\blog\Databases\seeds\InstallDatabase" 

where blog written in the class name is your plugin name. Or you can include these inside your database/seeds/DatabaseSeeder class as :

public function run()
{
     $this->call(\Noetic\Plugins\blog\Databases\seeds\InstallDatabase::class);
}

php artisan nitsPlugin Commands:

There are few commands which you can utilise to create your plugins for example suppose you want to create blog plugin then you can type:

$ php artisan nitsPlugin:createPlugin

It will ask for the plugin name which needs to be implemented while entering it, this will create plugin folder inside the the package and create necessary files to run plugins. For example we name our plugin as Blog To make your plugins work you need to go to the config folder and nitseditor.php file, and you need to define your plugin something like this:

'packages' => [
    'blog'         => [
        'name'             => 'Blog', //This is the folder name which will be created, this should be exaclty same as name defined while creating plugin
        'description'      => 'NitsEditor Blog for Laravel 5.4', //A small description of project or plugin.
    ],
],

Now once the setup is done you can cross check the functionality by typing your plugin name as prefix to home router. for example in this case you can see

http://localhost/your_project_folder/Blog/

You can see the page appearing and describing it is coming from the plugins folder.

Similarly you can have models by this command:

$ php artisan nitsPlugin:makeModel Blog

You can check your file inside Plugins/Blog/Models/ folder.

For controllers you can type:

$ php artisan nitsPlugin:makeController Blog

By default it will create BlogController class inside Plugins/Blog/Controllers/BlogController folder

You can create databases with tables by this command:

$ php artisan nitsPlugin:createDatabase Blog table=blogs

By default it will make database with class BlogTable and table name as blog inside Plugins/Blog/Databases/

For migrating the database:

$ php artisan migrate

This will by default take the up function inside BlogTable class and create the tables in the database.


All versions of plugindev with dependencies

PHP Build Version
Package Version
Requires php Version >=7.1.3
laravel/framework Version 5.8.*|^6.0|^7.0
laravel/passport Version ^7.0|^8.0|^9.0
laravel/telescope Version ^1.0|^2.0|^3.0
wikimedia/composer-merge-plugin Version dev-master
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package noeticitservices/plugindev contains the following files

Loading the files please wait ....