Skip to content

Latest commit

 

History

History
41 lines (33 loc) · 785 Bytes

File metadata and controls

41 lines (33 loc) · 785 Bytes

ThinkPHP Extension

ThinkPHP extension.

Component List:

  • Log Driver for Database

Log Driver for Database

Usage Steps:

  1. New a migrate.
  2. New a model (optional).

New a migrate:

class CreateLogTable extends \McDanci\ThinkPHP\database\migrates\CreateLogTable
{
}

New a model:

namespace app\common\model;

class Log extends \McDanci\ThinkPHP\app\common\model\Log
{}

Call:

use think\Log;

Log::init(['type' => '\McDanci\ThinkPHP\Driver\Log\DB']);
Log::record('String', Log::LOG);
Log::record(['String too'], Log::LOG);
Log::record(['String with extra', 'Extra information'], Log::LOG);

Note

Front-end web resources for ThinkPHP is recommended to be located in the path of ./public/static according to the root of project.