Skip to content

Commit 961632b

Browse files
author
fengr06
committed
change to full url
1 parent dc19369 commit 961632b

8 files changed

Lines changed: 39 additions & 37 deletions

File tree

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,13 @@
2929
* php artisan migrate (建表)
3030
* php artisan db:seed --class=UsersTableSeeder (填充初始密码account:admin@qq.com, pass:admin)
3131
* php artisan storage:link
32+
* 配置主题支持
33+
```
34+
cd blog
35+
vim /blog/vendor/laravel/framework/src/Illuminate/Foundation/Auth/AuthenticatesUsers.php
36+
搜索auth.login为 env('BLOG_THEME').'.auth.login';
3237
38+
```
3339
至此,blog已经可以访问了,后台地址为http://你的域名/mrcoderadmin/,不过搜索功能还不能使用
3440

3541

resources/views/next/articles/show.blade.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
</span>
4040
<span class="post-meta-item-text">分类于</span>
4141
<span itemprop="about" itemscope="" itemtype="">
42-
<a href="/cates/{{$article->cate_id}}" itemprop="url" rel="index">
42+
<a href="{{route('cates')}}/{{$article->cate_id}}" itemprop="url" rel="index">
4343
<span itemprop="name">{{$article->cates}}</span>
4444
</a>
4545
</span>
@@ -86,7 +86,7 @@
8686
<div class="my_post_copyright">
8787
<p><span>本文标题:</span><a href="{{ route('articles.show', $article->id) }}">客户端服务端消息推送模块设计</a>
8888
</p>
89-
<p><span>文章作者:</span><a href="/" title="访问 Mrcoder 的个人博客">Mrcoder</a></p>
89+
<p><span>文章作者:</span><a href="{{route('home')}}" title="访问 Mrcoder 的个人博客">Mrcoder</a></p>
9090
<p><span>发布时间:</span>{{$article->created_at_date}}</p>
9191
<p><span>最后更新:</span>{{$article->updated_at_date}}</p>
9292
<p><span>原始链接:</span>
@@ -114,7 +114,7 @@ class="fa fa-paw"></i>感谢您的阅读-------------
114114
<div class="post-tags">
115115
@if($tags)
116116
@foreach($tags as $tag)
117-
<a href="/tags/{{$tag->id}}/" rel="tag"><i class="fa fa-tag"></i> {{$tag->name}}</a>
117+
<a href="{{route('tags')}}/{{$tag->id}}/" rel="tag"><i class="fa fa-tag"></i> {{$tag->name}}</a>
118118
@endforeach
119119
@endif
120120
</div>
@@ -335,19 +335,19 @@ class="vat"
335335
</div>
336336
<nav class="site-state motion-element">
337337
<div class="site-state-item site-state-posts">
338-
<a href="/">
338+
<a href="{{route('home')}}">
339339
<span class="site-state-item-count">{{$articleCount}}</span>
340340
<span class="site-state-item-name">日志</span>
341341
</a>
342342
</div>
343343
<div class="site-state-item site-state-categories">
344-
<a href="/cates">
344+
<a href="{{route('cates')}}">
345345
<span class="site-state-item-count">{{$catesCount}}</span>
346346
<span class="site-state-item-name">分类</span>
347347
</a>
348348
</div>
349349
<div class="site-state-item site-state-tags">
350-
<a href="/tags">
350+
<a href="{{route('tags')}}">
351351
<span class="site-state-item-count">{{$tagsCount}}</span>
352352
<span class="site-state-item-name">标签</span>
353353
</a>
@@ -365,7 +365,7 @@ class="vat"
365365
<i class="fa fa-fw fa-github"></i>GitHub</a>
366366
</span>
367367
<span class="links-of-author-item">
368-
<a href="http://www.wrsee.com" target="_blank" title="Wrsee">
368+
<a href="{{route('home')}}" target="_blank" title="Wrsee">
369369
<i class="fa fa-fw fa-code"></i>Wrsee</a>
370370
</span>
371371
<span class="links-of-author-item">

resources/views/next/cates/list.blade.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
@if($cates)
1818
@foreach($cates as $k => $cate)
1919
<li class="category-list-item"><a class="category-list-link"
20-
href="/cates/{{$cate->id}}">{{$cate->name}}</a><span
20+
href="{{route('cates')}}/{{$cate->id}}">{{$cate->name}}</a><span
2121
class="category-list-count">{{$cate->num}}</span></li>
2222
@endforeach
2323
@endif
@@ -46,17 +46,17 @@ class="category-list-count">{{$cate->num}}</span></li>
4646
</div>
4747
<nav class="site-state motion-element">
4848
<div class="site-state-item site-state-posts">
49-
<a href="/">
49+
<a href="{{route('home')}}">
5050
<span class="site-state-item-count">{{$articleCount}}</span>
5151
<span class="site-state-item-name">日志</span></a>
5252
</div>
5353
<div class="site-state-item site-state-categories">
54-
<a href="/cates">
54+
<a href="{{route('cates')}}">
5555
<span class="site-state-item-count">{{$catesCount}}</span>
5656
<span class="site-state-item-name">分类</span></a>
5757
</div>
5858
<div class="site-state-item site-state-tags">
59-
<a href="/tags">
59+
<a href="{{route('tags')}}">
6060
<span class="site-state-item-count">{{$tagsCount}}</span>
6161
<span class="site-state-item-name">标签</span></a>
6262
</div>

resources/views/next/cates/show.blade.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,17 +51,17 @@
5151
</div>
5252
<nav class="site-state motion-element">
5353
<div class="site-state-item site-state-posts">
54-
<a href="/">
54+
<a href="{{route('home')}}">
5555
<span class="site-state-item-count">{{$articleCount}}</span>
5656
<span class="site-state-item-name">日志</span></a>
5757
</div>
5858
<div class="site-state-item site-state-categories">
59-
<a href="/cates">
59+
<a href="{{route('cates')}}">
6060
<span class="site-state-item-count">{{$catesCount}}</span>
6161
<span class="site-state-item-name">分类</span></a>
6262
</div>
6363
<div class="site-state-item site-state-tags">
64-
<a href="/tags">
64+
<a href="{{route('tags')}}">
6565
<span class="site-state-item-count">{{$tagsCount}}</span>
6666
<span class="site-state-item-name">标签</span></a>
6767
</div>

resources/views/next/layouts/app.blade.php

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@
1111
<meta http-equiv="Cache-Control" content="no-siteapp">
1212
<link rel="apple-touch-icon" sizes="180x180" href="/next/images/apple-touch-icon-next.png?v=5.1.4">
1313
<link rel="icon" type="image/png" sizes="32x32" href="/next/images/favicon-32x32-next.png?v=5.1.4">
14-
<link rel="canonical" href="http://www.wrsee.com/">
14+
<link rel="canonical" href="{{route('home')}}">
1515
<meta name="keywords" content="@yield('keywords', setting('web_name', 'Mrcoder'))">
1616
<meta name="description" content="@yield('description', setting('web_name', 'Mrcoder'))">
1717
<meta property="og:type" content="blog">
1818
<meta property="og:title" content="@yield('title', setting('web_name', 'Mrcoder'))">
19-
<meta property="og:url" content="http://www.wrsee.com/index.php">
19+
<meta property="og:url" content="{{route('home')}}">
2020
<meta property="og:site_name" content="@yield('title', setting('web_name', 'Mrcoder'))">
2121
<meta property="og:description" content="@yield('description', setting('web_name', 'Mrcoder'))">
2222
<meta property="og:locale" content="zh-Hans">
@@ -33,7 +33,7 @@
3333
<div class="site-brand-wrapper">
3434
<div class="site-meta ">
3535
<div class="custom-logo-site-title">
36-
<a href="/" class="brand" rel="start">
36+
<a href="{{route('home')}}" class="brand" rel="start">
3737
<span class="logo-line-before">
3838
<i>
3939
</i>
@@ -57,15 +57,15 @@
5757
<nav class="site-nav">
5858
<ul id="menu" class="menu">
5959
<li class="menu-item menu-item-home">
60-
<a href="/" rel="section">
60+
<a href="{{route('home')}}" rel="section">
6161
<i class="menu-item-icon fa fa-fw fa-home"></i>
6262
<br>首页</a></li>
6363
<li class="menu-item menu-item-tags">
64-
<a href="/tags/" rel="section">
64+
<a href="{{route('tags')}}" rel="section">
6565
<i class="menu-item-icon fa fa-fw fa-tags"></i>
6666
<br>标签</a></li>
6767
<li class="menu-item menu-item-cates">
68-
<a href="/cates/" rel="section">
68+
<a href="{{route('cates')}}" rel="section">
6969
<i class="menu-item-icon fa fa-fw fa-th"></i>
7070
<br>分类</a></li>
7171
{{--<li class="menu-item menu-item-archives">--}}
@@ -119,13 +119,9 @@
119119
<span class="with-love">
120120
<i class="fa fa-user"></i>
121121
</span>
122-
<span class="author" itemprop="copyrightHolder">true</span>
122+
<span class="post-meta-item-text">编码先生</span>
123123
<span class="post-meta-divider">|</span>
124-
<span class="post-meta-item-icon">
125-
<i class="fa fa-area-chart"></i>
126-
</span>
127-
{{--<span class="post-meta-item-text">博客全站字数&#58;</span>--}}
128-
{{--<span title="博客全站字数">82.6k</span>--}}
124+
<span title="ICP主体备案号">粤ICP备19005341号-1</span>
129125
</div>
130126
<div class="busuanzi-count">
131127
<span class="site-uv">

resources/views/next/tags/list.blade.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@
2727
@if($tags)
2828
@foreach($tags as $k => $tag)
2929
@if(($k%2))
30-
<a href="/tags/{{$tag->id}}/"
30+
<a href="{{route('tags')}}/{{$tag->id}}/"
3131
style="font-size: 18px; color: #8e8e8e">{{$tag->name}}</a>
3232
@else
33-
<a href="/tags/{{$tag->id}}/"
33+
<a href="{{route('tags')}}/{{$tag->id}}/"
3434
style="font-size: 12px; color: #ccc">{{$tag->name}}</a>
3535
@endif
3636
@endforeach
@@ -66,17 +66,17 @@
6666
</div>
6767
<nav class="site-state motion-element">
6868
<div class="site-state-item site-state-posts">
69-
<a href="/next/archives/">
69+
<a href="{{route('home')}}">
7070
<span class="site-state-item-count">{{$articleCount}}</span>
7171
<span class="site-state-item-name">日志</span></a>
7272
</div>
7373
<div class="site-state-item site-state-categories">
74-
<a href="/categories/index.html">
74+
<a href="{{route('cates')}}">
7575
<span class="site-state-item-count">{{$catesCount}}</span>
7676
<span class="site-state-item-name">分类</span></a>
7777
</div>
7878
<div class="site-state-item site-state-tags">
79-
<a href="/tags/index.html">
79+
<a href="{{route('tags')}}">
8080
<span class="site-state-item-count">{{$tagsCount}}</span>
8181
<span class="site-state-item-name">标签</span></a>
8282
</div>

resources/views/next/tags/show.blade.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,17 +77,17 @@
7777
</div>
7878
<nav class="site-state motion-element">
7979
<div class="site-state-item site-state-posts">
80-
<a href="/">
80+
<a href="{{route('home')}}">
8181
<span class="site-state-item-count">{{$articleCount}}</span>
8282
<span class="site-state-item-name">日志</span></a>
8383
</div>
8484
<div class="site-state-item site-state-categories">
85-
<a href="/cates">
85+
<a href="{{route('cates')}}">
8686
<span class="site-state-item-count">{{$catesCount}}</span>
8787
<span class="site-state-item-name">分类</span></a>
8888
</div>
8989
<div class="site-state-item site-state-tags">
90-
<a href="/tags">
90+
<a href="{{route('tags')}}">
9191
<span class="site-state-item-count">{{$tagsCount}}</span>
9292
<span class="site-state-item-name">标签</span></a>
9393
</div>

routes/web.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@
1414
Auth::routes();
1515

1616
Route::get('/', 'HomeController@home')->name('home');
17-
Route::get('/cates', 'CateController@list');
17+
Route::get('/cates', 'CateController@list')->name('cates');
1818
Route::get('/cates/{cateid}', 'CateController@show');
19-
Route::get('/page/{page}', 'HomeController@home')->name('home');
19+
Route::get('/page/{page}', 'HomeController@home');
2020
Route::get('/mrcoderadmin', 'AdminController@index')->name('admin');
2121
Route::post('/search', 'ArticleController@search')->name('search');
2222
Route::get('/articles/list', 'ArticleController@list')->name('articles.list');
2323
Route::resource('/articles', 'ArticleController');
2424
Route::resource('/comments', 'CommentController');
25-
Route::get('/tags', 'TagController@list');
25+
Route::get('/tags', 'TagController@list')->name('tags');
2626
Route::get('/tags/{tagid}', 'TagController@show');
2727
//Route::resource('/tags', 'TagController');
2828

0 commit comments

Comments
 (0)