承接 irpcpro/testcrud 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

irpcpro/testcrud

Composer 安装命令:

composer create-project irpcpro/testcrud

包简介

A project to management Products and Orders

关键字:

README 文档

README

Version: 1.0.1

A project for managing Products & Orders with JWT authentication

Latest Stable Version Total Downloads Latest Unstable Version License PHP Version Require

+ Installation

Install this project via Composer:

composer create-project irpcpro/testcrud

+ Requirements

  • PHP: ^8.1
  • mongodb/laravel-mongodb: ^4.3
  • tymon/jwt-auth: ^2.1
  • Redis Driver (windows): v4.2.1
  • MongoDB (windows): 7.2.5

+ MongoDB Installation & Configuration

installing MongoDB

  • first you need to install the MongoDB 7.2.5 for windows.
  • after installing, you have to insert your DB connection to the .env file. to connect the project to the database.

Download MongoDB Extension .dll file

  • next step, you have to install the Ext of the MongoDB for PHP and enable it through the php.ini file.
  • for downloading, go to the packages PHP official website, and base on your windows, download the version of the .dll which is compatible with your windows and the PHP version which is installed on your PC.
  • MongoDB PHP Package (https://pecl.php.net/package/mongodb)

Install the extension

  • 1- go to your PHP folders where you've installed. (for finding the path of the PHP file, execute this command on CommandPrompt: where php)
  • go to this path and copy the php_mongodb.dll
{drive}:\php\php-{version}\ext
  • next step, you have to add the extension name to php.ini file. go to this path and open the php.ini file with notepad:
{drive}:\php\php-{version}\
  • in the part of the Dynamic Extensions (you can search it) add this command and save the file and restart your PHP server
..
..
extension=mongodb
  • you can check in the terminal to see if it is installed. open your CommandPrompt and run this command :
> php -m | find "mongo"
  • the output should be mongodb
  • or just execute this code via PHP :
<?php echo phpinfo(); ?>

config Replica Set and run the database

  • first open the CommandPrompt as administrator and run this command to start the Replica Set
mongod --dbpath "C:\data\db" --logpath "C:\data\log\mongod.log" --replSet "rs0"
  • now, open another CommandPrompt as administrator and run this command to enter to the MongoDB environment
mongo
  • now you can initiate the Replica and see the status of this with these two commands:
> rs.initiate()

> rs.status()

Debugging

  • if you have a problem for running Replica Set and you face a problem like this :
> rs.initiate()
{
        "ok" : 0,
        "errmsg" : "This node was not started with the replSet option",
        "code" : 76,
        "codeName" : "NoReplicationEnabled"
}
  • it's because you're port of the MongoDB is reserved. and you have to stop the process which is run on the port of 27017

Killing the port

  • 1- Open the CommandPrompt as administrator.
  • 2- run this command: > netstat -aon | find "27017".
  • 3- then you see something like this :
TCP   127.0.0.1:27017   0.0.0.0:0   LISTENING   13936
  • 4- the 13936 is the PID that you have to kill it.
  • 5- next step, run this command to abort this process:
taskkill /pid {PID} /f

like :

taskkill /pid 13936 /f

+ Redis Installation & Configuration

Installing Redis

Install Redis PHP Extension

Install the extension

  • 1- go to your PHP folders where you've intsalled. (for finding the path of the PHP file, execute this command on CommandPrompt: where php)
  • go to this path and copy the php_redis.dll
{drive}:\php\php-{version}\ext
  • next step, you have to add the extension name to php.ini file. go to this path and open the php.ini file with notepad:
{drive}:\php\php-{version}\
  • in the part of the Dynamic Extensions (you can search it) add this command and save the file and restart your PHP server`
..
..
extension=redis
  • you can check in the terminal to see if it is installed. open your CommandPrompt and run this command :
  • php -m | find "redis"
  • the output should be redis
  • or just execute this code via PHP :
  • <?php echo phpinfo(); ?>

changing the cache driver

  • for chaning the Cache Driver of the project, if you don't have Redis Driver on your system, open the .env file and change the CACHE_DRIVER to file like this :
  • CACHE_DRIVER=file
  • also you can set it with Redis
  • CACHE_DRIVER=redis

+ Postman Collection & Environment

  • there are the Postman Collection and Environment for importing.
  • collections are available on DEVELOPMENT folder
  • Collection => DEVELOPMENT/CRUD.postman_collection.json
  • Environment => DEVELOPMENT/CRUD.postman_environment.json

irpcpro/testcrud 适用场景与选型建议

irpcpro/testcrud 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 9 次下载、GitHub Stars 达 0, 最近一次更新时间为 2024 年 06 月 01 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「test」 「testcrud」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 irpcpro/testcrud 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 irpcpro/testcrud 我们能提供哪些服务?
定制开发 / 二次开发

基于 irpcpro/testcrud 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 9
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 8
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-06-01