您正在查看: 菜菜子 发布的文章

ubuntu自动化安装php文件

ubuntu_automatic_install_php.py ```python # coding=utf-8 import os import sys import platform print(sys.version) if 'Ubuntu' not in platform.version(): print('只能在ubuntu系统中运行') ex...

laravel 操作redis

参考:https://www.cnblogs.com/love-snow/articles/7778532.html ```php public function test(Request $request) { // $redis = app('redis.connection'); // //普通 set / get 操作;se...

laravel-admin静态资源加速

在Admin目录下的bootstrap.php中加入以下代码: ```php \Encore\Admin\Admin::$baseCss = [ 'https://cdn.bootcss.com/twitter-bootstrap/3.3.5/css/bootstrap.min.css', 'https://cdn.bootcss.com/font-awesome/4...

laravel-admin1.6版本表单tag bug修复方法

laravel-admin1.6.7目前使用的select2版本的不支持中文。。。。。。 所以自己写了个form组件,使用[bootstrap-tagsinput](https://bootstrap-tagsinput.github.io/bootstrap-tagsinput/examples/) ```php

laravel根据另外一列的值赋予grid某一列editable()

```php

laravel-admin数据来源非数据表信息

一般情况下laravel-admin数据表显示的都是某个数据表模型里面的数据,但是现在有个操作就是记录平台的资金流水情况,我没有存一个表,数据来源于两个部分,一个是用户已付款订单(入),另外一个是商家的提现订单(出) 参看: 数据来自外部API https://laravel-admin.org/docs/zh/model-grid-data ```php

laravel判定多对多关系是否存在

laravel判定多对多关系是否存在 $project->users()->where('id', $user->id)->exists(); https://laravel-china.org/topics/13590/does-laravel-orm-have-the-method-of-self-existence-of-many-to-many-association-jud...

laravel+deploy+前端vue打包文件部署(vue分享,去除#号)

90使用场景: 前端使用vue,后端使用laravel5.5,部署方式使用deploy,因为前端需要使用微信分享,传到后台的url只能取#号之前的,前端需要使用history模式 ### 后端需要做的事 * deploy.php ```php add('shared_dirs', ['/public/wap']); ``` 前端如果打包更新后,前端可以自己将打包后的st...

laravel ftp(windows 系统下出现缓存目录无法写入)

[2018-10-29 00:06:09] production.ERROR: ftp_rawlist(): Unable to create temporary file. Check permissions in temporary files directory. 解决办法: 打开php.ini文件 查找sys_temp_dir变量,将该变量取消注释,改为 sys_te...

mac filezilla 无法写入.config/filezilla.xml

filezilla官网下载后出现如下报错 ![图片.png](https://cos.cc430.cn/2018/10/28/1540700961.png) 出现原因:.config目录权限不足 解决办法: * 用户根目录执行 > sudo chmod -R 777 .config ![](https://cos.cc430.cn/2018/10/28/15407...

laravel添加数据到model数据中

使用场景:一个用户注册之后可以申请成为不同的身份,如个人和企业,后续的操作也不太一致 Partner模型 ```php protected $appends = ['identity'];//很重要 //获得当前用户的身份 self::$IdentityMap public function getIdentityAttribute() { ...

laravel-admin视图重写(审核模块)

路由 routes.php ```php $router->get('users/{id}/authenticate', 'UserController@authentication_info'); $router->post('users/authenticate', 'UserController@authentication'); ``` 用户控制器 ...

ubuntu16.04系统下Supervisor的安装

# 安装 > sudo apt-get -y install supervisor # 进入supervisor目录 > cd /etc/supervisor/conf.d # 创建新的配置文件 > sudo vim xxx.conf ```c++ [program:xxx-worker-queue] process_name=%(program_name)s_%(p...

新购ubuntu16.04服务器需要使用的命令汇总

## 换阿里源 > vim /etc/apt/sources.list 将以下代码加入 ``` deb http://mirrors.cloud.aliyuncs.com/ubuntu/ xenial main restricted universe multiverse deb http://mirrors.cloud.aliyuncs.com/ubuntu/ xenial-...

解决nginx无法重启的问题

服务器配新项目的时候发现重启Nginx重启后不生效 简单描述一下: * 1.执行: > sudo service nginx restart 后报错 按照提示执行命令: ![700255832893246946.png](https://cos.cc430.cn/2018/09/19/1537367428.png) ![398926124072382555.png](h...
//