Download the PHP package kgophp/basic without Composer

On this page you can find all versions of the php package kgophp/basic. 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 basic

搭建

基于基础框架的搭建

1、下载laravel

2、执行composer require kgophp/basic

3、执行数据迁移,数据填充

1)、配置.env数据库

2)、auth.php 中增加

    guard:

    'admin' => [
        'driver' => 'passport',
        'provider' => 'admin'
    ],

    providers:

    'admin' => [
        'driver' => 'eloquent',
        'model' => YK\Basic\Models\AdminUser::class,
    ],

3)、迁移

php artisan vendor:publish --provider="YK\Basic\Providers\BasicServiceProvider"

4)、安装数据及文件

修改app\Providers\AppServiceProvider.php

use Illuminate\Support\Facades\Schema;

boot函数中增加:

Schema::defaultStringLength(191);

执行:

php artisan basic:install

如报错重新执行,需要将数据库清空,并删除database\migrations目录下的原生成文件

4、Passport 安装和配置

php artisan passport:install

执行成功后获取到相应的密码授予客户端的 ID 和 secret 并且配置到相对应的 config/index.js :

export default {
  admin: {
    authorize: {
      clientId: ID,
      clientSecret: secret
    }
}

5、修改app/Http/Kernel.php

app/Http/Kernel.php 中 $routeMiddleware 属性添加路由中间 oauth.providers 和 basic.permission, 并将auth中间件替换为如下:

protected $routeMiddleware = [
    //'auth' => \App\Http\Middleware\Authenticate::class,
    'auth' => \SMartins\PassportMultiauth\Http\Middleware\MultiAuthenticate::class,
    'oauth.providers' => \SMartins\PassportMultiauth\Http\Middleware\AddCustomProvider::class,
    'admin.permission' => \YK\Basic\Middleware\Authenticate::class,

6、安装vue等前端框架

npm install

npm install -D vuex@~3.0.1 vue-router@~3.0.1 vue-i18n@~8.1.0 localforage@~1.7.2 element-ui@~2.8.2

npm install echarts font-awesome vue-count-to

webpack.mix.js文件,增加:

mix.js('resources/js/app.js', 'public/js')
    .sass('resources/sass/app.scss', 'public/css')
    .js('resources/js/admin.js', 'public/js');

7、运行 Mix

npm run watch

npm run production

8、运行

修改routes\web.php

Route::get('/', function () {
    return view('dashboard');
});

执行:

php artisan serve

登录

url: http://localhost:8000/#/admin/login

username: admin

password: secret


All versions of basic with dependencies

PHP Build Version
Package Version
Requires php Version >=7.2.5
smartins/passport-multiauth Version ~5.0
spatie/laravel-permission Version ^5.3
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 kgophp/basic contains the following files

Loading the files please wait ....