1234567891011121314151617181920212223242526 |
- <?php
- /**
- * Created by PhpStorm.
- * User: Administrator
- * Date: 2019/6/11
- * Time: 17:50
- */
- namespace App\Traits;
- use Tymon\JWTAuth\Facades\JWTAuth;
- trait PostTrait
- {
- public function getPostType($id) {
- try {
- $url = config("customer.manage_service_url").'/community/post/getType';
- $array = [
- 'json' => ['id' => $id], 'query' => [], 'http_errors' => false,'headers'=>['Authorization'=>"Bearer ".JWTAuth::getToken()]
- ];
- return http($url,$array, 'get');
- } catch (\Exception $e) {
- return [];
- }
- }
- }
|