Coder Social home page Coder Social logo

Some libary for dev in laravel 5.*

Installation

composer require sawyes/sawyes

Basic Usage

1.LoggerHelper

  • import namespace in your program
use Sawyes\Log\LoggerHelper;
  • usage
// write('message', array(), 'log-file-name');
LoggerHelper::write('Login info:', ['username'=>'Admin', 'password'], 'logger');

then you can find log file

path/to/project/storage/log/logger-2017-10-12.log

[2017-10-12 14:22:54] local.DEBUG: file: web.php line: 16 message: Login info: {"username":"Admin","0":"password"}  

2.Log SQL Service Provider

  • add provider services in config/app.php

laravel >=5.5 skip this step .

'providers' => [
    ...
    Sawyes\LogSqlServiceProvider::class,
    ...
    ]
  • publishes config to enable log

<= 5.4

php artisan vendor:publish --tag='Sawyes\LogSqlServiceProvider'

5.4 check package php artisan package:discover , then run below command choice Sawyes\LogSqlServiceProvider

php artisan vendor:publish
  • configure env file write APP_DEBUG_LOG=true in your .env file

now your can find log file in your storage path!

3. schedule run lists

  • add provider services in config/app.php

laravel >=5.5 skip this step .

'providers' => [
    ...
    Sawyes\SchedulelistServiceProvider::class,
    ...
    ]
  • show schedule list
php artisan schedule:detail
  • publishes config to enable log

you can skip thie step, it's save schedule:detail in database using config file

<= 5.4

php artisan vendor:publish --tag='Sawyes\SchedulelistServiceProvider'

5.4 check package php artisan package:discover , then run below command choice Sawyes\LogSqlServiceProvider

php artisan vendor:publish

you need to determine connection name, schedule list table, schedule detail list table

run below command save schedule list when end of day.

schedule:detail --database=true --start=tomorrow

happy hacking!

sawyes's Projects

acme.sh icon acme.sh

A pure Unix shell script implementing ACME client protocol

automa icon automa

A chrome extension for automating your browser by connecting blocks

chatglm-6b icon chatglm-6b

ChatGLM-6B:开源双语对话语言模型 | An Open Bilingual Dialogue Language Model

docker-drawio icon docker-drawio

Dockerized draw.io based on tomcat:9-jre11 & tomcat:9-jre8-alpine official image.

gzm-design icon gzm-design

🚀🚀🚀一款漂亮易用的在线设计器,支持PSD导入、PSD解析,可用于海报设计器、广告设计器、logo设计器、AI创作图片合成器等。常用于生成二维码海报,图片海报,二维码推广海报,图片处理,名片设计,电商产品图,节假日海报等。http://gzm-design.guozimi.cn/#/editor

invoice icon invoice

增值税发票OCR识别,使用flask微服务架构,识别type:增值税电子普通发票,增值税普通发票,增值税专用发票;识别字段为:发票代码、发票号码、开票日期、校验码、税后金额等

laraadmin icon laraadmin

test http://laravel-admin.org/docs/#/zh/quick-start

laravel-attributes icon laravel-attributes

Rinvex Attributable is a robust, intelligent, and integrated Entity-Attribute-Value model (EAV) implementation for Laravel Eloquent, with powerful underlying for managing entity attributes implicitly as relations with ease. It utilizes the power of Laravel Eloquent, with smooth and seamless integration.

learn-hacking icon learn-hacking

开始学习Kali Linux 各种破解教程 渗透测试 逆向工程 HackThisSite挑战问题解答

magento-chinese-edition icon magento-chinese-edition

Magento Integrated with Payment Gateways,Shipping Carriers,Language Package and Shopping Experience in Chinese way

mcg-helper icon mcg-helper

自研流程设计,可视化界面与人性化设计,丰富的拖拽控件,基于流程图实现自动化

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.