<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Laravel5 &#8211; 萧邦的博客</title>
	<atom:link href="https://www.zlhlab.top/tag/laravel5/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.zlhlab.top</link>
	<description>If not me who, If not now when</description>
	<lastBuildDate>Wed, 30 Jul 2025 02:19:19 +0000</lastBuildDate>
	<language>zh-Hans</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.8.6</generator>
	<item>
		<title>智慧商圈管理后台</title>
		<link>https://www.zlhlab.top/%e6%99%ba%e6%85%a7%e5%95%86%e5%9c%88%e7%ae%a1%e7%90%86%e5%90%8e%e5%8f%b0/</link>
		
		<dc:creator><![CDATA[萧邦]]></dc:creator>
		<pubDate>Fri, 23 Feb 2018 15:44:52 +0000</pubDate>
				<category><![CDATA[案例]]></category>
		<category><![CDATA[软件]]></category>
		<category><![CDATA[Laravel5]]></category>
		<category><![CDATA[php]]></category>
		<guid isPermaLink="false">https://www.zlhlab.top/?p=588</guid>

					<description><![CDATA[项目背景： 在学习Laravel后台开发过程中，产生实现智慧商圈管理后台的想法。如是利用空闲时间，参照以前的设<div class="more-link">
				 <a href="https://www.zlhlab.top/%e6%99%ba%e6%85%a7%e5%95%86%e5%9c%88%e7%ae%a1%e7%90%86%e5%90%8e%e5%8f%b0/" class="link-btn theme-btn"><span>Read More </span> <i class="fa fa-caret-right"></i></a>
			</div>]]></description>
										<content:encoded><![CDATA[<h4>项目背景：</h4>
<p>在学习Laravel后台开发过程中，产生实现智慧商圈管理后台的想法。如是利用空闲时间，参照以前的设计稿，实现商圈管理后台。</p>
<p>前端页面实现注册、登录、验证码功能，首页展示、商品分类、活动详情、购物车，以及支付流程。采用weiui页面框架，展示与微信端保持一致。</p>
<h4>智慧商圈管理后台</h4>
<p>主要包括管理员注册与登录，简单数据统计，广告管理、商家管理、产品管理、文章管理、评论审核、会员管理、标签管理以及订单管理，活动、商家、标签、文章编辑支持mark语法和图片动态插入。</p>
<p>支持提供API接口给前端页面展示。</p>
<p>链接地址：<a href="http://shopsmart.geek720.com/admin/home" title="商圈后台入口" target="_blank">商圈后台入口</a></p>
<p>链接地址：<a href="http://shopsmart.geek720.com/" title="前端展示页面" target="_blank">前端展示页面</a></p>
<h4>项目截图</h4>
<p><strong>后台截图</strong></p>
<p><img decoding="async" src="https://www.zlhlab.top/wp-content/uploads/2018/02/web2.jpg" alt=""><img decoding="async" src="https://www.zlhlab.top/wp-content/uploads/2018/02/web3.jpg" alt=""><img decoding="async" src="https://www.zlhlab.top/wp-content/uploads/2018/02/web4.jpg" alt=""><img decoding="async" src="https://www.zlhlab.top/wp-content/uploads/2018/02/web5.jpg" alt=""><strong>前端页面</strong></p>
<p><img decoding="async" src="https://www.zlhlab.top/wp-content/uploads/2018/02/webapp.jpg" alt=""></p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>在Laravel5.4中使用editor.md Markdown编辑器</title>
		<link>https://www.zlhlab.top/%e5%9c%a8laravel5-4%e4%b8%ad%e4%bd%bf%e7%94%a8editor-md-markdown%e7%bc%96%e8%be%91%e5%99%a8/</link>
		
		<dc:creator><![CDATA[萧邦]]></dc:creator>
		<pubDate>Fri, 18 Aug 2017 07:20:58 +0000</pubDate>
				<category><![CDATA[技术]]></category>
		<category><![CDATA[Laravel5]]></category>
		<category><![CDATA[markdown]]></category>
		<guid isPermaLink="false">https://www.zlhlab.top/?p=256</guid>

					<description><![CDATA[  前言 这两天在wordpress中完成editor.md编辑器嵌入，实现文章的编辑。而研究Markdown<div class="more-link">
				 <a href="https://www.zlhlab.top/%e5%9c%a8laravel5-4%e4%b8%ad%e4%bd%bf%e7%94%a8editor-md-markdown%e7%bc%96%e8%be%91%e5%99%a8/" class="link-btn theme-btn"><span>Read More </span> <i class="fa fa-caret-right"></i></a>
			</div>]]></description>
										<content:encoded><![CDATA[<p> </p>
<h4>前言</h4>
<p>这两天在wordpress中完成<code>editor.md</code>编辑器嵌入，实现文章的编辑。而研究Markdown编辑器的起因，还是想搭建Laravel框架下的管理后台。</p>
<p>开发环境： <code>php</code>、<code>larave5.4</code>版本</p>
<h4>1.编辑器的选择</h4>
<p>针对Laravel支持的markdown编辑器，发现有下面2种编辑器可供选择。</p>
<blockquote>
<h5><a href="https://github.com/yccphp/laravel-5-markdown-editor" title="laravel-5-markdown-editor" target="_blank">laravel-5-markdown-editor</a></h5>
<p>  github链接地址: https://github.com/yccphp/laravel-5-markdown-editor</p>
<h5><a href="https://github.com/douyasi/laravel-editor-md" title="laravel-editor-md" target="_blank">laravel-editor-md</a></h5>
<p>  github链接地址: https://github.com/douyasi/laravel-editor-md
</p></blockquote>
<h5>laravel-5-markdown-editor</h5>
<p>首先谈一下laravel-5-markdown-editor，按照安装教程测试了一下，可以正常的编辑。如下图：</p>
<p><a href="https://www.zlhlab.top/wp-content/uploads/2017/08/1899669759-555ab106c07b9_articlex.jpeg" title="laravel-5-markdown-editor" target="_blank"><img decoding="async" src="https://www.zlhlab.top/wp-content/uploads/2017/08/1899669759-555ab106c07b9_articlex.jpeg" alt="laravel-5-markdown-editor" title="laravel-5-markdown-editor"></a></p>
<p>不过，插件上的使用有以下几点待改进：</p>
<blockquote>
<ol>
<li>插件的翻译中文文字和底色，搭配感觉不舒服；</li>
<li>样式与bootstrap的样式表冲突，导致页面颜色和布局出现了问题；</li>
<li>整体插件安装步骤有点繁琐，导致项目文件增加的地方比较多。</li>
</ol>
</blockquote>
<h5>laravel-editor-md</h5>
<p>这个是我比较中意的一款markdown编辑器，界面简洁、代码封装合理。</p>
<p><a href="https://www.zlhlab.top/wp-content/uploads/2017/08/687474703a2f2f646f75796173692e636f6d2f7573722f75706c6f6164732f323031362f30382f323531323139393131352e6a7067.jpeg" title="laravel-editor-md" target="_blank"><img decoding="async" src="https://www.zlhlab.top/wp-content/uploads/2017/08/687474703a2f2f646f75796173692e636f6d2f7573722f75706c6f6164732f323031362f30382f323531323139393131352e6a7067.jpeg" alt="laravel-editor-md" title="laravel-editor-md"></a></p>
<blockquote>
<ol>
<li>编辑器界面整洁，和wordpress插件样式统一</li>
<li>安装与配置方便，2处修改和2个命令</li>
<li>使用便捷，只需要引用3行代码</li>
</ol>
</blockquote>
<p>综合，还是以laravel-editor-md作为管理后台的文章编辑器。以下讲解一下用法：</p>
<h4>2.laravel-editor-md的安装与配置</h4>
<p>在 <code>composer.json</code>新增 <code>"douyasi/laravel-editor-md": "dev-master"</code> 依赖，然后执行： <code>composer update</code>操作。</p>
<p>依赖安装完毕之后，在 app.php 中添加：</p>
<pre class="prism-highlight line-numbers" data-start="1"><code class="language-null">'providers' =&gt; [
        'Douyasi\Editor\EditorServiceProvider',
],
</code></pre>
<p>然后，执行下面 artisan 命令，发布该扩展包配置等项。</p>
<p><code>php artisan vendor:publish --force</code></p>
<h4>3.使用说明</h4>
<p>在 <code>blade</code> 模版里面使用下面三个方法：<code>editor_css()</code>、<code>editor_js()</code>和 <code>editor_config()</code> 。</p>
<pre class="line-numbers prism-highlight" data-start="1"><code class="language-php">&lt;!DOCTYPE html&gt;
&lt;html lang="en"&gt;
&lt;head&gt;
    &lt;meta charset="UTF-8"&gt;
    &lt;title&gt;editor.md example&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;h2&gt;editor.md example&lt;/h2&gt;
&lt;div id="mdeditor"&gt;
  &lt;textarea class="form-control" name="content" style="display:none;"&gt;
        # editor.md for Laravel
        &gt;   editor.md example
  &lt;/textarea&gt;
&lt;/div&gt;
{!! editor_css() !!}
{!! editor_js() !!}
{!! editor_config('mdeditor') !!}
&lt;/body&gt;
&lt;/html&gt;
</code></pre>
<p>发现展示的内容区域只有90%，引入<code>js</code>文件，加入以下代码：</p>
<pre class="line-numbers prism-highlight" data-start="1"><code class="language-javascript">&lt;script&gt;
    $(function () {
        $('#mdeditor').width('100%');
    });
&lt;/script&gt;
</code></pre>
<h4>4.展示结果</h4>
<p>最后，展示下实际应用的效果：</p>
<p><a href="https://www.zlhlab.top/wp-content/uploads/2017/08/D84AF2A5-CEBD-4F9E-97B3-B82EDCAD4093.png" title="展示结果" target="_blank"><img decoding="async" src="https://www.zlhlab.top/wp-content/uploads/2017/08/D84AF2A5-CEBD-4F9E-97B3-B82EDCAD4093.png" alt="展示结果" title="展示结果"></a></p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Laravel5.4 artisan常见命令</title>
		<link>https://www.zlhlab.top/laravel5-4-artisan%e5%b8%b8%e8%a7%81%e5%91%bd%e4%bb%a4/</link>
		
		<dc:creator><![CDATA[萧邦]]></dc:creator>
		<pubDate>Tue, 15 Aug 2017 02:52:21 +0000</pubDate>
				<category><![CDATA[技术]]></category>
		<category><![CDATA[artisan]]></category>
		<category><![CDATA[Laravel5]]></category>
		<category><![CDATA[命令]]></category>
		<guid isPermaLink="false">https://www.zlhlab.top/?p=172</guid>

					<description><![CDATA[使用Laravel5.4框架进行php后台搭建，合理使用框架提供的artisan命令，可以较快捷的生成相关模板<div class="more-link">
				 <a href="https://www.zlhlab.top/laravel5-4-artisan%e5%b8%b8%e8%a7%81%e5%91%bd%e4%bb%a4/" class="link-btn theme-btn"><span>Read More </span> <i class="fa fa-caret-right"></i></a>
			</div>]]></description>
										<content:encoded><![CDATA[<p>使用<code>Laravel5.4</code>框架进行php后台搭建，合理使用框架提供的<code>artisan</code>命令，可以较快捷的生成相关模板。</p>
<h4>1、常见命令</h4>
<h5>查看artisan命令</h5>
<pre class="line-numbers prism-highlight" data-start="1"><code class="language-php">php artisan
php artisan list
</code></pre>
<h5>查看帮助命令</h5>
<pre class="line-numbers prism-highlight" data-start="1"><code class="language-php">php artisan help
</code></pre>
<h5>查看所有命令</h5>
<pre class="line-numbers prism-highlight" data-start="1"><code class="language-php">php artisan list
</code></pre>
<h5>查看laravel版本</h5>
<pre class="line-numbers prism-highlight" data-start="1"><code class="language-php">php artisan --version
</code></pre>
<h5>使用 PHP 内置的开发服务器启动应用</h5>
<pre class="line-numbers prism-highlight" data-start="1"><code class="language-php">php artisan serve
</code></pre>
<p>生成一个随机的 key，并自动更新到 <code>app/config/app.php</code> 的 <code>key</code> 键值对（刚安装好需要做这一步）</p>
<pre class="line-numbers prism-highlight" data-start="1"><code class="language-php">php artisan key:generate
</code></pre>
<h5>开启Auth用户功能</h5>
<p>（开启后需要执行迁移才生效）</p>
<pre class="line-numbers prism-highlight" data-start="1"><code class="language-php">php artisan make:auth
php artisan migrate
</code></pre>
<h5>开启维护模式和关闭维护模式（显示503）</h5>
<pre class="line-numbers prism-highlight" data-start="1"><code class="language-php">php artisan down
php artisan up
</code></pre>
<h5>进入tinker工具</h5>
<pre class="line-numbers prism-highlight" data-start="1"><code class="language-php">php artisan tinker
</code></pre>
<h5>列出所有的路由</h5>
<pre class="line-numbers prism-highlight" data-start="1"><code class="language-php">php artisan route:list
</code></pre>
<h5>生成路由缓存以及移除缓存路由文件</h5>
<pre class="line-numbers prism-highlight" data-start="1"><code class="language-php">php artisan route:cache
php artisan route:clear
</code></pre>
<h4>2、功能篇</h4>
<h5>创建控制器</h5>
<pre class="line-numbers prism-highlight" data-start="1"><code class="language-php">php artisan make:controller StudentController
</code></pre>
<h5>创建Rest风格资源控制器</h5>
<p>（带有index、create、store、edit、update、destroy、show方法）</p>
<pre class="line-numbers prism-highlight" data-start="1"><code class="language-php">php artisan make:controller PhotoController --resource
</code></pre>
<h5>创建模型</h5>
<pre class="line-numbers prism-highlight" data-start="1"><code class="language-php">php artisan make:model Student
</code></pre>
<h5>创建新建表的迁移和修改表的迁移</h5>
<pre class="line-numbers prism-highlight" data-start="1"><code class="language-php">php artisan make:migration create_users_table --create=students //创建students表

php artisan make:migration add_votes_to_users_table --table=students//给students表增加votes字段
</code></pre>
<h5>执行迁移</h5>
<pre class="line-numbers prism-highlight" data-start="1"><code class="language-php">php artisan migrate
</code></pre>
<h5>创建模型的时候同时生成新建表的迁移</h5>
<pre class="line-numbers prism-highlight" data-start="1"><code class="language-php">php artisan make:model Student -m
</code></pre>
<h5>回滚上一次的迁移</h5>
<pre class="line-numbers prism-highlight" data-start="1"><code class="language-php">php artisan migrate:rollback
</code></pre>
<h5>回滚所有迁移</h5>
<pre class="line-numbers prism-highlight" data-start="1"><code class="language-php">php artisan migrate:reset
</code></pre>
<h5>创建填充</h5>
<pre class="line-numbers prism-highlight" data-start="1"><code class="language-php">php artisan make:seeder StudentTableSeeder
</code></pre>
<h5>执行单个填充</h5>
<pre class="line-numbers prism-highlight" data-start="1"><code class="language-php">php artisan db:seed --class=StudentTableSeeder
</code></pre>
<h5>执行所有填充</h5>
<pre class="line-numbers prism-highlight" data-start="1"><code class="language-php">php artisan db:seed
创建中间件（app/Http/Middleware 下）
php artisan make:middleware Activity
</code></pre>
<h5>创建队列（数据库）的表迁移（需要执行迁移才生效）</h5>
<pre class="line-numbers prism-highlight" data-start="1"><code class="language-php">php artisan queue:table
</code></pre>
<h5>创建队列类（app/jobs下）：</h5>
<pre class="line-numbers prism-highlight" data-start="1"><code class="language-php">php artisan make:job SendEmail
</code></pre>
<h5>创建请求类（app/Http/Requests下）</h5>
<pre class="line-numbers prism-highlight" data-start="1"><code class="language-php">php artisan make:request CreateArticleRequest
</code></pre>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
