add Nft Mint
This commit is contained in:
parent
cce55c279f
commit
de5203d409
93
app/Exports/MintExport.php
Normal file
93
app/Exports/MintExport.php
Normal file
@ -0,0 +1,93 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exports;
|
||||
|
||||
use App\Models\MintModel;
|
||||
use Maatwebsite\Excel\Concerns\FromCollection;
|
||||
use Maatwebsite\Excel\Concerns\WithHeadings;
|
||||
use Maatwebsite\Excel\Concerns\WithMapping;
|
||||
use Illuminate\Contracts\Support\Responsable;
|
||||
use Maatwebsite\Excel\Concerns\Exportable;
|
||||
|
||||
|
||||
|
||||
class MintExport implements FromCollection,WithHeadings,WithMapping,Responsable
|
||||
{
|
||||
use Exportable;
|
||||
protected $data;
|
||||
private $fileName;
|
||||
|
||||
public function __construct( )
|
||||
{
|
||||
//实例化该脚本的时候,需要传入要导出的数据
|
||||
// $this->data = $data;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Illuminate\Support\Collection
|
||||
*/
|
||||
public function collection()
|
||||
{
|
||||
return MintModel::all();
|
||||
}
|
||||
|
||||
public function array():array
|
||||
{
|
||||
return $this->data;
|
||||
|
||||
}
|
||||
|
||||
public function map($row): array
|
||||
{
|
||||
return [
|
||||
$row['idx'],
|
||||
$row['unikey'],
|
||||
$row['account'],
|
||||
$row['game_id'],
|
||||
$row['ignore'],
|
||||
$row['bc_minted'],
|
||||
$row['bc_mint_txhash'],
|
||||
$row['bc_mint_itemid'],
|
||||
$row['bc_mint_tokenid'],
|
||||
$row['bc_mint_token_type'],
|
||||
$row['bc_mint_tags'],
|
||||
$row['bc_mint_count'],
|
||||
$row['bc_mint_time'],
|
||||
$row['bc_mint_prepare_block_number'],
|
||||
$row['bc_mint_success_block_number'],
|
||||
$row['bc_mint_confirm_time'],
|
||||
$row['suspend'],
|
||||
$row['suspend_reason'],
|
||||
$row['done'],
|
||||
$row['createtime'],
|
||||
$row['modifytime'],
|
||||
];
|
||||
}
|
||||
|
||||
public function headings(): array
|
||||
{
|
||||
return [
|
||||
'idx',
|
||||
'unikey',
|
||||
'account',
|
||||
'game_id',
|
||||
'ignore',
|
||||
'bc_minted',
|
||||
'bc_mint_txhash',
|
||||
'bc_mint_itemid',
|
||||
'bc_mint_tokenid',
|
||||
'bc_mint_token_type',
|
||||
'bc_mint_tags',
|
||||
'bc_mint_count',
|
||||
'bc_mint_time',
|
||||
'bc_mint_prepare_block_number',
|
||||
'bc_mint_success_block_number',
|
||||
'bc_mint_confirm_time',
|
||||
'suspend',
|
||||
'suspend_reason',
|
||||
'done',
|
||||
'createtime',
|
||||
'modifytime',
|
||||
];
|
||||
}
|
||||
}
|
73
app/Exports/NftExport.php
Normal file
73
app/Exports/NftExport.php
Normal file
@ -0,0 +1,73 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exports;
|
||||
|
||||
use App\Models\NftModel;
|
||||
use Illuminate\Contracts\Support\Responsable;
|
||||
use Maatwebsite\Excel\Concerns\Exportable;
|
||||
use Maatwebsite\Excel\Concerns\FromCollection;
|
||||
use Maatwebsite\Excel\Concerns\WithHeadings;
|
||||
use Maatwebsite\Excel\Concerns\WithMapping;
|
||||
|
||||
class NftExport implements FromCollection,WithHeadings,WithMapping,Responsable
|
||||
{
|
||||
use Exportable;
|
||||
protected $data;
|
||||
private $fileName;
|
||||
/**
|
||||
* @return \Illuminate\Support\Collection
|
||||
*/
|
||||
public function collection()
|
||||
{
|
||||
return NftModel::all();
|
||||
}
|
||||
public function array():array
|
||||
{
|
||||
return $this->data;
|
||||
|
||||
}
|
||||
|
||||
public function map($row): array
|
||||
{
|
||||
return [
|
||||
$row['idx'],
|
||||
$row['owner_address'],
|
||||
$row['creator_address'],
|
||||
$row['token_id'],
|
||||
$row['token_type'],
|
||||
$row['token_state'],
|
||||
$row['game_id'],
|
||||
$row['item_id'],
|
||||
$row['deleted'],
|
||||
$row['opened'],
|
||||
$row['confirm_count'],
|
||||
$row['confirm_block_number'],
|
||||
$row['rand_attr'],
|
||||
$row['tags'],
|
||||
$row['createtime'],
|
||||
$row['modifytime'],
|
||||
];
|
||||
}
|
||||
|
||||
public function headings(): array
|
||||
{
|
||||
return [
|
||||
'idx',
|
||||
'owner_address',
|
||||
'creator_address',
|
||||
'token_id',
|
||||
'token_type',
|
||||
'token_state',
|
||||
'game_id',
|
||||
'item_id',
|
||||
'deleted',
|
||||
'opened',
|
||||
'confirm_count',
|
||||
'confirm_block_number',
|
||||
'rand_attr',
|
||||
'tags',
|
||||
'createtime',
|
||||
'modifytime',
|
||||
];
|
||||
}
|
||||
}
|
@ -1,9 +1,9 @@
|
||||
<?php
|
||||
|
||||
define("ERROR_CODE_OK", 200);
|
||||
define("ERROR_CODE_OK", 200); //请求成功
|
||||
define("ERROR_CODE_NO",1001); //请求失败
|
||||
|
||||
define("ERROR_CODE_PERMISSION_NO",1001);
|
||||
define("ERROR_CODE_PARAM_INVALID", 1003);
|
||||
define("ERROR_CODE_PARAM_INVALID", 1003); //请求参数错误
|
||||
define("ERROR_CODE_INTERNAL_ERROR", 1005);
|
||||
define("ERROR_CODE_REQUEST_ERROR", 1007);
|
||||
|
||||
|
@ -2,8 +2,11 @@
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
|
||||
use App\Exports\MintExport;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Maatwebsite\Excel\Facades\Excel;
|
||||
|
||||
class IndexController extends Controller
|
||||
{
|
||||
@ -12,6 +15,25 @@ class IndexController extends Controller
|
||||
// $data = DB::table('t_mint')->get()->toArray();
|
||||
// dump($data);
|
||||
// echo uniqid().md5(strtotime(now('')));
|
||||
echo env('WEB3_SERVE_URL');
|
||||
return $this->success([],'访问主页');
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据name导出数据
|
||||
* @param Request $request
|
||||
* @return \Illuminate\Http\JsonResponse|\Symfony\Component\HttpFoundation\BinaryFileResponse
|
||||
*/
|
||||
public function exports(Request $request){
|
||||
if (!$request->has('name') || empty($request->get('name'))) {
|
||||
return $this->error(ERROR_CODE_PARAM_INVALID,'缺少参数');
|
||||
}
|
||||
$name = $request->get('name');
|
||||
return Excel::download(app( $this->createExport($name)),$name.'.xlsx');
|
||||
}
|
||||
|
||||
|
||||
public function createExport($name){
|
||||
$name = ucwords($name);
|
||||
return 'App\Exports\\'.$name.'Export';
|
||||
}
|
||||
}
|
||||
|
43
app/Http/Controllers/MintController.php
Normal file
43
app/Http/Controllers/MintController.php
Normal file
@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Exports\MintExport;
|
||||
use App\Models\MintModel;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
use Maatwebsite\Excel\Facades\Excel;
|
||||
|
||||
class MintController extends Controller
|
||||
{
|
||||
|
||||
public function index(Request $request)
|
||||
{
|
||||
$size = $request->get('size', 10);
|
||||
$map = function (Builder $builder) use ($request) {
|
||||
|
||||
if ($request->input('status') == 1){
|
||||
$builder->where('suspend', 1);
|
||||
}else if ($request->input('status') == 2){
|
||||
$builder->where('done', 1);
|
||||
}else if ($request->input('status') == 3){
|
||||
$builder->where('ignore', 1);
|
||||
}
|
||||
|
||||
if ($request->has('account')&& ! empty($request->input('account'))){
|
||||
$builder->where('account', $request->input('account'));
|
||||
}
|
||||
if ($request->has('unikey')&& ! empty($request->input('unikey'))){
|
||||
$builder->where('unikey', $request->input('unikey'));
|
||||
}
|
||||
if($request->has('time')&& ! empty($request->input('time')[0] && !empty($request->input('time')[1]))){
|
||||
$start = strtotime($request->input('time')[0]);
|
||||
$end = strtotime($request->input('time')[1]);
|
||||
$builder->whereBetween('createtime',[$start,$end]);
|
||||
}
|
||||
|
||||
};
|
||||
$data = MintModel::where($map)->orderBy('idx','desc')->paginate($size)->toArray();
|
||||
return $this->success($data);
|
||||
}
|
||||
}
|
45
app/Http/Controllers/NftController.php
Normal file
45
app/Http/Controllers/NftController.php
Normal file
@ -0,0 +1,45 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Models\NftModel;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
|
||||
class NftController extends Controller
|
||||
{
|
||||
//
|
||||
public function index(Request $request)
|
||||
{
|
||||
$size = $request->get('size', 10);
|
||||
$map = function (Builder $builder) use ($request) {
|
||||
|
||||
if ($request->has('token_id')&& ! empty($request->input('token_id'))){
|
||||
$builder->where('token_id',$request->input('token_id'));
|
||||
}
|
||||
if ($request->has('creator')&& ! empty($request->input('creator'))){
|
||||
$builder->where('creator_address',$request->input('creator'));
|
||||
}
|
||||
if ($request->has('owner')&& ! empty($request->input('owner'))){
|
||||
$builder->where('owner_address', $request->input('owner'));
|
||||
}
|
||||
if($request->has('time')&& ! empty($request->input('time')[0] && !empty($request->input('time')[1]))){
|
||||
$start = strtotime($request->input('time')[0]);
|
||||
$end = strtotime($request->input('time')[1]);
|
||||
$builder->whereBetween('createtime',[$start,$end]);
|
||||
}
|
||||
|
||||
};
|
||||
$data = NftModel::where($map)->orderBy('idx','desc')->paginate($size)->toArray();
|
||||
return $this->success($data);
|
||||
}
|
||||
|
||||
public function show(Request $request){
|
||||
if (! $request->get('idx')){
|
||||
return $this->error(ERROR_CODE_PARAM_INVALID,'缺少参数');
|
||||
}
|
||||
$data = NftModel::with('nftTransfer')->where('idx',$request->get('idx'))->first()->toArray();
|
||||
return $this->success($data);
|
||||
}
|
||||
|
||||
}
|
@ -2,20 +2,34 @@
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Models\User;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
|
||||
class UserController extends Controller
|
||||
{
|
||||
//
|
||||
//查看用户列表
|
||||
public function index(Request $request){
|
||||
echo '有权访问index';
|
||||
$size = $request->get('size', 10);
|
||||
$user = User::paginate($size)->toArray();
|
||||
return $this->success($user);
|
||||
}
|
||||
|
||||
public function show(){
|
||||
echo '有权访问show';
|
||||
}
|
||||
//修改昵称
|
||||
public function update($account,Request $request){
|
||||
|
||||
public function create(){
|
||||
echo '有权访问create';
|
||||
$validator = Validator::make($request->all(),[
|
||||
'nickname' => 'required',
|
||||
], [
|
||||
'nickname.required' => '用户昵称不能为空',
|
||||
]);
|
||||
if ($validator->fails()){
|
||||
return $this->error(ERROR_CODE_PARAM_INVALID,$validator->errors()->first());
|
||||
}
|
||||
$res = User::where('account',$account)->update($request->input());
|
||||
if (! $res){
|
||||
return $this->error(ERROR_CODE_NO,'修改失败');
|
||||
}
|
||||
return $this->success([],'修改成功');
|
||||
}
|
||||
}
|
||||
|
@ -27,7 +27,7 @@ class CheckNode
|
||||
// $path = $controller.'/'.$action;
|
||||
// $user = User::with('nodeGroup')->find($uid)->toArray();
|
||||
// if (empty($user['node_group'])) {
|
||||
// return $this->error(ERROR_CODE_PERMISSION_NO,'无权访问');
|
||||
// return $this->error(ERROR_CODE_NO,'无权访问');
|
||||
// }
|
||||
// $node_ids = array_column($user['node_group'],'node_ids');
|
||||
// foreach ($node_ids as &$val){
|
||||
@ -39,7 +39,7 @@ class CheckNode
|
||||
// }
|
||||
// $route_uri = array_filter(array_unique(array_column(Node::getRouteUriById($node_ids),'route_uri')));
|
||||
// if (! in_array($path,$route_uri)){
|
||||
// return $this->error(ERROR_CODE_PERMISSION_NO,'无权访问');
|
||||
// return $this->error(ERROR_CODE_NO,'无权访问');
|
||||
// }
|
||||
return $next($request);
|
||||
}
|
||||
|
17
app/Models/MintModel.php
Normal file
17
app/Models/MintModel.php
Normal file
@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class MintModel extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
public $table = 't_mint';
|
||||
public function getCreatetimeAttribute($value)
|
||||
{
|
||||
return date('Y-m-d H:i:s',$value);
|
||||
}
|
||||
|
||||
}
|
22
app/Models/NftModel.php
Normal file
22
app/Models/NftModel.php
Normal file
@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class NftModel extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
public $table = 't_nft';
|
||||
|
||||
public function nftTransfer(){
|
||||
return $this->hasMany(NftTransferModel::class,'token_id','token_id');
|
||||
}
|
||||
|
||||
public function getCreatetimeAttribute($value)
|
||||
{
|
||||
return date('Y-m-d H:i:s',$value);
|
||||
}
|
||||
|
||||
}
|
12
app/Models/NftTransferModel.php
Normal file
12
app/Models/NftTransferModel.php
Normal file
@ -0,0 +1,12 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class NftTransferModel extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
public $table = 't_nft_transfer';
|
||||
}
|
@ -11,7 +11,8 @@
|
||||
"laravel/framework": "^8.75",
|
||||
"laravel/passport": "^10.4",
|
||||
"laravel/sanctum": "^2.11",
|
||||
"laravel/tinker": "^2.5"
|
||||
"laravel/tinker": "^2.5",
|
||||
"maatwebsite/excel": "^3.1"
|
||||
},
|
||||
"require-dev": {
|
||||
"facade/ignition": "^2.5",
|
||||
|
515
composer.lock
generated
515
composer.lock
generated
@ -4,7 +4,7 @@
|
||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "eea4950e30ba2ae0698467c0fd80ffc3",
|
||||
"content-hash": "bdc8280b86063bbb5ed45f83659397f9",
|
||||
"packages": [
|
||||
{
|
||||
"name": "asm89/stack-cors",
|
||||
@ -526,6 +526,63 @@
|
||||
],
|
||||
"time": "2020-12-29T14:50:06+00:00"
|
||||
},
|
||||
{
|
||||
"name": "ezyang/htmlpurifier",
|
||||
"version": "v4.14.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/ezyang/htmlpurifier.git",
|
||||
"reference": "12ab42bd6e742c70c0a52f7b82477fcd44e64b75"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/ezyang/htmlpurifier/zipball/12ab42bd6e742c70c0a52f7b82477fcd44e64b75",
|
||||
"reference": "12ab42bd6e742c70c0a52f7b82477fcd44e64b75",
|
||||
"shasum": "",
|
||||
"mirrors": [
|
||||
{
|
||||
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
|
||||
"preferred": true
|
||||
}
|
||||
]
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.2"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"files": [
|
||||
"library/HTMLPurifier.composer.php"
|
||||
],
|
||||
"psr-0": {
|
||||
"HTMLPurifier": "library/"
|
||||
},
|
||||
"exclude-from-classmap": [
|
||||
"/library/HTMLPurifier/Language/"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"LGPL-2.1-or-later"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Edward Z. Yang",
|
||||
"email": "admin@htmlpurifier.org",
|
||||
"homepage": "http://ezyang.com"
|
||||
}
|
||||
],
|
||||
"description": "Standards compliant HTML filter written in PHP",
|
||||
"homepage": "http://htmlpurifier.org/",
|
||||
"keywords": [
|
||||
"html"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/ezyang/htmlpurifier/issues",
|
||||
"source": "https://github.com/ezyang/htmlpurifier/tree/v4.14.0"
|
||||
},
|
||||
"time": "2021-12-25T01:21:49+00:00"
|
||||
},
|
||||
{
|
||||
"name": "firebase/php-jwt",
|
||||
"version": "v6.2.0",
|
||||
@ -2237,6 +2294,286 @@
|
||||
],
|
||||
"time": "2021-06-28T04:27:21+00:00"
|
||||
},
|
||||
{
|
||||
"name": "maatwebsite/excel",
|
||||
"version": "3.1.40",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/SpartnerNL/Laravel-Excel.git",
|
||||
"reference": "8a54972e3d616c74687c3cbff15765555761885c"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/SpartnerNL/Laravel-Excel/zipball/8a54972e3d616c74687c3cbff15765555761885c",
|
||||
"reference": "8a54972e3d616c74687c3cbff15765555761885c",
|
||||
"shasum": "",
|
||||
"mirrors": [
|
||||
{
|
||||
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
|
||||
"preferred": true
|
||||
}
|
||||
]
|
||||
},
|
||||
"require": {
|
||||
"ext-json": "*",
|
||||
"illuminate/support": "5.8.*|^6.0|^7.0|^8.0|^9.0",
|
||||
"php": "^7.0|^8.0",
|
||||
"phpoffice/phpspreadsheet": "^1.18"
|
||||
},
|
||||
"require-dev": {
|
||||
"orchestra/testbench": "^6.0|^7.0",
|
||||
"predis/predis": "^1.1"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"laravel": {
|
||||
"providers": [
|
||||
"Maatwebsite\\Excel\\ExcelServiceProvider"
|
||||
],
|
||||
"aliases": {
|
||||
"Excel": "Maatwebsite\\Excel\\Facades\\Excel"
|
||||
}
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Maatwebsite\\Excel\\": "src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Patrick Brouwers",
|
||||
"email": "patrick@spartner.nl"
|
||||
}
|
||||
],
|
||||
"description": "Supercharged Excel exports and imports in Laravel",
|
||||
"keywords": [
|
||||
"PHPExcel",
|
||||
"batch",
|
||||
"csv",
|
||||
"excel",
|
||||
"export",
|
||||
"import",
|
||||
"laravel",
|
||||
"php",
|
||||
"phpspreadsheet"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/SpartnerNL/Laravel-Excel/issues",
|
||||
"source": "https://github.com/SpartnerNL/Laravel-Excel/tree/3.1.40"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://laravel-excel.com/commercial-support",
|
||||
"type": "custom"
|
||||
},
|
||||
{
|
||||
"url": "https://github.com/patrickbrouwers",
|
||||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2022-05-02T13:50:01+00:00"
|
||||
},
|
||||
{
|
||||
"name": "maennchen/zipstream-php",
|
||||
"version": "2.1.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/maennchen/ZipStream-PHP.git",
|
||||
"reference": "c4c5803cc1f93df3d2448478ef79394a5981cc58"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/maennchen/ZipStream-PHP/zipball/c4c5803cc1f93df3d2448478ef79394a5981cc58",
|
||||
"reference": "c4c5803cc1f93df3d2448478ef79394a5981cc58",
|
||||
"shasum": "",
|
||||
"mirrors": [
|
||||
{
|
||||
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
|
||||
"preferred": true
|
||||
}
|
||||
]
|
||||
},
|
||||
"require": {
|
||||
"myclabs/php-enum": "^1.5",
|
||||
"php": ">= 7.1",
|
||||
"psr/http-message": "^1.0",
|
||||
"symfony/polyfill-mbstring": "^1.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"ext-zip": "*",
|
||||
"guzzlehttp/guzzle": ">= 6.3",
|
||||
"mikey179/vfsstream": "^1.6",
|
||||
"phpunit/phpunit": ">= 7.5"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"ZipStream\\": "src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Paul Duncan",
|
||||
"email": "pabs@pablotron.org"
|
||||
},
|
||||
{
|
||||
"name": "Jonatan Männchen",
|
||||
"email": "jonatan@maennchen.ch"
|
||||
},
|
||||
{
|
||||
"name": "Jesse Donat",
|
||||
"email": "donatj@gmail.com"
|
||||
},
|
||||
{
|
||||
"name": "András Kolesár",
|
||||
"email": "kolesar@kolesar.hu"
|
||||
}
|
||||
],
|
||||
"description": "ZipStream is a library for dynamically streaming dynamic zip files from PHP without writing to the disk at all on the server.",
|
||||
"keywords": [
|
||||
"stream",
|
||||
"zip"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/maennchen/ZipStream-PHP/issues",
|
||||
"source": "https://github.com/maennchen/ZipStream-PHP/tree/master"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://opencollective.com/zipstream",
|
||||
"type": "open_collective"
|
||||
}
|
||||
],
|
||||
"time": "2020-05-30T13:11:16+00:00"
|
||||
},
|
||||
{
|
||||
"name": "markbaker/complex",
|
||||
"version": "3.0.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/MarkBaker/PHPComplex.git",
|
||||
"reference": "ab8bc271e404909db09ff2d5ffa1e538085c0f22"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/MarkBaker/PHPComplex/zipball/ab8bc271e404909db09ff2d5ffa1e538085c0f22",
|
||||
"reference": "ab8bc271e404909db09ff2d5ffa1e538085c0f22",
|
||||
"shasum": "",
|
||||
"mirrors": [
|
||||
{
|
||||
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
|
||||
"preferred": true
|
||||
}
|
||||
]
|
||||
},
|
||||
"require": {
|
||||
"php": "^7.2 || ^8.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"dealerdirect/phpcodesniffer-composer-installer": "^0.7.0",
|
||||
"phpcompatibility/php-compatibility": "^9.0",
|
||||
"phpunit/phpunit": "^7.0 || ^8.0 || ^9.3",
|
||||
"squizlabs/php_codesniffer": "^3.4"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Complex\\": "classes/src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Mark Baker",
|
||||
"email": "mark@lange.demon.co.uk"
|
||||
}
|
||||
],
|
||||
"description": "PHP Class for working with complex numbers",
|
||||
"homepage": "https://github.com/MarkBaker/PHPComplex",
|
||||
"keywords": [
|
||||
"complex",
|
||||
"mathematics"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/MarkBaker/PHPComplex/issues",
|
||||
"source": "https://github.com/MarkBaker/PHPComplex/tree/3.0.1"
|
||||
},
|
||||
"time": "2021-06-29T15:32:53+00:00"
|
||||
},
|
||||
{
|
||||
"name": "markbaker/matrix",
|
||||
"version": "3.0.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/MarkBaker/PHPMatrix.git",
|
||||
"reference": "c66aefcafb4f6c269510e9ac46b82619a904c576"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/MarkBaker/PHPMatrix/zipball/c66aefcafb4f6c269510e9ac46b82619a904c576",
|
||||
"reference": "c66aefcafb4f6c269510e9ac46b82619a904c576",
|
||||
"shasum": "",
|
||||
"mirrors": [
|
||||
{
|
||||
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
|
||||
"preferred": true
|
||||
}
|
||||
]
|
||||
},
|
||||
"require": {
|
||||
"php": "^7.1 || ^8.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"dealerdirect/phpcodesniffer-composer-installer": "^0.7.0",
|
||||
"phpcompatibility/php-compatibility": "^9.0",
|
||||
"phpdocumentor/phpdocumentor": "2.*",
|
||||
"phploc/phploc": "^4.0",
|
||||
"phpmd/phpmd": "2.*",
|
||||
"phpunit/phpunit": "^7.0 || ^8.0 || ^9.3",
|
||||
"sebastian/phpcpd": "^4.0",
|
||||
"squizlabs/php_codesniffer": "^3.4"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Matrix\\": "classes/src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Mark Baker",
|
||||
"email": "mark@demon-angel.eu"
|
||||
}
|
||||
],
|
||||
"description": "PHP Class for working with matrices",
|
||||
"homepage": "https://github.com/MarkBaker/PHPMatrix",
|
||||
"keywords": [
|
||||
"mathematics",
|
||||
"matrix",
|
||||
"vector"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/MarkBaker/PHPMatrix/issues",
|
||||
"source": "https://github.com/MarkBaker/PHPMatrix/tree/3.0.0"
|
||||
},
|
||||
"time": "2021-07-01T19:01:15+00:00"
|
||||
},
|
||||
{
|
||||
"name": "monolog/monolog",
|
||||
"version": "2.7.0",
|
||||
@ -2347,6 +2684,72 @@
|
||||
],
|
||||
"time": "2022-06-09T08:59:12+00:00"
|
||||
},
|
||||
{
|
||||
"name": "myclabs/php-enum",
|
||||
"version": "1.8.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/myclabs/php-enum.git",
|
||||
"reference": "b942d263c641ddb5190929ff840c68f78713e937"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/myclabs/php-enum/zipball/b942d263c641ddb5190929ff840c68f78713e937",
|
||||
"reference": "b942d263c641ddb5190929ff840c68f78713e937",
|
||||
"shasum": "",
|
||||
"mirrors": [
|
||||
{
|
||||
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
|
||||
"preferred": true
|
||||
}
|
||||
]
|
||||
},
|
||||
"require": {
|
||||
"ext-json": "*",
|
||||
"php": "^7.3 || ^8.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^9.5",
|
||||
"squizlabs/php_codesniffer": "1.*",
|
||||
"vimeo/psalm": "^4.6.2"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"MyCLabs\\Enum\\": "src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "PHP Enum contributors",
|
||||
"homepage": "https://github.com/myclabs/php-enum/graphs/contributors"
|
||||
}
|
||||
],
|
||||
"description": "PHP Enum implementation",
|
||||
"homepage": "http://github.com/myclabs/php-enum",
|
||||
"keywords": [
|
||||
"enum"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/myclabs/php-enum/issues",
|
||||
"source": "https://github.com/myclabs/php-enum/tree/1.8.3"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://github.com/mnapoli",
|
||||
"type": "github"
|
||||
},
|
||||
{
|
||||
"url": "https://tidelift.com/funding/github/packagist/myclabs/php-enum",
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2021-07-05T08:18:36+00:00"
|
||||
},
|
||||
{
|
||||
"name": "nesbot/carbon",
|
||||
"version": "2.59.1",
|
||||
@ -2860,6 +3263,116 @@
|
||||
},
|
||||
"time": "2015-12-19T14:08:53+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpoffice/phpspreadsheet",
|
||||
"version": "1.24.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/PHPOffice/PhpSpreadsheet.git",
|
||||
"reference": "ebe8745c92a7cac4514d040758393b5399633b83"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/PHPOffice/PhpSpreadsheet/zipball/ebe8745c92a7cac4514d040758393b5399633b83",
|
||||
"reference": "ebe8745c92a7cac4514d040758393b5399633b83",
|
||||
"shasum": "",
|
||||
"mirrors": [
|
||||
{
|
||||
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
|
||||
"preferred": true
|
||||
}
|
||||
]
|
||||
},
|
||||
"require": {
|
||||
"ext-ctype": "*",
|
||||
"ext-dom": "*",
|
||||
"ext-fileinfo": "*",
|
||||
"ext-gd": "*",
|
||||
"ext-iconv": "*",
|
||||
"ext-libxml": "*",
|
||||
"ext-mbstring": "*",
|
||||
"ext-simplexml": "*",
|
||||
"ext-xml": "*",
|
||||
"ext-xmlreader": "*",
|
||||
"ext-xmlwriter": "*",
|
||||
"ext-zip": "*",
|
||||
"ext-zlib": "*",
|
||||
"ezyang/htmlpurifier": "^4.13",
|
||||
"maennchen/zipstream-php": "^2.1",
|
||||
"markbaker/complex": "^3.0",
|
||||
"markbaker/matrix": "^3.0",
|
||||
"php": "^7.3 || ^8.0",
|
||||
"psr/http-client": "^1.0",
|
||||
"psr/http-factory": "^1.0",
|
||||
"psr/simple-cache": "^1.0 || ^2.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"dealerdirect/phpcodesniffer-composer-installer": "dev-master",
|
||||
"dompdf/dompdf": "^1.0 || ^2.0",
|
||||
"friendsofphp/php-cs-fixer": "^3.2",
|
||||
"jpgraph/jpgraph": "^4.0",
|
||||
"mpdf/mpdf": "8.1.1",
|
||||
"phpcompatibility/php-compatibility": "^9.3",
|
||||
"phpstan/phpstan": "^1.1",
|
||||
"phpstan/phpstan-phpunit": "^1.0",
|
||||
"phpunit/phpunit": "^8.5 || ^9.0",
|
||||
"squizlabs/php_codesniffer": "^3.7",
|
||||
"tecnickcom/tcpdf": "^6.4"
|
||||
},
|
||||
"suggest": {
|
||||
"dompdf/dompdf": "Option for rendering PDF with PDF Writer (doesn't yet support PHP8)",
|
||||
"jpgraph/jpgraph": "Option for rendering charts, or including charts with PDF or HTML Writers",
|
||||
"mpdf/mpdf": "Option for rendering PDF with PDF Writer",
|
||||
"tecnickcom/tcpdf": "Option for rendering PDF with PDF Writer (doesn't yet support PHP8)"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"PhpOffice\\PhpSpreadsheet\\": "src/PhpSpreadsheet"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Maarten Balliauw",
|
||||
"homepage": "https://blog.maartenballiauw.be"
|
||||
},
|
||||
{
|
||||
"name": "Mark Baker",
|
||||
"homepage": "https://markbakeruk.net"
|
||||
},
|
||||
{
|
||||
"name": "Franck Lefevre",
|
||||
"homepage": "https://rootslabs.net"
|
||||
},
|
||||
{
|
||||
"name": "Erik Tilt"
|
||||
},
|
||||
{
|
||||
"name": "Adrien Crivelli"
|
||||
}
|
||||
],
|
||||
"description": "PHPSpreadsheet - Read, Create and Write Spreadsheet documents in PHP - Spreadsheet engine",
|
||||
"homepage": "https://github.com/PHPOffice/PhpSpreadsheet",
|
||||
"keywords": [
|
||||
"OpenXML",
|
||||
"excel",
|
||||
"gnumeric",
|
||||
"ods",
|
||||
"php",
|
||||
"spreadsheet",
|
||||
"xls",
|
||||
"xlsx"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/PHPOffice/PhpSpreadsheet/issues",
|
||||
"source": "https://github.com/PHPOffice/PhpSpreadsheet/tree/1.24.0"
|
||||
},
|
||||
"time": "2022-07-09T13:49:09+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpoption/phpoption",
|
||||
"version": "1.8.1",
|
||||
|
@ -165,6 +165,7 @@ return [
|
||||
/*
|
||||
* Package Service Providers...
|
||||
*/
|
||||
Maatwebsite\Excel\ExcelServiceProvider::class,
|
||||
|
||||
/*
|
||||
* Application Service Providers...
|
||||
@ -229,6 +230,7 @@ return [
|
||||
'URL' => Illuminate\Support\Facades\URL::class,
|
||||
'Validator' => Illuminate\Support\Facades\Validator::class,
|
||||
'View' => Illuminate\Support\Facades\View::class,
|
||||
'Excel' => Maatwebsite\Excel\Facades\Excel::class,
|
||||
|
||||
],
|
||||
|
||||
|
@ -16,7 +16,7 @@ use Illuminate\Support\Facades\Route;
|
||||
//Route::post('login',[\App\Http\Controllers\LoginController::class,'login']);
|
||||
Route::get('get-nonce',[\App\Http\Controllers\MeteMaskLoginController::class,'getNonce']);
|
||||
Route::post('metamask-login',[\App\Http\Controllers\MeteMaskLoginController::class,'mateMaskLogin']);
|
||||
|
||||
//Route::get('home',[\App\Http\Controllers\IndexController::class,'index']);
|
||||
Route::middleware('auth:api')->group(function () {
|
||||
Route::get('logout',[\App\Http\Controllers\MeteMaskLoginController::class,'logout']);
|
||||
Route::get('home',[\App\Http\Controllers\IndexController::class,'index']);
|
||||
@ -24,6 +24,10 @@ Route::middleware('auth:api')->group(function () {
|
||||
|
||||
|
||||
Route::middleware('check.node')->group(function () {
|
||||
Route::get('nft',[\App\Http\Controllers\NftController::class,'index']);
|
||||
Route::get('nft/show',[\App\Http\Controllers\NftController::class,'show']);
|
||||
Route::get('mint',[\App\Http\Controllers\MintController::class,'index']);
|
||||
Route::post('exports',[\App\Http\Controllers\IndexController::class,'exports']);
|
||||
Route::Resource('user',\App\Http\Controllers\UserController::class);
|
||||
});
|
||||
});
|
||||
|
@ -16,4 +16,4 @@ use Illuminate\Support\Facades\Route;
|
||||
Route::get('/', function () {
|
||||
return view('welcome');
|
||||
});
|
||||
Route::get('/a', [\App\Http\Controllers\IndexController::class,'index']);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user