This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| namespace App\Traits; | |
| use Illuminate\Database\Eloquent\Model; | |
| trait HasPivotTrait | |
| { | |
| /** | |
| * 检查多对多关系是否存在. | |
| * |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| namespace App\Traits; | |
| use Illuminate\Support\Str; | |
| trait HasUuid | |
| { | |
| /** | |
| * Get the route key for the model. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| function is_weixin() { | |
| if ( strpos($_SERVER['HTTP_USER_AGENT'], 'MicroMessenger') !== false ) { | |
| return true; | |
| } | |
| return false; | |
| } |
NewerOlder