123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342 |
- <!DOCTYPE html>
- <html lang="zh-CN">
- <head>
- <filter><meta charset="utf-8"><script src="../js/common.js"></script><script src="../js/jquery.min.js"></script></filter>
- <script class="include" system="" path="inc/" file="head">include()</script>
- </head>
- <body>
- <script class="include" system="" path="inc/" file="nav">include()</script>
- <div class="container">
-
- <div class="maze-box text-center">
- MazePHP 是新奇且积极的 PHP & Framework 开发者工作型框架, 更多介绍 <a href="#">见这里</a>, 源代码 <i class="glyphicon glyphicon-circle-arrow-down"></i> <a href="https://github.com/summerblue/phphub" target="_blank">在此</a>.
- </div>
-
- <div class="col-md-8 maze-content">
- <div class="maze-panel">
- <div class="maze-panel-head">
- <div class="pull-right avatar">
- <a href="#">
- <img src="http://placehold.it/65X65" style="width:65px; height:65px;" class="img-thumbnail avatar">
- </a>
- </div>
- <div class="maze-panel-title">这是一个文章</div>
- <div class="maze-panel-info maze-display-inline">
- <a href="#">
- 栏目
- </a>
- •
- <a href="#">
- 发布人
- </a>
- •
- 于 <abbr title="2015-10-10 15:13:21" class="timeago">2天前</abbr>
- •
- 35 阅读
-
- <span class="maze-panel-msg">
- 精华
- </span>
- <span class="maze-panel-msg">
- 置顶
- </span>
- </div>
-
- <div class="clearfix"></div>
- </div>
-
-
-
- <div class="maze-panel-body">
- <p>我想把默认的bcrypt(password)替换成md5(password+salt),在不更改vendor文件的情况下,只能自己添加一个ServiceProvider替换原来的,于是我自己写了一个AddSaltHasher,但是却发现在make方法中无法获取$salt,有什么办法可以获取这个值吗?</p>
- <pre><code>
-
- namespace App\Services;
- use RuntimeException;
- use Illuminate\Contracts\Hashing\Hasher as HasherContract;
- class AddSaltHasher implements HasherContract
- {
- public function make($value, array $options = [])
- {
- $hash = md5($value.$salt);//<-无法获取数据库中存放的salt
- if ($hash === false) {
- throw new RuntimeException('addsalt hashing not supported.');
- }
- return $hash;
- }
- public function check($value, $hashedValue, array $options = [])
- {
- if (strlen($hashedValue) === 0) {
- return false;
- }
- $value = self::make($value);
- if($value!=$hashedValue){
- return false;
- }
- return true;
- }
- public function needsRehash($hashedValue, array $options = [])
- {
- return false;
- }
- }
- </code></pre>
- </div>
-
- <div class="maze-panel-foot">
- <div class="pull-left">
- 分享
- </div>
- <div class="pull-right">
- <a href="#">
- <i class="glyphicon glyphicon-eye-open"></i>
- <span>关注</span>
- </a>
-
- <a href="#">
- <i class="glyphicon glyphicon-bookmark"></i>
- <span>收藏</span>
- </a>
- </div>
- <div class="clearfix"></div>
- </div>
- </div>
-
- <div class="maze-panel">
- <div class="maze-panel-head">
- <h3 class="panel-title">评论回复:<b>38</b></h3>
- </div>
-
- <div class="maze-panel-comment">
- <ul class="list-group maze-panel-ul">
- <li class="media maze-panel-li">
- <div class="pull-left">
- <a href="#">
- <img class="media-object img-thumbnail avatar" alt="xxx" src="http://placehold.it/48X48" style="width:48px;height:48px;">
- </a>
- </div>
- <div class="infos">
- <div class="media-heading maze-panel-info">
- <a href="#" title="xxxx" class="remove-padding-left author">
- xxxx
- </a>
- <span> • </span>
- <abbr class="timeago" title="2015-10-07 18:43:14">7天前</abbr>
- <span> • </span>
- <a name="reply1" class="anchor" href="#reply1" aria-hidden="true">#1</a>
- <span class="operate pull-right">
- <a href="javascript:void(0);" data-url="https://phphub.org/replies/6945/vote" title="Vote Up" style="cursor:pointer;">
- <i class="glyphicon glyphicon-thumbs-up"></i>
- </a>
- <span> • </span>
- <a href="javascript:void(0)" onclick="replyOne('lx1036');" title="回复 xxxx">
- <i class="glyphicon glyphicon-pencil"></i>
- </a>
- </span>
- </div>
- <div class="media-body markdown-reply content-body">
- <p>MAC本地搭建MAMP环境:
- 在利用composer require illuminate/html安装html模块时可能会出现- danielstjules/stringy 1.10.0 requires ext-mbstring * -> 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>
- </div>
- </div>
- </li>
-
- <li class="media maze-panel-li">
- <div class="pull-left">
- <a href="#">
- <img class="media-object img-thumbnail avatar" alt="xxx" src="http://placehold.it/48X48" style="width:48px;height:48px;">
- </a>
- </div>
- <div class="infos">
- <div class="media-heading maze-panel-info">
- <a href="#" title="xxxx" class="remove-padding-left author">
- xxxx
- </a>
- <span> • </span>
- <abbr class="timeago" title="2015-10-07 18:43:14">7天前</abbr>
- <span> • </span>
- <a name="reply1" class="anchor" href="#reply1" aria-hidden="true">#1</a>
- <span class="operate pull-right">
- <a href="javascript:void(0);" data-url="https://phphub.org/replies/6945/vote" title="Vote Up" style="cursor:pointer;">
- <i class="glyphicon glyphicon-thumbs-up"></i>
- </a>
- <span> • </span>
- <a href="javascript:void(0)" onclick="replyOne('lx1036');" title="回复 xxxx">
- <i class="glyphicon glyphicon-pencil"></i>
- </a>
- </span>
- </div>
- <div class="media-body markdown-reply content-body">
- <p>MAC本地搭建MAMP环境:
- 在利用composer require illuminate/html安装html模块时可能会出现- danielstjules/stringy 1.10.0 requires ext-mbstring * -> 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>
- </div>
- </div>
- </li>
-
- </ul>
- </div>
- </div>
-
-
- <div class="reply-box form box-block">
-
- <form method="POST" action="#" accept-charset="UTF-8" id="reply-form"><input name="_token" type="hidden" value="tw2vfLD59DK5IUqH4IRq5BKPSTPDgV8I9cYIy1X8">
- <input type="hidden" name="topic_id" value="1325">
- <div class="form-group">
- <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>
- </div>
- <div class="form-group status-post-submit">
- <input class="btn btn-primary" id="reply-create-submit" type="submit" value="回复">
-
- <span class="help-inline" title="Or Command + Enter">Ctrl+Enter</span>
- </div>
- <div class="maze-box maze-preview-box"><p>test</p>
- </div>
- </form>
- </div>
-
- </div>
-
- <div class="col-md-4 maze-sidebar">
- <div class="maze-panel">
- <div class="maze-panel-head">
- <h3 class="panel-title">快捷操作</h3>
- </div>
- <div class="maze-panel-body text-center">
- <div class="btn-group">
- <a href="#" class="btn btn-success btn-lg">
- 发 布 新 帖
- </a>
- </div>
- </div>
- </div>
- <div class="maze-panel">
- <div class="maze-panel-head">
- <h3 class="panel-title">相关主题</h3>
- </div>
- <div class="maze-panel-body maze-panel-list">
- <ul class="list-unstyled">
- <li>
- <a href="#">
- 请问大家如何管理 Elixir 生成的文件?使用版本控制工具,还是发布时实时构建?
- </a>
- </li>
-
- <li>
- <a href="#">
- 请问大家如何管理 Elixir 生成的文件?使用版本控制工具,还是发布时实时构建?
- </a>
- </li>
-
- </ul>
- </div>
- </div>
-
- <div class="maze-panel">
- <div class="maze-panel-head">
- <h3 class="panel-title">小贴士</h3>
- </div>
- <div class="maze-panel-body">
- 使用 CoffeeScript 和 Sass 来写 JavaScript 和 CSS 提高开发效率
- </div>
- </div>
-
- <div class="maze-panel">
- <div class="maze-panel-head">
- <h3 class="panel-title">统计信息</h3>
- </div>
- <div class="maze-panel-body">
- <ul class="list">
- <li>
- 社区会员:1000
- </li>
-
- <li>
- 主题数:100
- </li>
-
- </ul>
- </div>
- </div>
-
- <div class="maze-panel">
- <div class="maze-panel-head">
- <h3 class="panel-title">友情链接</h3>
- </div>
- <div class="maze-panel-body text-center">
- <ul class="list-unstyled">
- <li>
- <a href="https://ruby-china.org" target="_blank" rel="nofollow" title="Ruby China">
- <img src="https://dn-phphub.qbox.me/assets/images/friends/ruby-china.png" style="width:150px; margin: 3px 0;">
- </li>
- </ul>
-
- </a>
- </div>
- </div>
- </div>
- </div> <!-- /container -->
-
- <div id="footer" class="footer">
- <div class="container small">
- <p class="pull-left">
- <i class="glyphicon glyphicon-tree-conifer"></i> Made With Love By The EST Group. <br>
- <i class="glyphicon glyphicon-tint"></i> Inspired by v2ex & ruby-china.
- </p>
- <p class="pull-right">
- <a href="https://www.ucloud.cn/?utm_source=zanzhu&utm_campaign=phphub&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>.
- </p>
- </div>
- </div>
- <script class="include" system="" path="inc/" file="script">include()</script>
-
- </body>
- </html>
|