12345678910111213141516171819202122232425262728293031323334353637 |
- <?php
- /**
- * Created by PhpStorm.
- * User: edz
- * Date: 2019-06-10
- * Time: 17:53
- */
- namespace App\Repositories;
- use App\Models\Behavior;
- use Illuminate\Support\Facades\Log;
- class BehaviorRepositories
- {
- public function __construct()
- {
- }
- /**
- * 获取行为绑定规则
- * @param $info
- * @return array
- */
- public function getBehavior($identify)
- {
- $info = Behavior::where([['is_open', '=', 1], ['behavior_identification', '=', $identify]])->first();
- Log::debug('behavior:' . json_encode($info));
- if ($info) {
- return $info;
- }
- return [];
- }
- }
|