123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- <?php
- namespace App\Repositories;
- use App\Models\Behavior;
- use Illuminate\Support\Facades\Log;
- class BehaviorRepositories
- {
- public function __construct()
- {
- }
-
- 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 [];
- }
-
- public function getAllBehavior()
- {
- return Behavior::pluck('virus_behavior_id', 'behavior_identification');
- }
- }
|