view.html 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342
  1. <!DOCTYPE html>
  2. <html lang="zh-CN">
  3. <head>
  4. <filter><meta charset="utf-8"><script src="../js/common.js"></script><script src="../js/jquery.min.js"></script></filter>
  5. <script class="include" system="" path="inc/" file="head">include()</script>
  6. </head>
  7. <body>
  8. <script class="include" system="" path="inc/" file="nav">include()</script>
  9. <div class="container">
  10. <div class="maze-box text-center">
  11. MazePHP 是新奇且积极的 PHP &amp; Framework 开发者工作型框架, 更多介绍 <a href="#">见这里</a>, 源代码 <i class="glyphicon glyphicon-circle-arrow-down"></i> <a href="https://github.com/summerblue/phphub" target="_blank">在此</a>.
  12. </div>
  13. <div class="col-md-8 maze-content">
  14. <div class="maze-panel">
  15. <div class="maze-panel-head">
  16. <div class="pull-right avatar">
  17. <a href="#">
  18. <img src="http://placehold.it/65X65" style="width:65px; height:65px;" class="img-thumbnail avatar">
  19. </a>
  20. </div>
  21. <div class="maze-panel-title">这是一个文章</div>
  22. <div class="maze-panel-info maze-display-inline">
  23. <a href="#">
  24. 栏目
  25. </a>
  26. <a href="#">
  27. 发布人
  28. </a>
  29. 于 <abbr title="2015-10-10 15:13:21" class="timeago">2天前</abbr>
  30. 35 阅读
  31. <span class="maze-panel-msg">
  32. 精华
  33. </span>
  34. <span class="maze-panel-msg">
  35. 置顶
  36. </span>
  37. </div>
  38. <div class="clearfix"></div>
  39. </div>
  40. <div class="maze-panel-body">
  41. <p>我想把默认的bcrypt(password)替换成md5(password+salt),在不更改vendor文件的情况下,只能自己添加一个ServiceProvider替换原来的,于是我自己写了一个AddSaltHasher,但是却发现在make方法中无法获取$salt,有什么办法可以获取这个值吗?</p>
  42. <pre><code>
  43. namespace App\Services;
  44. use RuntimeException;
  45. use Illuminate\Contracts\Hashing\Hasher as HasherContract;
  46. class AddSaltHasher implements HasherContract
  47. {
  48. public function make($value, array $options = [])
  49. {
  50. $hash = md5($value.$salt);//&lt;-无法获取数据库中存放的salt
  51. if ($hash === false) {
  52. throw new RuntimeException('addsalt hashing not supported.');
  53. }
  54. return $hash;
  55. }
  56. public function check($value, $hashedValue, array $options = [])
  57. {
  58. if (strlen($hashedValue) === 0) {
  59. return false;
  60. }
  61. $value = self::make($value);
  62. if($value!=$hashedValue){
  63. return false;
  64. }
  65. return true;
  66. }
  67. public function needsRehash($hashedValue, array $options = [])
  68. {
  69. return false;
  70. }
  71. }
  72. </code></pre>
  73. </div>
  74. <div class="maze-panel-foot">
  75. <div class="pull-left">
  76. 分享
  77. </div>
  78. <div class="pull-right">
  79. <a href="#">
  80. <i class="glyphicon glyphicon-eye-open"></i>
  81. <span>关注</span>
  82. </a>
  83. <a href="#">
  84. <i class="glyphicon glyphicon-bookmark"></i>
  85. <span>收藏</span>
  86. </a>
  87. </div>
  88. <div class="clearfix"></div>
  89. </div>
  90. </div>
  91. <div class="maze-panel">
  92. <div class="maze-panel-head">
  93. <h3 class="panel-title">评论回复:<b>38</b></h3>
  94. </div>
  95. <div class="maze-panel-comment">
  96. <ul class="list-group maze-panel-ul">
  97. <li class="media maze-panel-li">
  98. <div class="pull-left">
  99. <a href="#">
  100. <img class="media-object img-thumbnail avatar" alt="xxx" src="http://placehold.it/48X48" style="width:48px;height:48px;">
  101. </a>
  102. </div>
  103. <div class="infos">
  104. <div class="media-heading maze-panel-info">
  105. <a href="#" title="xxxx" class="remove-padding-left author">
  106. xxxx
  107. </a>
  108. <span> • </span>
  109. <abbr class="timeago" title="2015-10-07 18:43:14">7天前</abbr>
  110. <span> • </span>
  111. <a name="reply1" class="anchor" href="#reply1" aria-hidden="true">#1</a>
  112. <span class="operate pull-right">
  113. <a href="javascript:void(0);" data-url="https://phphub.org/replies/6945/vote" title="Vote Up" style="cursor:pointer;">
  114. <i class="glyphicon glyphicon-thumbs-up"></i>
  115. </a>
  116. <span> • </span>
  117. <a href="javascript:void(0)" onclick="replyOne('lx1036');" title="回复 xxxx">
  118. <i class="glyphicon glyphicon-pencil"></i>
  119. </a>
  120. </span>
  121. </div>
  122. <div class="media-body markdown-reply content-body">
  123. <p>MAC本地搭建MAMP环境:
  124. 在利用composer require illuminate/html安装html模块时可能会出现- danielstjules/stringy 1.10.0 requires ext-mbstring * -&gt; the requested PHP extension mbstring is missing from your system.说mbstring模块(或者其他模块)没有,应该是因为用了系统自带的php中没有mbstring模块,用php -m查看,而本想用MAMP的php5.5.10.解决办法:/Applications/MAMP/bin/php/php5.5.10/bin/php /Applications/MAMP/composer.phar require illuminate/html。。php和composer.phar全局路径指定出来就行。。</p>
  125. </div>
  126. </div>
  127. </li>
  128. <li class="media maze-panel-li">
  129. <div class="pull-left">
  130. <a href="#">
  131. <img class="media-object img-thumbnail avatar" alt="xxx" src="http://placehold.it/48X48" style="width:48px;height:48px;">
  132. </a>
  133. </div>
  134. <div class="infos">
  135. <div class="media-heading maze-panel-info">
  136. <a href="#" title="xxxx" class="remove-padding-left author">
  137. xxxx
  138. </a>
  139. <span> • </span>
  140. <abbr class="timeago" title="2015-10-07 18:43:14">7天前</abbr>
  141. <span> • </span>
  142. <a name="reply1" class="anchor" href="#reply1" aria-hidden="true">#1</a>
  143. <span class="operate pull-right">
  144. <a href="javascript:void(0);" data-url="https://phphub.org/replies/6945/vote" title="Vote Up" style="cursor:pointer;">
  145. <i class="glyphicon glyphicon-thumbs-up"></i>
  146. </a>
  147. <span> • </span>
  148. <a href="javascript:void(0)" onclick="replyOne('lx1036');" title="回复 xxxx">
  149. <i class="glyphicon glyphicon-pencil"></i>
  150. </a>
  151. </span>
  152. </div>
  153. <div class="media-body markdown-reply content-body">
  154. <p>MAC本地搭建MAMP环境:
  155. 在利用composer require illuminate/html安装html模块时可能会出现- danielstjules/stringy 1.10.0 requires ext-mbstring * -&gt; the requested PHP extension mbstring is missing from your system.说mbstring模块(或者其他模块)没有,应该是因为用了系统自带的php中没有mbstring模块,用php -m查看,而本想用MAMP的php5.5.10.解决办法:/Applications/MAMP/bin/php/php5.5.10/bin/php /Applications/MAMP/composer.phar require illuminate/html。。php和composer.phar全局路径指定出来就行。。</p>
  156. </div>
  157. </div>
  158. </li>
  159. </ul>
  160. </div>
  161. </div>
  162. <div class="reply-box form box-block">
  163. <form method="POST" action="#" accept-charset="UTF-8" id="reply-form"><input name="_token" type="hidden" value="tw2vfLD59DK5IUqH4IRq5BKPSTPDgV8I9cYIy1X8">
  164. <input type="hidden" name="topic_id" value="1325">
  165. <div class="form-group">
  166. <textarea class="form-control" rows="5" placeholder="请使用 Markdown 格式书写 ;-)" style="overflow: hidden; word-wrap: break-word; resize: horizontal; height: 104px;" id="reply_content" name="body" cols="50"></textarea>
  167. </div>
  168. <div class="form-group status-post-submit">
  169. <input class="btn btn-primary" id="reply-create-submit" type="submit" value="回复">
  170. <span class="help-inline" title="Or Command + Enter">Ctrl+Enter</span>
  171. </div>
  172. <div class="maze-box maze-preview-box"><p>test</p>
  173. </div>
  174. </form>
  175. </div>
  176. </div>
  177. <div class="col-md-4 maze-sidebar">
  178. <div class="maze-panel">
  179. <div class="maze-panel-head">
  180. <h3 class="panel-title">快捷操作</h3>
  181. </div>
  182. <div class="maze-panel-body text-center">
  183. <div class="btn-group">
  184. <a href="#" class="btn btn-success btn-lg">
  185. 发 布 新 帖
  186. </a>
  187. </div>
  188. </div>
  189. </div>
  190. <div class="maze-panel">
  191. <div class="maze-panel-head">
  192. <h3 class="panel-title">相关主题</h3>
  193. </div>
  194. <div class="maze-panel-body maze-panel-list">
  195. <ul class="list-unstyled">
  196. <li>
  197. <a href="#">
  198. 请问大家如何管理 Elixir 生成的文件?使用版本控制工具,还是发布时实时构建?
  199. </a>
  200. </li>
  201. <li>
  202. <a href="#">
  203. 请问大家如何管理 Elixir 生成的文件?使用版本控制工具,还是发布时实时构建?
  204. </a>
  205. </li>
  206. </ul>
  207. </div>
  208. </div>
  209. <div class="maze-panel">
  210. <div class="maze-panel-head">
  211. <h3 class="panel-title">小贴士</h3>
  212. </div>
  213. <div class="maze-panel-body">
  214. 使用 CoffeeScript 和 Sass 来写 JavaScript 和 CSS 提高开发效率
  215. </div>
  216. </div>
  217. <div class="maze-panel">
  218. <div class="maze-panel-head">
  219. <h3 class="panel-title">统计信息</h3>
  220. </div>
  221. <div class="maze-panel-body">
  222. <ul class="list">
  223. <li>
  224. 社区会员:1000
  225. </li>
  226. <li>
  227. 主题数:100
  228. </li>
  229. </ul>
  230. </div>
  231. </div>
  232. <div class="maze-panel">
  233. <div class="maze-panel-head">
  234. <h3 class="panel-title">友情链接</h3>
  235. </div>
  236. <div class="maze-panel-body text-center">
  237. <ul class="list-unstyled">
  238. <li>
  239. <a href="https://ruby-china.org" target="_blank" rel="nofollow" title="Ruby China">
  240. <img src="https://dn-phphub.qbox.me/assets/images/friends/ruby-china.png" style="width:150px; margin: 3px 0;">
  241. </li>
  242. </ul>
  243. </a>
  244. </div>
  245. </div>
  246. </div>
  247. </div> <!-- /container -->
  248. <div id="footer" class="footer">
  249. <div class="container small">
  250. <p class="pull-left">
  251. <i class="glyphicon glyphicon-tree-conifer"></i> Made With Love By The EST Group. <br>
  252. <i class="glyphicon glyphicon-tint"></i> Inspired by v2ex &amp; ruby-china.
  253. </p>
  254. <p class="pull-right">
  255. <a href="https://www.ucloud.cn/?utm_source=zanzhu&amp;utm_campaign=phphub&amp;utm_medium=display" target="_blank"><img src="https://dn-phphub.qbox.me/assets/images/ucloud.png" width="98" data-toggle="tooltip" data-placement="top" title="" data-original-title="本站服务器由 UCloud 赞助"></a>.
  256. </p>
  257. </div>
  258. </div>
  259. <script class="include" system="" path="inc/" file="script">include()</script>
  260. </body>
  261. </html>