Conditions | 1 |
Paths | 1 |
Total Lines | 10 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php namespace Anomaly\UsersModule\User; |
||
56 | public function linkify($text) |
||
57 | { |
||
58 | $url = str_replace( |
||
59 | '__username__', |
||
60 | '$2', |
||
61 | route('anomaly.module.users::users.view', ['username' => '__username__']) |
||
62 | ); |
||
63 | |||
64 | return preg_replace('/(^|[^a-z0-9_])@([a-z0-9_]+)/i', '$1<a href="' . $url . '">@$2</a>', $text); |
||
65 | } |
||
66 | } |
||
67 |