`
7 | * 命名空间必须有一个顶级的组织名称 ("Vendor Name").
8 | * 命名空间中可以根据情况使用任意数量的子空间
9 | * 从文件系统中加载源文件的时,命名空间中的分隔符将被映射为 `DIRECTORY_SEPARATOR`
10 | * 命名空间中的类名中的`_`没有特殊含义,也将被作为`DIRECTORY_SEPARATOR`对待.
11 | * 标准的命名空间和类从文件系统加载源文件时只需要加上`.php`后缀即可
12 | * 组织名,空间名,类名都可以随意使用大小写英文字符的组合
13 |
14 | 示例
15 | --------
16 |
17 | * `\Doctrine\Common\IsolatedClassLoader` => `/path/to/project/lib/vendor/Doctrine/Common/IsolatedClassLoader.php`
18 | * `\Symfony\Core\Request` => `/path/to/project/lib/vendor/Symfony/Core/Request.php`
19 | * `\Zend\Acl` => `/path/to/project/lib/vendor/Zend/Acl.php`
20 | * `\Zend\Mail\Message` => `/path/to/project/lib/vendor/Zend/Mail/Message.php`
21 |
22 | 命名空间和类名中的下划线
23 | -----------------------------------------
24 |
25 | * `\namespace\package\Class_Name` => `/path/to/project/lib/vendor/namespace/package/Class/Name.php`
26 | * `\namespace\package_name\Class_Name` => `/path/to/project/lib/vendor/namespace/package_name/Class/Name.php`
27 |
28 | 以上是我们为轻松实现自动加载特性设定的最低标准。你可以利用下面这个可以自动加载 PHP 5.3 类的SplClassLoader来测试你的代码是否符合以上这些标准。
29 |
30 | 实例
31 | ----------------------
32 |
33 | 下面是一个函数实例简单展示如何使用上面建议的标准进行自动加载
34 | ```php
35 | `或者短输出式`= ?>`标签;它`不可`使用其他的标签变种。
36 |
37 | ### 2.2. 字符编码
38 |
39 | PHP代码`必须`只使用不带BOM的UTF-8。
40 |
41 | ### 2.3. 副作用
42 |
43 | 一个文件`应当`声明新符号 (类名,函数名,常量等)并且不产生副作用,或者`应当`执行有副作用的逻辑,但不能同时做这两件事。
44 |
45 | 短语"副作用"意思是不直接执行逻辑的类,函数,常量等 *仅包括文件*
46 |
47 | “副作用”包含但不局限于:生成输出,显式地使用`require`或`include`,连接外部服务,修改ini配置,触发错误或异常,修改全局或者静态变量,读取或修改文件等等
48 |
49 | 下面是一个既包含声明又有副作用的示例文件;即应避免的例子:
50 |
51 | ```php
52 | \n";
61 |
62 | // declaration
63 | function foo()
64 | {
65 | // function body
66 | }
67 | ```
68 |
69 | 下面是一个仅包含声明的示例文件;即需要提倡的例子:
70 |
71 | ```php
72 | is_admin) return Redirect::back();
52 | });
53 |
54 | # 必须是登录用户
55 | Route::filter('auth', function () {
56 | // 拦截未登录用户并记录当前 URL,跳转到登录页面
57 | if (Auth::guest()) return Redirect::guest(route('signin'));
58 | });
59 |
60 | # HTTP 基础身份验证过滤器 - 单次弹窗登录验证
61 | Route::filter('auth.basic', function () {
62 | return Auth::basic();
63 | });
64 |
65 | # 必须是游客(较少应用)
66 | Route::filter('guest', function () {
67 | // 拦截已登录用户
68 | if (Auth::check()) return Redirect::to('/');
69 | });
70 |
71 | # 禁止对自己的账号进行危险操作
72 | Route::filter('not.self', function ($route) {
73 | // 拦截自身用户 ID
74 | if (Auth::user()->id == $route->parameter('id'))
75 | return Redirect::back();
76 | });
77 |
78 |
79 |
80 | /*
81 | |--------------------------------------------------------------------------
82 | | [后置] 过滤器
83 | |--------------------------------------------------------------------------
84 | # Route::filter('afterFilter', function ($route, $request, $response) {});
85 | |
86 | */
87 |
88 |
89 |
90 | /*
91 | |--------------------------------------------------------------------------
92 | | 事件监控
93 | |--------------------------------------------------------------------------
94 | |
95 | */
96 | # 用户登录事件
97 | Event::listen('auth.login', function ($user, $remember) {
98 | // 记录最后登录时间
99 | $user->signin_at = new Carbon;
100 | $user->save();
101 | // 后期可附加权限相关操作
102 | // ...
103 | });
104 | # 用户退出事件
105 | // Event::listen('auth.logout', function ($user) {
106 | // //
107 | // });
108 |
--------------------------------------------------------------------------------
/app/lang/en/friendlyDate.php:
--------------------------------------------------------------------------------
1 | ' before',
13 | 'after' => ' after',
14 |
15 | 'second' => ' second',
16 | 'seconds' => ' seconds',
17 |
18 | 'minute' => ' minute',
19 | 'minutes' => ' minutes',
20 |
21 | 'hour' => ' hour',
22 | 'hours' => ' hours',
23 |
24 | 'day' => ' day',
25 | 'days' => ' days',
26 |
27 | 'week' => ' week',
28 | 'weeks' => ' weeks',
29 |
30 | 'month' => ' month',
31 | 'months' => ' months',
32 |
33 | 'year' => ' year',
34 | 'years' => ' years',
35 |
36 | );
37 |
--------------------------------------------------------------------------------
/app/lang/en/pagination.php:
--------------------------------------------------------------------------------
1 | '« Previous',
17 |
18 | 'next' => 'Next »',
19 |
20 | );
--------------------------------------------------------------------------------
/app/lang/en/reminders.php:
--------------------------------------------------------------------------------
1 | "Passwords must be at least six characters and match the confirmation.",
17 |
18 | "user" => "We can't find a user with that e-mail address.",
19 |
20 | "token" => "This password reset token is invalid.",
21 |
22 | "sent" => "Password reminder sent!",
23 |
24 | );
25 |
--------------------------------------------------------------------------------
/app/lang/zh-CN/friendlyDate.php:
--------------------------------------------------------------------------------
1 | '前',
13 | 'after' => '后',
14 |
15 | 'second' => '秒钟',
16 | 'seconds' => '秒钟',
17 |
18 | 'minute' => '分钟',
19 | 'minutes' => '分钟',
20 |
21 | 'hour' => '小时',
22 | 'hours' => '小时',
23 |
24 | 'day' => '天',
25 | 'days' => '天',
26 |
27 | 'week' => '周',
28 | 'weeks' => '周',
29 |
30 | 'month' => '个月',
31 | 'months' => '个月',
32 |
33 | 'year' => '年',
34 | 'years' => '年',
35 |
36 | );
37 |
--------------------------------------------------------------------------------
/app/lang/zh-CN/pagination.php:
--------------------------------------------------------------------------------
1 | '« 往前',
17 |
18 | 'next' => '往后 »',
19 | );
20 |
--------------------------------------------------------------------------------
/app/lang/zh-CN/reminders.php:
--------------------------------------------------------------------------------
1 | "密码必须符合指定格式。",
17 |
18 | "user" => "找不到该邮箱对应的用户。",
19 |
20 | "token" => "密码重置令牌无效。",
21 |
22 | "sent" => "密码重置邮件已发送!",
23 |
24 | );
25 |
--------------------------------------------------------------------------------
/app/lang/zh-CN/validation.php:
--------------------------------------------------------------------------------
1 | ":attribute 必须接受。",
17 | "active_url" => ":attribute 不是一个有效的URL。",
18 | "after" => ":attribute 必须是一个在 :date 之后的日期。",
19 | "alpha" => ":attribute 只能由字母组成。",
20 | "alpha_dash" => ":attribute 只能由字母、数字、中划线、下划线组成。",
21 | "alpha_num" => ":attribute 只能由字母和数字组成。",
22 | "array" => ":attribute 必须是一个数组。",
23 | "before" => ":attribute 必须是一个在 :date 之前的日期。",
24 | "between" => array(
25 | "numeric" => ":attribute 必须介于 :min - :max 之间。",
26 | "file" => ":attribute 必须介于 :min - :max 千字节之间。",
27 | "string" => ":attribute 必须介于 :min - :max 个字符之间。",
28 | "array" => ":attribute 必须介于 :min - :max 个单元之间。"
29 | ),
30 | "confirmed" => ":attribute 确认不匹配。",
31 | "date" => ":attribute 不是一个有效的日期。",
32 | "date_format" => ":attribute 不匹配日期格式 :format。",
33 | "different" => ":attribute 和 :other 必须不同。",
34 | "digits" => ":attribute 必须是 :digits 位的数字。",
35 | "digits_between" => ":attribute 必须是介于 :min 和 :max 位的数字。",
36 | "email" => ":attribute 电邮格式非法。",
37 | "exists" => "已选的属性 :attribute 非法。",
38 | "image" => ":attribute 必须是一张图片。",
39 | "in" => "已选的属性 :attribute 非法。",
40 | "integer" => ":attribute 必须是一个整数。",
41 | "ip" => ":attribute 必须是一个有效的IP地址。",
42 | "max" => array(
43 | "numeric" => ":attribute 必须小于 :max 。",
44 | "file" => ":attribute 必须小于 :max 千字节。",
45 | "string" => ":attribute 必须小于 :max 个字符。",
46 | "array" => ":attribute 必须小于 :max 个单元。"
47 | ),
48 | "mimes" => ":attribute 必须是一个 :values 类型的文件。",
49 | "min" => array(
50 | "numeric" => ":attribute 必须大于 :min 。",
51 | "file" => ":attribute 必须大于 :min 千字节。",
52 | "string" => ":attribute 必须大于 :min 个字符。",
53 | "array" => ":attribute 必须大于 :min 个单元。"
54 | ),
55 | "not_in" => "已选的属性 :attribute 非法。",
56 | "numeric" => ":attribute 必须是一个数字。",
57 | "regex" => ":attribute 字段必填。",
58 | "required" => ":attribute 属性需要填写字段。",
59 | "required_if" => ":attribute 属性当 :other 为 :value时为必填项。",
60 | "required_with" => ":attribute 属性当 :values 存在时为必填项。",
61 | "required_without" => ":attribute 属性当 :values 不存在时为必填项。",
62 | "same" => ":attribute 和 :other 必须匹配。",
63 | "size" => array(
64 | "numeric" => ":attribute 大小必须是 :size 。",
65 | "file" => ":attribute 大小必须是 :size 千字节。",
66 | "string" => ":attribute 必须是 :size 个字符。",
67 | "array" => ":attribute 必须包含 :size 个单元。"
68 | ),
69 | "unique" => ":attribute 已经有人使用。",
70 | "url" => ":attribute 格式非法。",
71 |
72 | /*
73 | |--------------------------------------------------------------------------
74 | | Custom Validation Language Lines
75 | |--------------------------------------------------------------------------
76 | |
77 | | Here you may specify custom validation messages for attributes using the
78 | | convention "attribute.rule" to name the lines. This makes it quick to
79 | | specify a specific custom language line for a given attribute rule.
80 | |
81 | */
82 |
83 | 'custom' => array(),
84 |
85 | /*
86 | |--------------------------------------------------------------------------
87 | | Custom Validation Attributes
88 | |--------------------------------------------------------------------------
89 | |
90 | | The following language lines are used to swap attribute place-holders
91 | | with something more reader friendly such as E-Mail Address instead
92 | | of "email". This simply helps us make messages a little cleaner.
93 | |
94 | */
95 |
96 | 'attributes' => array(),
97 |
98 | );
99 |
--------------------------------------------------------------------------------
/app/models/Activation.php:
--------------------------------------------------------------------------------
1 | belongsTo('Category', 'category_id');
29 | }
30 |
31 | /**
32 | * 文章的作者
33 | * 一对多逆向
34 | * @return object User
35 | */
36 | public function user()
37 | {
38 | return $this->belongsTo('User', 'user_id');
39 | }
40 |
41 | /**
42 | * 文章的评论
43 | * 一对多
44 | * @return object Illuminate\Database\Eloquent\Collection
45 | */
46 | public function comments()
47 | {
48 | return $this->hasMany('Comment', 'article_id');
49 | }
50 |
51 | /*
52 | |--------------------------------------------------------------------------
53 | | 访问器
54 | |--------------------------------------------------------------------------
55 | */
56 | /**
57 | * 文章内容(原始)
58 | * @return string
59 | */
60 | public function getContentAttribute($value)
61 | {
62 | return strip($value);
63 | }
64 |
65 | /**
66 | * 文章内容(HTML 格式)
67 | * @return string
68 | */
69 | public function getContentHtmlAttribute()
70 | {
71 | switch ($this->content_format) {
72 | case 'markdown':
73 | return MarkdownExtra::defaultTransform($this->content);
74 | case 'html':
75 | return $this->content;
76 | }
77 | }
78 |
79 | /**
80 | * 文章内容(Markdown 格式)
81 | * @return string
82 | */
83 | public function getContentMarkdownAttribute()
84 | {
85 | switch ($this->content_format) {
86 | case 'markdown':
87 | return $this->content;
88 | case 'html':
89 | return new HTML_To_Markdown($this->content);
90 | }
91 | }
92 |
93 |
94 | }
--------------------------------------------------------------------------------
/app/models/BaseModel.php:
--------------------------------------------------------------------------------
1 | created_at);
47 | }
48 |
49 | /**
50 | * 友好的更新时间
51 | * @return string
52 | */
53 | public function getFriendlyUpdatedAtAttribute()
54 | {
55 | return friendly_date($this->updated_at);
56 | }
57 |
58 | /**
59 | * 友好的删除时间
60 | * @return string
61 | */
62 | public function getFriendlyDeletedAtAttribute()
63 | {
64 | return friendly_date($this->deleted_at);
65 | }
66 |
67 |
68 | }
--------------------------------------------------------------------------------
/app/models/Category.php:
--------------------------------------------------------------------------------
1 | hasMany('Article', 'category_id');
32 | }
33 |
34 |
35 |
36 | }
--------------------------------------------------------------------------------
/app/models/Comment.php:
--------------------------------------------------------------------------------
1 | belongsTo('Article', 'article_id');
32 | }
33 |
34 | /**
35 | * 评论的作者
36 | * 一对一逆向
37 | * @return object User
38 | */
39 | public function user()
40 | {
41 | return $this->belongsTo('User', 'user_id');
42 | }
43 |
44 |
45 | }
--------------------------------------------------------------------------------
/app/models/PassowrdReminder.php:
--------------------------------------------------------------------------------
1 | getKey();
34 | }
35 |
36 | /**
37 | * Get the password for the user.
38 | *
39 | * @return string
40 | */
41 | public function getAuthPassword()
42 | {
43 | return $this->password;
44 | }
45 |
46 | /**
47 | * Get the token value for the "remember me" session.
48 | *
49 | * @return string
50 | */
51 | public function getRememberToken()
52 | {
53 | return $this->remember_token;
54 | }
55 |
56 | /**
57 | * Set the token value for the "remember me" session.
58 | *
59 | * @param string $value
60 | * @return void
61 | */
62 | public function setRememberToken($value)
63 | {
64 | $this->remember_token = $value;
65 | }
66 |
67 | /**
68 | * Get the column name for the "remember me" token.
69 | *
70 | * @return string
71 | */
72 | public function getRememberTokenName()
73 | {
74 | return 'remember_token';
75 | }
76 |
77 | /**
78 | * Get the e-mail address where password reminders are sent.
79 | *
80 | * @return string
81 | */
82 | public function getReminderEmail()
83 | {
84 | return $this->email;
85 | }
86 |
87 | /*
88 | |--------------------------------------------------------------------------
89 | | 访问器
90 | |--------------------------------------------------------------------------
91 | */
92 | /**
93 | * 友好的最后登录时间
94 | * @return string
95 | */
96 | public function getFriendlySigninAtAttribute()
97 | {
98 | if (is_null($this->signin_at))
99 | return '新账号尚未登录';
100 | else
101 | return friendly_date($this->signin_at);
102 | }
103 |
104 | /**
105 | * 用户头像(大)
106 | * @return string 用户头像的 URI
107 | */
108 | public function getPortraitLargeAttribute()
109 | {
110 | if ($this->portrait)
111 | return asset('portrait/large/'.$this->portrait);
112 | else
113 | return with(new Identicon)->getImageDataUri($this->email, 220);
114 | }
115 |
116 | /**
117 | * 用户头像(中)
118 | * @return string 用户头像的 URI
119 | */
120 | public function getPortraitMediumAttribute()
121 | {
122 | if ($this->portrait)
123 | return asset('portrait/medium/'.$this->portrait);
124 | else
125 | return with(new Identicon)->getImageDataUri($this->email, 128);
126 | }
127 |
128 | /**
129 | * 用户头像(小)
130 | * @return string 用户头像的 URI
131 | */
132 | public function getPortraitSmallAttribute()
133 | {
134 | if ($this->portrait)
135 | return asset('portrait/small/'.$this->portrait);
136 | else
137 | return with(new Identicon)->getImageDataUri($this->email, 64);
138 | }
139 |
140 | /*
141 | |--------------------------------------------------------------------------
142 | | 调整器
143 | |--------------------------------------------------------------------------
144 | */
145 | /**
146 | * 密码
147 | * @param string $value 未处理的密码字符串
148 | * @return void
149 | */
150 | public function setPasswordAttribute($value)
151 | {
152 | // 若传入的字符串已经进行了 Hash 加密,则不重复处理
153 | $this->attributes['password'] = Hash::needsRehash($value) ? Hash::make($value) : $value;
154 | }
155 |
156 |
157 | }
158 |
--------------------------------------------------------------------------------
/app/start/artisan.php:
--------------------------------------------------------------------------------
1 | client->request('GET', '/');
13 |
14 | $this->assertTrue($this->client->getResponse()->isOk());
15 | }
16 |
17 | }
--------------------------------------------------------------------------------
/app/tests/TestCase.php:
--------------------------------------------------------------------------------
1 | 'changePassword'))
2 |
3 | @section('title') @parent 修改密码 @stop
4 |
5 | @section('style')
6 | @parent
7 | .form
8 | {
9 | width: 330px;
10 | margin: 0 auto;
11 | padding-bottom: 2em;
12 | }
13 | .form input, .form button
14 | {
15 | margin-top: 10px;
16 | }
17 | .form strong.error{
18 | color: #b94a48;
19 | }
20 | @stop
21 |
22 | @section('container')
23 |
24 | @include('w.notification')
25 |
43 |
44 | @stop
45 |
46 |
47 | @section('end')
48 | @parent
49 |
52 | @stop
53 |
--------------------------------------------------------------------------------
/app/views/account/changePortrait.blade.php:
--------------------------------------------------------------------------------
1 | @extends('l.account', array('active' => 'changePortrait'))
2 |
3 | @section('title') @parent 修改密码 @stop
4 |
5 | @section('style')
6 | @parent
7 | .form
8 | {
9 | width: 530px;
10 | margin: 0 auto;
11 | padding-bottom: 2em;
12 | }
13 | .form input, .form button
14 | {
15 | margin-top: 10px;
16 | }
17 | .form strong.error{
18 | color: #b94a48;
19 | }
20 | @stop
21 |
22 | @section('container')
23 |
24 | {{ Form::open(array('method' => 'PUT', 'files' => true, 'class' => 'form')) }}
25 |
26 |
27 |
28 |
29 | {{ Form::file('portrait') }}
30 | @include('w.notification')
31 |
32 | {{ Form::close() }}
33 |
34 | @stop
35 |
--------------------------------------------------------------------------------
/app/views/account/index.blade.php:
--------------------------------------------------------------------------------
1 | @extends('l.account', array('active' => 'account'))
2 |
3 | @section('container')
4 |
5 |
6 |
用户中心首页
7 |
这里是博客系统的管理员后台,负责整个博客系统的资源管理。
8 | @if(method_exists('AuthorityController', 'test')) {{ App::make('AuthorityController')->test() }} @endif
9 |
10 |
11 | @stop
12 |
--------------------------------------------------------------------------------
/app/views/account/myComments.blade.php:
--------------------------------------------------------------------------------
1 | @extends('l.account', array('active' => 'myComments'))
2 |
3 | @section('container')
4 |
5 | @include('w.notification')
6 |
7 | 我评论过的文章
8 |
9 |
10 |
11 |
12 |
13 | 文章标题 |
14 | 评论内容 |
15 | 操作 |
16 |
17 |
18 |
19 | @foreach ($comments as $comment)
20 |
21 |
22 | @if($comment->article)
23 | {{ $comment->article->title }}
24 | @else
25 | 此文章已被删除
26 | @endif
27 | |
28 | {{ $comment->content }} |
29 |
30 | 删除评论
32 | |
33 |
34 | @endforeach
35 |
36 |
37 |
38 |
39 |
40 | {{ pagination($comments, 'p.slider-3') }}
41 |
42 |
43 | 'myModal',
46 | 'title' => '系统提示',
47 | 'message' => '确认删除此评论?',
48 | 'footer' =>
49 | Form::open(array('id' => 'real-delete', 'method' => 'delete')).'
50 |
51 | '.
52 | Form::close(),
53 | );
54 | ?>
55 | @include('w.modal', $modalData)
56 |
57 |
58 | @stop
59 |
60 | @section('end')
61 | @parent
62 |
69 | @stop
70 |
--------------------------------------------------------------------------------
/app/views/admin/article/create.blade.php:
--------------------------------------------------------------------------------
1 | @extends('l.admin', array('active' => $resource))
2 |
3 | @section('title') @parent 添加新{{ $resourceName }} @stop
4 |
5 | @section('beforeStyle')
6 | @parent
7 | {{ style('bootstrap-markdown') }}
8 | @stop
9 |
10 | @section('style')
11 | .nav-tabs>li.active>a
12 | {
13 | background-color: #f8f8f8 !important;
14 | }
15 | @parent @stop
16 |
17 | @section('container')
18 |
19 | @include('w.notification')
20 |
28 |
29 |
33 |
34 |
107 |
108 | @stop
109 |
110 | @section('end')
111 | @parent
112 | {{ script('markdown', 'bootstrap-markdown') }}
113 | @stop
114 |
--------------------------------------------------------------------------------
/app/views/admin/article/index.blade.php:
--------------------------------------------------------------------------------
1 | @extends('l.admin', array('active' => $resource))
2 |
3 | @section('title') @parent {{ $resourceName }}管理 @stop
4 |
5 | @section('container')
6 |
7 | @include('w.notification')
8 |
9 |
17 |
18 | {{ Form::open(array('method' => 'get')) }}
19 |
20 |
21 | {{
22 | Form::select(
23 | 'target',
24 | array('title' => '标题'),
25 | Input::get('target', 'title'),
26 | array('class' => 'form-control input-sm')
27 | )
28 | }}
29 |
30 |
31 |
32 |
33 |
34 |
35 | {{ Form::close() }}
36 |
37 |
38 |
39 |
40 |
41 | 标题 {{ order_by('title') }} |
42 | 评论数 {{ order_by('comments_count') }} |
43 | 创建时间 {{ order_by('created_at', 'desc') }} |
44 | 操作 |
45 |
46 |
47 |
48 | @foreach ($datas as $data)
49 |
50 |
51 |
52 |
53 |
54 | {{ $data->title }}
55 | |
56 | {{ $data->comments_count }} |
57 | {{ $data->created_at }}({{ $data->friendly_created_at }}) |
58 |
59 | 编辑
60 | 删除
62 | |
63 |
64 | @endforeach
65 |
66 |
67 |
68 |
69 |
70 | {{ pagination($datas->appends(Input::except('page')), 'p.slider-3') }}
71 |
72 |
73 | 'myModal',
76 | 'title' => '系统提示',
77 | 'message' => '确认删除此'.$resourceName.'?',
78 | 'footer' =>
79 | Form::open(array('id' => 'real-delete', 'method' => 'delete')).'
80 |
81 | '.
82 | Form::close(),
83 | );
84 | ?>
85 | @include('w.modal', $modalData)
86 |
87 | @stop
88 |
89 | @section('end')
90 | @parent
91 |
98 | @stop
99 |
--------------------------------------------------------------------------------
/app/views/admin/category/create.blade.php:
--------------------------------------------------------------------------------
1 | @extends('l.admin', array('active' => $resource))
2 |
3 | @section('title') @parent 添加新{{ $resourceName }} @stop
4 |
5 | @section('style')
6 | .nav-tabs>li.active>a
7 | {
8 | background-color: #f8f8f8 !important;
9 | }
10 | @parent @stop
11 |
12 | @section('container')
13 |
14 | @include('w.notification')
15 |
23 |
24 |
27 |
28 |
63 |
64 | @stop
65 |
--------------------------------------------------------------------------------
/app/views/admin/category/edit.blade.php:
--------------------------------------------------------------------------------
1 | @extends('l.admin', array('active' => $resource))
2 |
3 | @section('title') @parent 编辑{{ $resourceName }} @stop
4 |
5 | @section('style')
6 | .nav-tabs>li.active>a
7 | {
8 | background-color: #f8f8f8 !important;
9 | }
10 | @parent @stop
11 |
12 | @section('container')
13 |
14 | @include('w.notification')
15 |
23 |
24 |
27 |
28 |
64 |
65 | @stop
66 |
--------------------------------------------------------------------------------
/app/views/admin/category/index.blade.php:
--------------------------------------------------------------------------------
1 | @extends('l.admin', array('active' => $resource))
2 |
3 | @section('title') @parent {{ $resourceName }}管理 @stop
4 |
5 | @section('container')
6 |
7 | @include('w.notification')
8 |
9 |
17 |
18 |
19 |
20 |
21 |
22 | 排序 |
23 | 名称 |
24 | 创建时间 |
25 | 操作 |
26 |
27 |
28 |
29 | @foreach ($datas as $data)
30 |
31 | {{ $data->sort_order }} |
32 | {{ $data->name }} |
33 | {{ $data->created_at }}({{ $data->friendly_created_at }}) |
34 |
35 | 编辑
36 | 删除
38 | |
39 |
40 | @endforeach
41 |
42 |
43 |
44 |
45 |
46 | {{ pagination($datas, 'p.slider-3') }}
47 |
48 |
49 | 'myModal',
52 | 'title' => '系统提示',
53 | 'message' => '确认删除此'.$resourceName.'?',
54 | 'footer' =>
55 | Form::open(array('id' => 'real-delete', 'method' => 'delete')).'
56 |
57 | '.
58 | Form::close(),
59 | );
60 | ?>
61 | @include('w.modal', $modalData)
62 |
63 | @stop
64 |
65 | @section('end')
66 | @parent
67 |
74 | @stop
75 |
--------------------------------------------------------------------------------
/app/views/admin/index.blade.php:
--------------------------------------------------------------------------------
1 | @extends('l.admin', array('active' => 'admin'))
2 |
3 | @section('container')
4 |
5 |
6 |
后台首页
7 |
这里是博客系统的管理员后台,负责整个博客系统的资源管理。
8 |
9 |
10 | @stop
11 |
--------------------------------------------------------------------------------
/app/views/admin/user/create.blade.php:
--------------------------------------------------------------------------------
1 | @extends('l.admin', array('active' => $resource))
2 |
3 | @section('title') @parent 添加新{{ $resourceName }} @stop
4 |
5 | @section('beforeStyle')
6 | @parent
7 | {{ style('bootstrap-3-switch') }}
8 | @stop
9 |
10 | @section('style')
11 | .nav-tabs>li.active>a
12 | {
13 | background-color: #f8f8f8 !important;
14 | }
15 | @parent @stop
16 |
17 | @section('container')
18 |
19 | @include('w.notification')
20 |
28 |
29 |
33 |
34 |
90 |
91 | @stop
92 |
93 | @section('end')
94 | @parent
95 | {{ script('bootstrap-3-switch') }}
96 |
99 | @stop
100 |
--------------------------------------------------------------------------------
/app/views/admin/user/edit.blade.php:
--------------------------------------------------------------------------------
1 | @extends('l.admin', array('active' => $resource))
2 |
3 | @section('title') @parent 编辑{{ $resourceName }} @stop
4 |
5 | @section('beforeStyle')
6 | @parent
7 | {{ style('bootstrap-3-switch') }}
8 | @stop
9 |
10 | @section('style')
11 | .nav-tabs>li.active>a
12 | {
13 | background-color: #f8f8f8 !important;
14 | }
15 | @parent @stop
16 |
17 | @section('container')
18 |
19 | @include('w.notification')
20 |
28 |
29 |
33 |
34 |
91 |
92 | @stop
93 |
94 | @section('end')
95 | @parent
96 | {{ script('bootstrap-3-switch') }}
97 |
100 | @stop
101 |
--------------------------------------------------------------------------------
/app/views/admin/user/index.blade.php:
--------------------------------------------------------------------------------
1 | @extends('l.admin', array('active' => $resource))
2 |
3 | @section('title') @parent {{ $resourceName }}管理 @stop
4 |
5 | @section('container')
6 |
7 | @include('w.notification')
8 |
9 |
17 |
18 | {{ Form::open(array('method' => 'get')) }}
19 |
20 |
21 | {{
22 | Form::select(
23 | 'status',
24 | array('all' => '所有', '1' => '管理员', '0' => '普通用户'),
25 | Input::get('status', 'all'),
26 | array('class' => 'form-control input-sm')
27 | )
28 | }}
29 |
30 |
31 | {{
32 | Form::select(
33 | 'target',
34 | array('email' => '邮箱'),
35 | Input::get('target', 'email'),
36 | array('class' => 'form-control input-sm')
37 | )
38 | }}
39 |
40 |
41 |
42 |
43 |
44 |
45 | {{ Form::close() }}
46 |
47 |
48 |
49 |
50 |
51 | 身份 {{ order_by('is_admin') }} |
52 | 邮箱 {{ order_by('email') }} |
53 | 注册时间 {{ order_by('created_at', 'desc') }} |
54 | 最后登录时间 {{ order_by('signin_at') }} |
55 | 操作 |
56 |
57 |
58 |
59 | id; ?>
60 | @foreach ($datas as $data)
61 |
62 | {{ $data->is_admin ? '管理员' : '普通用户' }} |
63 | {{ $data->email }} |
64 | {{ $data->created_at }}({{ $data->friendly_created_at }}) |
65 | {{ $data->signin_at }}({{ $data->friendly_signin_at }}) |
66 |
67 | @if($data->id!=$currentId)
68 | 编辑
69 | 删除
71 | @endif
72 | |
73 |
74 | @endforeach
75 |
76 |
77 |
78 |
79 |
80 | {{ pagination($datas->appends(Input::except('page')), 'p.slider-3') }}
81 |
82 |
83 | 'myModal',
86 | 'title' => '系统提示',
87 | 'message' => '确认删除此'.$resourceName.'?',
88 | 'footer' =>
89 | Form::open(array('id' => 'real-delete', 'method' => 'delete')).'
90 |
91 | '.
92 | Form::close(),
93 | );
94 | ?>
95 | @include('w.modal', $modalData)
96 |
97 | @stop
98 |
99 | @section('end')
100 | @parent
101 |
108 | @stop
109 |
110 |
--------------------------------------------------------------------------------
/app/views/authority/activationSuccess.blade.php:
--------------------------------------------------------------------------------
1 | @extends('l.authority', array('active' => 'signin'))
2 |
3 | @section('title') 激活成功 @parent @stop
4 |
5 | @section('container')
6 |
7 | 账号激活成功
8 |
9 | @stop
10 |
--------------------------------------------------------------------------------
/app/views/authority/email/activation.blade.php:
--------------------------------------------------------------------------------
1 | @extends('l.mail')
2 | @section('container')
3 | 感谢您注册 Simple - Blog,请点击以下链接激活您的账号:
4 |
{{ route('activate', $activationCode) }}
5 |
6 | @stop
--------------------------------------------------------------------------------
/app/views/authority/email/forgotPassword.blade.php:
--------------------------------------------------------------------------------
1 | @extends('l.mail')
2 | @section('container')
3 | 请点击以下链接完成密码重置:
4 |
{{ route('reset', $token) }}
5 |
6 | @stop
--------------------------------------------------------------------------------
/app/views/authority/password/remind.blade.php:
--------------------------------------------------------------------------------
1 | @extends('l.authority', array('active' => 'signin'))
2 |
3 | @section('title') 忘记密码 @parent @stop
4 |
5 | @section('style')
6 | @parent
7 | .center
8 | {
9 | text-align: center;
10 | }
11 | .form-center, .alert-dismissable
12 | {
13 | float: none;
14 | margin: 0 auto;
15 | margin-top: 2em;
16 | }
17 | .input-group
18 | {
19 | margin-top: 2em;
20 | }
21 | @stop
22 |
23 | @section('container')
24 |
25 | {{ Form::open(array('class' => 'col-lg-6 form-center', 'role' => 'form')) }}
26 | 发送密码重置邮件
27 |
28 |
29 |
30 |
31 |
32 |
33 | @if( Session::get('error') )
34 |
35 |
36 | {{ Session::get('error') }}
37 |
38 | @elseif( Session::get('status') )
39 |
40 |
41 | {{ Session::get('status') }}
42 |
43 | @endif
44 | {{ Form::close() }}
45 |
46 | @stop
47 |
--------------------------------------------------------------------------------
/app/views/authority/password/reset.blade.php:
--------------------------------------------------------------------------------
1 | @extends('l.authority', array('active' => 'signin'))
2 |
3 | @section('title') 密码重置 @parent @stop
4 |
5 | @section('style')
6 | @parent
7 | .form-register {
8 | max-width: 330px;
9 | padding: 15px;
10 | margin: 0 auto;
11 | }
12 | .form-register .form-register-heading,
13 | .form-register .checkbox {
14 | margin-bottom: 10px;
15 | }
16 | .form-register .checkbox {
17 | font-weight: normal;
18 | }
19 | .form-register .form-control {
20 | position: relative;
21 | font-size: 16px;
22 | height: auto;
23 | padding: 10px;
24 | -webkit-box-sizing: border-box;
25 | -moz-box-sizing: border-box;
26 | box-sizing: border-box;
27 | }
28 | .form-register input{
29 | margin-top: 10px;
30 | }
31 | .form-register button{
32 | margin-top: 10px;
33 | }
34 | .form-register strong.error{
35 | color: #b94a48;
36 | }
37 | @stop
38 |
39 | @section('container')
40 |
41 | {{ Form::open(array('class' => 'form-register', 'role' => 'form')) }}
42 |
43 |
44 | {{ $errors->first('email', ':message') }}
45 |
46 |
47 |
48 |
49 |
50 |
51 | {{ $errors->first('password', ':message') }}
52 |
53 |
54 | @if( Session::get('error') )
55 |
56 |
57 | {{ Session::get('error') }}
58 |
59 | @endif
60 |
61 | {{ Form::close() }}
62 |
63 | @stop
64 |
65 | @section('end')
66 | @parent
67 |
70 | @stop
71 |
--------------------------------------------------------------------------------
/app/views/authority/signin.blade.php:
--------------------------------------------------------------------------------
1 | @extends('l.authority', array('active' => 'signin'))
2 |
3 | @section('title') 登录 @parent @stop
4 |
5 | @section('style')
6 | @parent
7 | .form-signin {
8 | max-width: 330px;
9 | padding: 15px;
10 | margin: 0 auto;
11 | }
12 | .form-signin .form-signin-heading,
13 | .form-signin .checkbox {
14 | margin-bottom: 10px;
15 | }
16 | .form-signin .checkbox {
17 | font-weight: normal;
18 | }
19 | .form-signin .form-control {
20 | position: relative;
21 | font-size: 16px;
22 | height: auto;
23 | padding: 10px;
24 | -webkit-box-sizing: border-box;
25 | -moz-box-sizing: border-box;
26 | box-sizing: border-box;
27 | }
28 | .form-signin .form-control:focus {
29 | z-index: 2;
30 | }
31 | .form-signin input[type="text"] {
32 | margin-bottom: 10px;
33 | border-bottom-left-radius: 0;
34 | border-bottom-right-radius: 0;
35 | }
36 | .form-signin input[type="password"] {
37 | margin-bottom: 10px;
38 | border-top-left-radius: 0;
39 | border-top-right-radius: 0;
40 | }
41 | @stop
42 |
43 | @section('container')
44 |
45 | {{ Form::open(array('class' => 'form-signin', 'role' => 'form')) }}
46 |
47 |
48 |
49 |
53 |
54 |
55 | {{ $errors->first('attempt') }}
56 |
57 |
58 | {{ Form::close() }}
59 |
60 | @stop
--------------------------------------------------------------------------------
/app/views/authority/signup.blade.php:
--------------------------------------------------------------------------------
1 | @extends('l.authority', array('active' => 'signup'))
2 |
3 | @section('title') 注册 @parent @stop
4 |
5 | @section('style')
6 | @parent
7 | .form-signup {
8 | max-width: 330px;
9 | padding: 15px;
10 | margin: 0 auto;
11 | }
12 | .form-signup .form-signup-heading,
13 | .form-signup .checkbox {
14 | margin-bottom: 10px;
15 | }
16 | .form-signup .checkbox {
17 | font-weight: normal;
18 | }
19 | .form-signup .form-control {
20 | position: relative;
21 | font-size: 16px;
22 | height: auto;
23 | padding: 10px;
24 | -webkit-box-sizing: border-box;
25 | -moz-box-sizing: border-box;
26 | box-sizing: border-box;
27 | }
28 | .form-signup input{
29 | margin-top: 10px;
30 | }
31 | .form-signup button{
32 | margin-top: 10px;
33 | }
34 | .form-signup strong.error{
35 | color: #b94a48;
36 | }
37 | @stop
38 |
39 | @section('container')
40 |
41 | {{ Form::open(array('class' => 'form-signup', 'role' => 'form')) }}
42 |
43 |
44 | {{ $errors->first('email', ':message') }}
45 |
46 |
47 |
48 |
49 |
50 |
51 | {{ $errors->first('password', ':message') }}
52 |
53 |
54 | {{ Form::close() }}
55 |
56 | @stop
57 |
58 |
59 | @section('end')
60 | @parent
61 |
64 | @stop
65 |
--------------------------------------------------------------------------------
/app/views/authority/signupSuccess.blade.php:
--------------------------------------------------------------------------------
1 | @extends('l.authority', array('active' => 'signin'))
2 |
3 | @section('title') 注册成功 @parent @stop
4 |
5 | @section('style')
6 | @parent
7 | .center
8 | {
9 | text-align: center;
10 | }
11 | @stop
12 |
13 | @section('container')
14 |
15 | 请激活您的账号
16 | 激活邮件已发送,请登录您的邮箱({{ $email }})激活账号。
17 |
18 | @stop
19 |
--------------------------------------------------------------------------------
/app/views/blog/categoryArticles.blade.php:
--------------------------------------------------------------------------------
1 | @extends('l.blog', array('active' => 'home'))
2 |
3 | @section('container')
4 |
5 |
6 |
7 |
8 |
9 | @foreach($articles as $article)
10 |
29 | @endforeach
30 |
31 |
32 | {{ pagination($articles, 'p.slider-3') }}
33 |
34 |
35 |
36 |
37 |
38 | @include('w.blogSidebar', array('activeCategory' => $category_id))
39 |
40 |
41 |
42 | @stop
43 |
--------------------------------------------------------------------------------
/app/views/blog/index.blade.php:
--------------------------------------------------------------------------------
1 | @extends('l.blog', array('active' => 'home'))
2 |
3 | @section('container')
4 |
5 |
6 |
7 |
8 |
9 | @foreach($articles as $article)
10 |
29 | @endforeach
30 |
31 |
32 | {{ pagination($articles, 'p.slider-3') }}
33 |
34 |
35 |
36 |
37 |
38 | @include('w.blogSidebar', array('activeCategory' => 'all'))
39 |
40 |
41 |
42 | @stop
43 |
--------------------------------------------------------------------------------
/app/views/blog/show.blade.php:
--------------------------------------------------------------------------------
1 | @extends('l.blog', array('active' => 'home'))
2 |
3 | @section('description'){{ $article->description }} @stop
4 | @section('keywords'){{ $article->keywords }} @stop
5 | @section('title'){{ $article->title }} - @parent @stop
6 |
7 | @section('container')
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
{{ $article->title }}
16 |
17 |
{{ $article->content_html }}
18 |
19 |
20 | {{ $article->created_at }}({{ $article->friendly_created_at }})
21 |
22 |
23 |
24 |
25 |
评论 - {{ $article->comments_count }}
26 |
42 | @include('w.notification')
43 | @if(Auth::check())
44 |
52 | @else
53 |
60 | @endif
61 |
62 |
63 |
64 |
65 |
66 | @include('w.blogSidebar', array('activeCategory' => $article->category->id))
67 |
68 |
69 |
70 | @stop
71 |
--------------------------------------------------------------------------------
/app/views/l/.this.is.layouts.dir:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5-say/laravel-4.1-simple-blog/579606b14d32566413b6a9e701391c5f45b0a7f6/app/views/l/.this.is.layouts.dir
--------------------------------------------------------------------------------
/app/views/l/account.blade.php:
--------------------------------------------------------------------------------
1 | @extends('l.base')
2 |
3 | @section('title') 用户中心 @parent @stop
4 |
5 | @section('beforeStyle')
6 | {{ style('bootstrap-3.0.3') }}
7 | @parent @stop
8 |
9 | @section('style')
10 | body
11 | {
12 | padding-bottom: 0;
13 | background-color: #f3f3ff;
14 | }
15 | @parent @stop
16 |
17 | @section('body')
18 |
19 | @include('w.accountNavbar')
20 |
21 |
22 | @yield('container')
23 |
24 |
25 | @stop
26 |
27 | @section('end')
28 | {{ script('jquery-1.10.2', 'bootstrap-3.0.3') }}
29 | @parent @stop
30 |
--------------------------------------------------------------------------------
/app/views/l/admin.blade.php:
--------------------------------------------------------------------------------
1 | @extends('l.base')
2 |
3 | @section('title') 后台 @parent @stop
4 |
5 | @section('beforeStyle')
6 | {{ style('bootstrap-3.0.3') }}
7 | @parent @stop
8 |
9 | @section('style')
10 | body
11 | {
12 | padding-bottom: 0;
13 | background-color: #f3f3ff;
14 | }
15 | @parent @stop
16 |
17 | @section('body')
18 |
19 | @include('w.adminNavbar')
20 |
21 |
22 | @yield('container')
23 |
24 |
25 | @stop
26 |
27 |
28 | @section('end')
29 | {{ script('jquery-1.10.2', 'bootstrap-3.0.3') }}
30 | @parent @stop
31 |
--------------------------------------------------------------------------------
/app/views/l/authority.blade.php:
--------------------------------------------------------------------------------
1 | @extends('l.base')
2 |
3 | @section('title') Simple - Blog @parent @stop
4 |
5 | @section('beforeStyle')
6 | {{ style('bootstrap-3.0.3') }}
7 | @parent @stop
8 |
9 | @section('style')
10 | body
11 | {
12 | padding-bottom: 0;
13 | background-color: #f3f3ff;
14 | }
15 | @parent @stop
16 |
17 | @section('body')
18 |
19 | @include('w.blogNavbar')
20 |
21 |
22 | @yield('container')
23 |
24 |
25 | @stop
26 |
27 | @section('end')
28 | {{ script('jquery-1.10.2', 'bootstrap-3.0.3') }}
29 | @parent @stop
30 |
--------------------------------------------------------------------------------
/app/views/l/base.blade.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 | @section('title')
11 | @show{{-- 页面标题 --}}
12 |
13 | {{-- 页面描述 --}}
14 | {{-- 页面关键词 --}}
15 |
16 |
19 | @section('beforeStyle')
20 | @show{{-- 页面内联样式之前 --}}
21 |
30 | @section('afterStyle')
31 | @show{{-- 页面内联样式之后 --}}
32 |
33 |
34 |
35 |
36 | @yield('body')
37 |
38 | @section('end')
39 | @show{{-- 页面主体之后 --}}
40 |
41 |
42 |
43 |
--------------------------------------------------------------------------------
/app/views/l/blog.blade.php:
--------------------------------------------------------------------------------
1 | @extends('l.base')
2 |
3 | @section('title') Simple - Blog @parent @stop
4 |
5 | @section('beforeStyle')
6 | {{ style('bootstrap-3.0.3') }}
7 | @parent @stop
8 |
9 | @section('style')
10 | body
11 | {
12 | padding-bottom: 0;
13 | background-color: #f3f3ff;
14 | }
15 | @parent @stop
16 |
17 | @section('body')
18 |
19 | @include('w.blogNavbar')
20 |
21 |
22 | @yield('container')
23 |
24 |
25 | @stop
26 |
27 | @section('end')
28 | {{ script('jquery-1.10.2', 'bootstrap-3.0.3') }}
29 | @parent @stop
30 |
--------------------------------------------------------------------------------
/app/views/l/mail.blade.php:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
尊敬的用户:
7 |
您好!
8 | @yield('container')
9 |
Simple - Blog 运营团队
10 |
11 |
系统发信,请勿回复。
12 |
13 |
--------------------------------------------------------------------------------
/app/views/l/system.blade.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {{Config::get('extend.webSiteName')}}--@yield('title')
6 |
80 |
81 |
82 |
83 | @yield('container')
84 |
85 |
86 |
87 |
--------------------------------------------------------------------------------
/app/views/p/.this.is.pagination.dir:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5-say/laravel-4.1-simple-blog/579606b14d32566413b6a9e701391c5f45b0a7f6/app/views/p/.this.is.pagination.dir
--------------------------------------------------------------------------------
/app/views/p/simple.blade.php:
--------------------------------------------------------------------------------
1 |
2 |
3 | @if($paginator->getLastPage()>1)
4 |
8 | @endif
9 |
--------------------------------------------------------------------------------
/app/views/p/slider-3.blade.php:
--------------------------------------------------------------------------------
1 |
4 |
5 |
8 |
--------------------------------------------------------------------------------
/app/views/p/slider.php:
--------------------------------------------------------------------------------
1 |
4 |
5 | getLastPage() > 1): ?>
6 |
11 |
--------------------------------------------------------------------------------
/app/views/system/.this.is.systems.dir:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5-say/laravel-4.1-simple-blog/579606b14d32566413b6a9e701391c5f45b0a7f6/app/views/system/.this.is.systems.dir
--------------------------------------------------------------------------------
/app/views/system/down.blade.php:
--------------------------------------------------------------------------------
1 | @extends('l.system')
2 | @section('title')503 @stop
3 |
4 | @section('container')
5 | 503 !
6 | 服务器维护中,请稍后再试。
7 | @stop
--------------------------------------------------------------------------------
/app/views/system/error.blade.php:
--------------------------------------------------------------------------------
1 | @extends('l.system')
2 | @section('title')500 @stop
3 |
4 | @section('container')
5 | 500 !
6 | 服务器内部错误。
7 | @stop
--------------------------------------------------------------------------------
/app/views/system/missing.blade.php:
--------------------------------------------------------------------------------
1 | @extends('l.system')
2 | @section('title')404 @stop
3 |
4 | @section('container')
5 | 404 !
6 | 抱歉,您请求的页面不存在。
7 | 可能是以下原因:
8 |
9 | - 您输入了一个错误的地址
10 | - 这是一个过时的链接
11 |
12 | @include('w.googleSearch')
13 | @stop
14 |
--------------------------------------------------------------------------------
/app/views/w/.this.is.widgets.dir:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5-say/laravel-4.1-simple-blog/579606b14d32566413b6a9e701391c5f45b0a7f6/app/views/w/.this.is.widgets.dir
--------------------------------------------------------------------------------
/app/views/w/accountNavbar.blade.php:
--------------------------------------------------------------------------------
1 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/app/views/w/adminNavbar.blade.php:
--------------------------------------------------------------------------------
1 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/app/views/w/blogNavbar.blade.php:
--------------------------------------------------------------------------------
1 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/app/views/w/blogSidebar.blade.php:
--------------------------------------------------------------------------------
1 | @section('style')
2 | @parent
3 | /*
4 | * 侧边栏切换样式支持
5 | * --------------------------------------------------
6 | */
7 | @media screen and (max-width: 767px) {
8 | .row-offcanvas {
9 | position: relative;
10 | -webkit-transition: all 0.25s ease-out;
11 | -moz-transition: all 0.25s ease-out;
12 | transition: all 0.25s ease-out;
13 | }
14 |
15 | .row-offcanvas-right
16 | .sidebar-offcanvas {
17 | right: -50%; /* 6 columns */
18 | }
19 |
20 | .row-offcanvas-left
21 | .sidebar-offcanvas {
22 | left: -50%; /* 6 columns */
23 | }
24 |
25 | .row-offcanvas-right.active {
26 | right: 50%; /* 6 columns */
27 | }
28 |
29 | .row-offcanvas-left.active {
30 | left: 50%; /* 6 columns */
31 | }
32 |
33 | .sidebar-offcanvas {
34 | position: absolute;
35 | top: 0;
36 | width: 50%; /* 6 columns */
37 | }
38 | }
39 | @stop
40 |
41 |
50 |
51 |
63 |
64 | @section('end')
65 | @parent
66 |
73 | @stop
--------------------------------------------------------------------------------
/app/views/w/googleAnalytics.blade.php:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/app/views/w/googleSearch.blade.php:
--------------------------------------------------------------------------------
1 | @section('style')
2 | /* google search */
3 |
4 | #goog-fixurl ul {
5 | list-style: none;
6 | padding: 0;
7 | margin: 0;
8 | }
9 |
10 | #goog-fixurl form {
11 | margin: 0;
12 | }
13 |
14 | #goog-wm-qt,
15 | #goog-wm-sb {
16 | border: 1px solid #bbb;
17 | font-size: 16px;
18 | line-height: normal;
19 | vertical-align: top;
20 | color: #444;
21 | border-radius: 2px;
22 | }
23 |
24 | #goog-wm-qt {
25 | width: 220px;
26 | height: 20px;
27 | padding: 5px;
28 | margin: 5px 10px 0 0;
29 | box-shadow: inset 0 1px 1px #ccc;
30 | }
31 |
32 | #goog-wm-sb {
33 | display: inline-block;
34 | height: 32px;
35 | padding: 0 10px;
36 | margin: 5px 0 0;
37 | white-space: nowrap;
38 | cursor: pointer;
39 | background-color: #f5f5f5;
40 | background-image: -webkit-linear-gradient(rgba(255,255,255,0), #f1f1f1);
41 | background-image: -moz-linear-gradient(rgba(255,255,255,0), #f1f1f1);
42 | background-image: -ms-linear-gradient(rgba(255,255,255,0), #f1f1f1);
43 | background-image: -o-linear-gradient(rgba(255,255,255,0), #f1f1f1);
44 | -webkit-appearance: none;
45 | -moz-appearance: none;
46 | appearance: none;
47 | *overflow: visible;
48 | *display: inline;
49 | *zoom: 1;
50 | }
51 |
52 | #goog-wm-sb:hover,
53 | #goog-wm-sb:focus {
54 | border-color: #aaa;
55 | box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
56 | background-color: #f8f8f8;
57 | }
58 |
59 | #goog-wm-qt:hover,
60 | #goog-wm-qt:focus {
61 | border-color: #105cb6;
62 | outline: 0;
63 | color: #222;
64 | }
65 | @parent @stop
66 |
67 |
71 |
--------------------------------------------------------------------------------
/app/views/w/killIE6.blade.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/app/views/w/modal.blade.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
9 |
10 | {{ $modal['message'] }}
11 |
12 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/app/views/w/notification.blade.php:
--------------------------------------------------------------------------------
1 | @if ($message = Session::get('success'))
2 |
3 |
4 | {{ $message }}
5 |
6 | @endif
7 |
8 | @if ($message = Session::get('error'))
9 |
10 |
11 | {{ $message }}
12 |
13 | @endif
14 |
15 | @if ($message = Session::get('warning'))
16 |
17 |
18 | {{ $message }}
19 |
20 | @endif
21 |
22 | @if ($message = Session::get('info'))
23 |
24 |
25 | {{ $message }}
26 |
27 | @endif
28 |
--------------------------------------------------------------------------------
/artisan:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env php
2 | setRequestForConsoleEnvironment();
45 |
46 | $artisan = Illuminate\Console\Application::start($app);
47 |
48 | /*
49 | |--------------------------------------------------------------------------
50 | | Run The Artisan Application
51 | |--------------------------------------------------------------------------
52 | |
53 | | When we run the console application, the current CLI command will be
54 | | executed in this console and the response sent back to a terminal
55 | | or another output device for the developers. Here goes nothing!
56 | |
57 | */
58 |
59 | $status = $artisan->run();
60 |
61 | /*
62 | |--------------------------------------------------------------------------
63 | | Shutdown The Application
64 | |--------------------------------------------------------------------------
65 | |
66 | | Once Artisan has finished running. We will fire off the shutdown events
67 | | so that any final work may be done by the application before we shut
68 | | down the process. This is the last thing to happen to the request.
69 | |
70 | */
71 |
72 | $app->shutdown();
73 |
74 | exit($status);
--------------------------------------------------------------------------------
/bootstrap/autoload.php:
--------------------------------------------------------------------------------
1 | __DIR__.'/../app',
17 |
18 | /*
19 | |--------------------------------------------------------------------------
20 | | Public Path
21 | |--------------------------------------------------------------------------
22 | |
23 | | The public path contains the assets for your web application, such as
24 | | your JavaScript and CSS files, and also contains the primary entry
25 | | point for web requests into these applications from the outside.
26 | |
27 | */
28 |
29 | 'public' => __DIR__.'/../public',
30 |
31 | /*
32 | |--------------------------------------------------------------------------
33 | | Base Path
34 | |--------------------------------------------------------------------------
35 | |
36 | | The base path is the root of the Laravel installation. Most likely you
37 | | will not need to change this value. But, if for some wild reason it
38 | | is necessary you will do so here, just proceed with some caution.
39 | |
40 | */
41 |
42 | 'base' => __DIR__.'/..',
43 |
44 | /*
45 | |--------------------------------------------------------------------------
46 | | Storage Path
47 | |--------------------------------------------------------------------------
48 | |
49 | | The storage path is used by Laravel to store cached Blade views, logs
50 | | and other pieces of information. You may modify the path here when
51 | | you want to change the location of this directory for your apps.
52 | |
53 | */
54 |
55 | 'storage' => __DIR__.'/../app/storage',
56 |
57 | );
58 |
--------------------------------------------------------------------------------
/bootstrap/start.php:
--------------------------------------------------------------------------------
1 | detectEnvironment(array(
28 |
29 | 'local' => array('your-machine-name'),
30 |
31 | ));
32 |
33 | /*
34 | |--------------------------------------------------------------------------
35 | | Bind Paths
36 | |--------------------------------------------------------------------------
37 | |
38 | | Here we are binding the paths configured in paths.php to the app. You
39 | | should not be changing these here. If you need to change these you
40 | | may do so within the paths.php file and they will be bound here.
41 | |
42 | */
43 |
44 | $app->bindInstallPaths(require __DIR__.'/paths.php');
45 |
46 | /*
47 | |--------------------------------------------------------------------------
48 | | Load The Application
49 | |--------------------------------------------------------------------------
50 | |
51 | | Here we will load this Illuminate application. We will keep this in a
52 | | separate location so we can isolate the creation of an application
53 | | from the actual running of the application with a given request.
54 | |
55 | */
56 |
57 | $framework = $app['path.base'].
58 | '/vendor/laravel/framework/src';
59 |
60 | require $framework.'/Illuminate/Foundation/start.php';
61 |
62 | /*
63 | |--------------------------------------------------------------------------
64 | | Return The Application
65 | |--------------------------------------------------------------------------
66 | |
67 | | This script returns the application instance. The instance is given to
68 | | the calling script so we can separate the building of the instances
69 | | from the actual running of the application and sending responses.
70 | |
71 | */
72 |
73 | return $app;
74 |
--------------------------------------------------------------------------------
/change-db.md:
--------------------------------------------------------------------------------
1 | # 将项目数据库依赖变更为其它数据库的方法
2 |
3 | > 2014-09-09 为避免对新人产生错误引导,移除开发辅助工具(不规范),采用常规化的迁移与填充流程。
4 |
5 | ## 详细步骤(下面以 mysql 为例)
6 |
7 | 1、修改数据库配置文件 `/app/config/database.php` 29 行。
8 |
9 | ```php
10 | // 'default' => 'sqlite',
11 | 'default' => 'mysql',
12 | ```
13 |
14 | > 注意:55 行开始的 mysql 连接配置,请根据自己的需要修改
15 |
16 | ```php
17 | 'mysql' => array(
18 | 'driver' => 'mysql',
19 | 'host' => 'localhost',
20 | 'database' => 'laravel-4.1-simple-blog',
21 | 'username' => 'root',
22 | 'password' => '',
23 | 'charset' => 'utf8',
24 | // 'collation' => 'utf8_unicode_ci',
25 | 'collation' => 'utf8_general_ci',
26 | 'prefix' => 'l4_',
27 | ),
28 | ```
29 |
30 | 2、执行 `php artisan migrate` 命令完成数据库的迁移(含基础数据)
31 |
32 | > 以下为反馈信息
33 |
34 | ```
35 | Migration table created successfully.
36 | Migrated: 2014_09_09_135540_create_authority_tables
37 | Migrated: 2014_09_09_141726_create_blog_tables
38 | [Finished in 5.2s]
39 | ```
40 |
41 | 3、执行 `php artisan db:seed` 命令完成测试数据填充
42 |
43 | > 以下为反馈信息
44 |
45 | ```
46 | 测试用户数据填充完毕
47 | Seeded: AuthorityTablesSeeder
48 | 测试分类数据填充完毕
49 | 随机文章数据填充完毕
50 | PSR 系列文章数据填充完毕
51 | 随机评论数据填充完毕
52 | Seeded: BlogTablesSeeder
53 | [Finished in 38.9s]
54 | ```
55 |
56 | > 注意:由于迁移文件是 UTF-8 格式,因此在 Win 下执行的话,以上信息的中文部分会显示为乱码,但并不影响正常使用。
--------------------------------------------------------------------------------
/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "five-say/laravel-4.1-simple-blog",
3 | "description": "laravel-4.1-simple-blog.",
4 | "keywords": ["blog", "laravel"],
5 | "license": "MIT",
6 | "require": {
7 | "laravel/framework": "4.1.*",
8 | "five-say/laravel-route-group": "1.*",
9 | "five-say/laravel-schema-extend": "1.*",
10 | "intervention/image": "2.*",
11 | "yzalis/identicon": "1.*",
12 | "michelf/php-markdown": "1.4.0",
13 | "nickcernis/html-to-markdown": "dev-master"
14 | },
15 | "require-dev": {
16 | "barryvdh/laravel-debugbar": "1.*",
17 | "raveren/kint": "v0.9"
18 | },
19 | "autoload": {
20 | "classmap": [
21 | "app/commands",
22 | "app/controllers",
23 | "app/models",
24 | "app/database/migrations",
25 | "app/database/seeds",
26 | "app/tests/TestCase.php"
27 | ]
28 | },
29 | "scripts": {
30 | "post-install-cmd": [
31 | "php artisan clear-compiled",
32 | "php artisan optimize"
33 | ],
34 | "post-update-cmd": [
35 | "php artisan clear-compiled",
36 | "php artisan optimize",
37 | "php artisan debugbar:publish"
38 | ],
39 | "post-create-project-cmd": [
40 | "php artisan key:generate"
41 | ]
42 | },
43 | "config": {
44 | "preferred-install": "dist"
45 | },
46 | "minimum-stability": "stable"
47 | }
48 |
--------------------------------------------------------------------------------
/phpunit.xml:
--------------------------------------------------------------------------------
1 |
2 |
13 |
14 |
15 | ./app/tests/
16 |
17 |
18 |
--------------------------------------------------------------------------------
/public/.htaccess:
--------------------------------------------------------------------------------
1 |
2 |
3 | Options -MultiViews
4 |
5 |
6 | RewriteEngine On
7 |
8 | # Redirect Trailing Slashes...
9 | RewriteRule ^(.*)/$ /$1 [L,R=301]
10 |
11 | # Handle Front Controller...
12 | RewriteCond %{REQUEST_FILENAME} !-d
13 | RewriteCond %{REQUEST_FILENAME} !-f
14 | RewriteRule ^ index.php [L]
15 |
16 |
--------------------------------------------------------------------------------
/public/assets/bootstrap-2.3.2/img/glyphicons-halflings-white.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5-say/laravel-4.1-simple-blog/579606b14d32566413b6a9e701391c5f45b0a7f6/public/assets/bootstrap-2.3.2/img/glyphicons-halflings-white.png
--------------------------------------------------------------------------------
/public/assets/bootstrap-2.3.2/img/glyphicons-halflings.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5-say/laravel-4.1-simple-blog/579606b14d32566413b6a9e701391c5f45b0a7f6/public/assets/bootstrap-2.3.2/img/glyphicons-halflings.png
--------------------------------------------------------------------------------
/public/assets/bootstrap-3.0.3/fonts/glyphicons-halflings-regular.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5-say/laravel-4.1-simple-blog/579606b14d32566413b6a9e701391c5f45b0a7f6/public/assets/bootstrap-3.0.3/fonts/glyphicons-halflings-regular.eot
--------------------------------------------------------------------------------
/public/assets/bootstrap-3.0.3/fonts/glyphicons-halflings-regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5-say/laravel-4.1-simple-blog/579606b14d32566413b6a9e701391c5f45b0a7f6/public/assets/bootstrap-3.0.3/fonts/glyphicons-halflings-regular.ttf
--------------------------------------------------------------------------------
/public/assets/bootstrap-3.0.3/fonts/glyphicons-halflings-regular.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5-say/laravel-4.1-simple-blog/579606b14d32566413b6a9e701391c5f45b0a7f6/public/assets/bootstrap-3.0.3/fonts/glyphicons-halflings-regular.woff
--------------------------------------------------------------------------------
/public/assets/bootstrap-markdown/README.md:
--------------------------------------------------------------------------------
1 | ## Bootstrap Markdown
2 |
3 | Markdown editing meet Bootstrap.
4 |
5 | | Version | Compatibility with Bootstrap |
6 | | :---: | :---: |
7 | | Bootstrap Markdown v2.x | **only** compatible with Bootstrap 3.x |
8 | | Bootstrap Markdown v1.x | **only** compatible with Bootstrap 2.x |
9 |
10 | Demo and documentation on [http://toopay.github.com/bootstrap-markdown/](http://toopay.github.com/bootstrap-markdown/)
11 |
12 | ### LICENSE
13 |
14 | > Copyright 2013 Taufan Aditya
15 | >
16 | > Licensed under the Apache License, Version 2.0 (the "License");
17 | > you may not use this file except in compliance with the License.
18 | > You may obtain a copy of the License at
19 | >
20 | > http://www.apache.org/licenses/LICENSE-2.0
21 | >
22 | > Unless required by applicable law or agreed to in writing, software
23 | > distributed under the License is distributed on an "AS IS" BASIS,
24 | > WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
25 | > See the License for the specific language governing permissions and
26 | > limitations under the License.
--------------------------------------------------------------------------------
/public/assets/bootstrap-markdown/bower.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "bootstrap-markdown",
3 | "version": "2.2.1",
4 | "main": ["./js/bootstrap-markdown.js", "./css/bootstrap-markdown.min.css"],
5 | "dependencies": {
6 | "bootstrap": "~3.0.0"
7 | },
8 | "devDependencies": {
9 | "markdown":"~0.4.0"
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/public/assets/bootstrap-markdown/css/bootstrap-markdown.min.css:
--------------------------------------------------------------------------------
1 | .md-editor{display:block;border:1px solid #ddd}.md-editor>.md-header,.md-editor .md-footer{display:block;padding:6px 4px;background:#fff}.md-editor>.md-preview{background:#fff;border-top:1px dashed #ddd;border-bottom:1px dashed #ddd;min-height:10px}.md-editor>textarea{font-family:Monaco,Menlo,Consolas,"Courier New",monospace;font-size:14px;outline:0;outline:thin dotted \9;margin:0;display:block;padding:0;width:100%;border:0;border-top:1px dashed #ddd;border-bottom:1px dashed #ddd;border-radius:0;box-shadow:none;background:#eee}.md-editor>textarea:focus{box-shadow:none;background:#fff}.md-editor.active{border-color:#66afe9;outline:0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,0.6);box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,0.6)}
--------------------------------------------------------------------------------
/public/assets/bootstrap-markdown/less/bootstrap-markdown.less:
--------------------------------------------------------------------------------
1 | /**
2 | * Bootstrap-Markdown.less
3 | *
4 | * @author Taufan Aditya @taufanaditya
5 | * @copyright 2013 Taufan Aditya
6 | */
7 |
8 | @import "variables.less"; // Point this into your bootstrap variables
9 | @import "mixins.less"; // Point this into your bootstrap variables
10 |
11 | .md-editor {
12 | display: block;
13 | border: 1px solid @table-border-color;
14 |
15 | > .md-header, .md-footer {
16 | display: block;
17 | padding: 6px 4px;
18 | background: @panel-default-heading-bg;
19 | }
20 |
21 | > .md-preview {
22 | background: @panel-bg;
23 | border-top: 1px dashed @table-border-color;
24 | border-bottom: 1px dashed @table-border-color;
25 | min-height: 10px;
26 | }
27 |
28 | > textarea {
29 | font-family: @font-family-monospace;
30 | font-size: @font-size-base;
31 | outline: 0;
32 | outline: thin dotted \9; /* IE6-9 */
33 | margin: 0;
34 | display: block;
35 | padding: 0;
36 | width: 100%;
37 | border: 0;
38 | border-top: 1px dashed @table-border-color;
39 | border-bottom: 1px dashed @table-border-color;
40 | border-radius: 0;
41 | box-shadow: none;
42 | background: @input-bg-disabled;
43 | &:focus {
44 | box-shadow: none;
45 | background: @input-bg;
46 | }
47 | }
48 |
49 | // Hover state
50 | @color: @input-border-focus;
51 | @color-rgba: rgba(red(@color), green(@color), blue(@color), .6);
52 | &.active {
53 | border-color: @color;
54 | outline: 0;
55 | .box-shadow(~"inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px @{color-rgba}");
56 | }
57 | }
58 |
--------------------------------------------------------------------------------
/public/assets/bootstrap-markdown/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "bootstrap-markdown",
3 | "filename": "js/bootstrap-markdown.js",
4 | "version": "2.2.1",
5 | "description": "A bootstrap plugin for markdown editing",
6 | "homepage": "https://github.com/toopay/bootstrap-markdown",
7 | "keywords": [
8 | "twitter",
9 | "bootstrap",
10 | "markdown",
11 | "editor"
12 | ],
13 | "maintainers": [{
14 | "name": "Taufan Aditya",
15 | "web": "https://github.com/toopay"
16 | }],
17 | "repositories": [{
18 | "type": "git",
19 | "url": "https://github.com/toopay/bootstrap-markdown.git"
20 | }]
21 | }
22 |
--------------------------------------------------------------------------------
/public/assets/bootstrap-switch/css/bootstrap3/bootstrap-switch.min.css:
--------------------------------------------------------------------------------
1 | /* ========================================================================
2 | * bootstrap-switch - v2.0.1
3 | * http://www.bootstrap-switch.org
4 | * ========================================================================
5 | * Copyright 2012-2013 Mattia Larentis
6 | *
7 | * ========================================================================
8 | * Licensed under the Apache License, Version 2.0 (the "License");
9 | * you may not use this file except in compliance with the License.
10 | * You may obtain a copy of the License at
11 | *
12 | * http://www.apache.org/licenses/LICENSE-2.0
13 | *
14 | * Unless required by applicable law or agreed to in writing, software
15 | * distributed under the License is distributed on an "AS IS" BASIS,
16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | * See the License for the specific language governing permissions and
18 | * limitations under the License.
19 | * ========================================================================
20 | */
21 |
22 | .has-switch{display:inline-block;cursor:pointer;border-radius:4px;border:1px solid;border-color:#ccc;position:relative;text-align:left;overflow:hidden;line-height:8px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;vertical-align:middle;min-width:100px;-webkit-transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s}.has-switch:focus{border-color:#66afe9;outline:0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}.has-switch.switch-mini{min-width:72px}.has-switch.switch-mini label,.has-switch.switch-mini span{padding-bottom:4px;padding-top:4px;font-size:10px;line-height:9px}.has-switch.switch-mini i.switch-mini-icons{height:1.2em;line-height:9px;vertical-align:text-top;text-align:center;transform:scale(0.6);margin-top:-1px;margin-bottom:-1px}.has-switch.switch-small{min-width:80px}.has-switch.switch-small label,.has-switch.switch-small span{padding-bottom:3px;padding-top:3px;font-size:12px;line-height:18px}.has-switch.switch-large{min-width:120px}.has-switch.switch-large label,.has-switch.switch-large span{padding-bottom:9px;padding-top:9px;font-size:16px;line-height:normal}.has-switch.switch-animate>div{-webkit-transition:left .5s;transition:left .5s}.has-switch.switch-off>div{left:-50%}.has-switch.switch-on>div{left:0}.has-switch.disabled{opacity:.5;filter:alpha(opacity=50);cursor:default!important}.has-switch.disabled label,.has-switch.disabled span{cursor:default!important}.has-switch>div{display:inline-block;width:150%;position:relative;top:0;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.has-switch input[type=checkbox],.has-switch input[type=radio]{display:none}.has-switch label,.has-switch span{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;cursor:pointer;position:relative;display:inline-block!important;height:100%;padding-bottom:4px;padding-top:4px;font-size:14px;line-height:20px}.has-switch label{text-align:center;margin-top:-1px;margin-bottom:-1px;z-index:100;width:33.333333333%;background:#fff}.has-switch label i{color:#000;text-shadow:0 1px 0 #fff;line-height:18px;pointer-events:none}.has-switch span{text-align:center;z-index:1;width:33.333333333%}.has-switch span.switch-left{border-bottom-left-radius:4px;border-top-left-radius:4px}.has-switch span.switch-right{color:#000;background:#eee}.has-switch span.switch-left,.has-switch span.switch-primary{color:#fff;background:#428bca}.has-switch span.switch-info{color:#fff;background:#5bc0de}.has-switch span.switch-success{color:#fff;background:#5cb85c}.has-switch span.switch-warning{background:#f0ad4e;color:#fff}.has-switch span.switch-danger{color:#fff;background:#d9534f}.has-switch span.switch-default{color:#000;background:#eee}
--------------------------------------------------------------------------------
/public/assets/css/main.css:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5-say/laravel-4.1-simple-blog/579606b14d32566413b6a9e701391c5f45b0a7f6/public/assets/css/main.css
--------------------------------------------------------------------------------
/public/assets/img/.gitignore:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5-say/laravel-4.1-simple-blog/579606b14d32566413b6a9e701391c5f45b0a7f6/public/assets/img/.gitignore
--------------------------------------------------------------------------------
/public/assets/img/5-say-modules.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5-say/laravel-4.1-simple-blog/579606b14d32566413b6a9e701391c5f45b0a7f6/public/assets/img/5-say-modules.jpg
--------------------------------------------------------------------------------
/public/assets/js/main.js:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/public/assets/js/plugins.js:
--------------------------------------------------------------------------------
1 | // Avoid `console` errors in browsers that lack a console.
2 | (function() {
3 | var method;
4 | var noop = function () {};
5 | var methods = [
6 | 'assert', 'clear', 'count', 'debug', 'dir', 'dirxml', 'error',
7 | 'exception', 'group', 'groupCollapsed', 'groupEnd', 'info', 'log',
8 | 'markTimeline', 'profile', 'profileEnd', 'table', 'time', 'timeEnd',
9 | 'timeStamp', 'trace', 'warn'
10 | ];
11 | var length = methods.length;
12 | var console = (window.console = window.console || {});
13 |
14 | while (length--) {
15 | method = methods[length];
16 |
17 | // Only stub undefined methods.
18 | if (!console[method]) {
19 | console[method] = noop;
20 | }
21 | }
22 | }());
23 |
24 | // Place any jQuery/helper plugins in here.
25 |
--------------------------------------------------------------------------------
/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5-say/laravel-4.1-simple-blog/579606b14d32566413b6a9e701391c5f45b0a7f6/public/favicon.ico
--------------------------------------------------------------------------------
/public/index.php:
--------------------------------------------------------------------------------
1 |
7 | */
8 |
9 | /*
10 | |--------------------------------------------------------------------------
11 | | Register The Auto Loader
12 | |--------------------------------------------------------------------------
13 | |
14 | | Composer provides a convenient, automatically generated class loader
15 | | for our application. We just need to utilize it! We'll require it
16 | | into the script here so that we do not have to worry about the
17 | | loading of any our classes "manually". Feels great to relax.
18 | |
19 | */
20 |
21 | require __DIR__.'/../bootstrap/autoload.php';
22 |
23 | /*
24 | |--------------------------------------------------------------------------
25 | | Turn On The Lights
26 | |--------------------------------------------------------------------------
27 | |
28 | | We need to illuminate PHP development, so let's turn on the lights.
29 | | This bootstraps the framework and gets it ready for use, then it
30 | | will load up this application so that we can run it and send
31 | | the responses back to the browser and delight these users.
32 | |
33 | */
34 |
35 | $app = require_once __DIR__.'/../bootstrap/start.php';
36 |
37 | /*
38 | |--------------------------------------------------------------------------
39 | | Run The Application
40 | |--------------------------------------------------------------------------
41 | |
42 | | Once we have the application, we can simply call the run method,
43 | | which will execute the request and send the response back to
44 | | the client's browser allowing them to enjoy the creative
45 | | and wonderful application we have whipped up for them.
46 | |
47 | */
48 |
49 | $app->run();
50 |
--------------------------------------------------------------------------------
/public/packages/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5-say/laravel-4.1-simple-blog/579606b14d32566413b6a9e701391c5f45b0a7f6/public/packages/.gitkeep
--------------------------------------------------------------------------------
/public/packages/barryvdh/laravel-debugbar/icons.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5-say/laravel-4.1-simple-blog/579606b14d32566413b6a9e701391c5f45b0a7f6/public/packages/barryvdh/laravel-debugbar/icons.png
--------------------------------------------------------------------------------
/public/packages/barryvdh/laravel-debugbar/laravel-debugbar.css:
--------------------------------------------------------------------------------
1 | div.phpdebugbar {
2 | font-size: 13px;
3 | font-family: "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Geneva, Verdana, sans-serif;
4 | }
5 |
6 | div.phpdebugbar-header, div.phpdebugbar-openhandler-header {
7 | background: #efefef url(laravel-icon.png) no-repeat 4px 3px;
8 | background-size: 20px;
9 | line-height: 17px;
10 | }
11 | a.phpdebugbar-restore-btn {
12 | background: #efefef url(laravel-icon.png) no-repeat 5px 3px;
13 | background-size: 20px;
14 | width: 16px;
15 | border-right-color: #ccc;
16 | }
17 |
18 | div.phpdebugbar-header > div > * {
19 | font-size: 13px;
20 | }
21 |
22 | div.phpdebugbar-header .phpdebugbar-tab {
23 | padding: 5px 6px;
24 | }
25 |
26 | div.phpdebugbar .phpdebugbar-header select{
27 | padding: 1px 0;
28 | }
29 |
30 | dl.phpdebugbar-widgets-kvlist dt{
31 | width: 200px;
32 | }
33 |
34 | dl.phpdebugbar-widgets-kvlist dd {
35 | margin-left: 210px;
36 | }
37 |
38 | ul.phpdebugbar-widgets-timeline li span.phpdebugbar-widgets-value {
39 | height: 20px;
40 | top: 0;
41 | background-color: #f4645f;
42 | }
43 |
44 | ul.phpdebugbar-widgets-timeline li span.phpdebugbar-widgets-label {
45 | top: 2px;
46 | }
47 |
48 | div.phpdebugbar-widgets-messages div.phpdebugbar-widgets-toolbar a.phpdebugbar-widgets-filter {
49 | background-color: #f4645f;
50 | }
51 |
52 | a.phpdebugbar-tab.phpdebugbar-active {
53 | background: #f4645f;
54 | color: #fff;
55 | }
56 |
57 | a.phpdebugbar-tab.phpdebugbar-active span.phpdebugbar-badge {
58 | background-color: white;
59 | color: #f4645f;
60 | }
61 |
62 | a.phpdebugbar-tab span.phpdebugbar-badge {
63 | background: #f4645f;
64 | color: #fff;
65 | }
66 |
67 | div.phpdebugbar-openhandler .phpdebugbar-openhandler-header {
68 | background: #efefef url(laravel-icon.png) no-repeat 4px 3px;
69 | background-size: 20px;
70 | }
71 |
72 | div.phpdebugbar-openhandler table{
73 | table-layout: fixed;
74 | }
75 |
76 | div.phpdebugbar-openhandler table td, div.phpdebugbar-openhandler table th{
77 | text-align: left;
78 | }
79 |
80 | div.phpdebugbar-openhandler table td a{
81 | display: block;
82 | white-space: nowrap;
83 | overflow: hidden;
84 | text-overflow: ellipsis;
85 | }
86 |
--------------------------------------------------------------------------------
/public/packages/barryvdh/laravel-debugbar/laravel-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5-say/laravel-4.1-simple-blog/579606b14d32566413b6a9e701391c5f45b0a7f6/public/packages/barryvdh/laravel-debugbar/laravel-icon.png
--------------------------------------------------------------------------------
/public/packages/barryvdh/laravel-debugbar/openhandler.css:
--------------------------------------------------------------------------------
1 | div.phpdebugbar-openhandler-overlay {
2 | position: fixed;
3 | left: 0;
4 | top: 0;
5 | width: 100%;
6 | height: 100%;
7 | background: #000;
8 | opacity: .3;
9 | z-index: 20000;
10 | }
11 |
12 | div.phpdebugbar-openhandler {
13 | position: fixed;
14 | margin: auto;
15 | top: 0;
16 | bottom: 0;
17 | left: 0;
18 | right: 0;
19 | width: 70%;
20 | height: 70%;
21 | background: #fff;
22 | border: 2px solid #888;
23 | overflow: auto;
24 | z-index: 20001;
25 | font-family: arial;
26 | font-size: 14px;
27 | padding-bottom: 10px;
28 | }
29 | div.phpdebugbar-openhandler .phpdebugbar-openhandler-header {
30 | background: #efefef url(php-icon.png) no-repeat 5px 4px;
31 | padding-left: 29px;
32 | min-height: 26px;
33 | line-height: 25px;
34 | color: #555;
35 | margin-bottom: 10px;
36 | }
37 | div.phpdebugbar-openhandler .phpdebugbar-openhandler-header a {
38 | font-size: 14px;
39 | color: #555;
40 | text-decoration: none;
41 | float: right;
42 | padding: 5px 8px;
43 | }
44 | div.phpdebugbar-openhandler table {
45 | width: 100%;
46 | font-size: 14px;
47 | }
48 | div.phpdebugbar-openhandler table td {
49 | padding: 6px 3px;
50 | text-align: center;
51 | border-bottom: 1px solid #ddd;
52 | }
53 | div.phpdebugbar-openhandler .phpdebugbar-openhandler-actions {
54 | text-align: center;
55 | padding: 7px 0;
56 | }
57 | div.phpdebugbar-openhandler .phpdebugbar-openhandler-actions a {
58 | margin: 0 10px;
59 | color: #555;
60 | }
61 |
--------------------------------------------------------------------------------
/public/packages/barryvdh/laravel-debugbar/php-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5-say/laravel-4.1-simple-blog/579606b14d32566413b6a9e701391c5f45b0a7f6/public/packages/barryvdh/laravel-debugbar/php-icon.png
--------------------------------------------------------------------------------
/public/packages/barryvdh/laravel-debugbar/vendor/font-awesome/fonts/FontAwesome.otf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5-say/laravel-4.1-simple-blog/579606b14d32566413b6a9e701391c5f45b0a7f6/public/packages/barryvdh/laravel-debugbar/vendor/font-awesome/fonts/FontAwesome.otf
--------------------------------------------------------------------------------
/public/packages/barryvdh/laravel-debugbar/vendor/font-awesome/fonts/fontawesome-webfont.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5-say/laravel-4.1-simple-blog/579606b14d32566413b6a9e701391c5f45b0a7f6/public/packages/barryvdh/laravel-debugbar/vendor/font-awesome/fonts/fontawesome-webfont.eot
--------------------------------------------------------------------------------
/public/packages/barryvdh/laravel-debugbar/vendor/font-awesome/fonts/fontawesome-webfont.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5-say/laravel-4.1-simple-blog/579606b14d32566413b6a9e701391c5f45b0a7f6/public/packages/barryvdh/laravel-debugbar/vendor/font-awesome/fonts/fontawesome-webfont.ttf
--------------------------------------------------------------------------------
/public/packages/barryvdh/laravel-debugbar/vendor/font-awesome/fonts/fontawesome-webfont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5-say/laravel-4.1-simple-blog/579606b14d32566413b6a9e701391c5f45b0a7f6/public/packages/barryvdh/laravel-debugbar/vendor/font-awesome/fonts/fontawesome-webfont.woff
--------------------------------------------------------------------------------
/public/packages/maximebf/php-debugbar/icons.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5-say/laravel-4.1-simple-blog/579606b14d32566413b6a9e701391c5f45b0a7f6/public/packages/maximebf/php-debugbar/icons.png
--------------------------------------------------------------------------------
/public/packages/maximebf/php-debugbar/openhandler.css:
--------------------------------------------------------------------------------
1 | div.phpdebugbar-openhandler-overlay {
2 | position: fixed;
3 | left: 0;
4 | top: 0;
5 | width: 100%;
6 | height: 100%;
7 | background: #000;
8 | opacity: .3;
9 | z-index: 20000;
10 | }
11 |
12 | div.phpdebugbar-openhandler {
13 | position: fixed;
14 | margin: auto;
15 | top: 0;
16 | bottom: 0;
17 | left: 0;
18 | right: 0;
19 | width: 70%;
20 | height: 70%;
21 | background: #fff;
22 | border: 2px solid #888;
23 | overflow: auto;
24 | z-index: 20001;
25 | font-family: arial;
26 | font-size: 14px;
27 | padding-bottom: 10px;
28 | }
29 | div.phpdebugbar-openhandler .phpdebugbar-openhandler-header {
30 | background: #efefef url(php-icon.png) no-repeat 5px 4px;
31 | padding-left: 29px;
32 | min-height: 26px;
33 | line-height: 25px;
34 | color: #555;
35 | margin-bottom: 10px;
36 | }
37 | div.phpdebugbar-openhandler .phpdebugbar-openhandler-header a {
38 | font-size: 14px;
39 | color: #555;
40 | text-decoration: none;
41 | float: right;
42 | padding: 5px 8px;
43 | }
44 | div.phpdebugbar-openhandler table {
45 | width: 100%;
46 | font-size: 14px;
47 | }
48 | div.phpdebugbar-openhandler table td {
49 | padding: 6px 3px;
50 | text-align: center;
51 | border-bottom: 1px solid #ddd;
52 | }
53 | div.phpdebugbar-openhandler .phpdebugbar-openhandler-actions {
54 | text-align: center;
55 | padding: 7px 0;
56 | }
57 | div.phpdebugbar-openhandler .phpdebugbar-openhandler-actions a {
58 | margin: 0 10px;
59 | color: #555;
60 | }
61 |
--------------------------------------------------------------------------------
/public/packages/maximebf/php-debugbar/php-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5-say/laravel-4.1-simple-blog/579606b14d32566413b6a9e701391c5f45b0a7f6/public/packages/maximebf/php-debugbar/php-icon.png
--------------------------------------------------------------------------------
/public/packages/maximebf/php-debugbar/vendor/font-awesome/fonts/FontAwesome.otf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5-say/laravel-4.1-simple-blog/579606b14d32566413b6a9e701391c5f45b0a7f6/public/packages/maximebf/php-debugbar/vendor/font-awesome/fonts/FontAwesome.otf
--------------------------------------------------------------------------------
/public/packages/maximebf/php-debugbar/vendor/font-awesome/fonts/fontawesome-webfont.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5-say/laravel-4.1-simple-blog/579606b14d32566413b6a9e701391c5f45b0a7f6/public/packages/maximebf/php-debugbar/vendor/font-awesome/fonts/fontawesome-webfont.eot
--------------------------------------------------------------------------------
/public/packages/maximebf/php-debugbar/vendor/font-awesome/fonts/fontawesome-webfont.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5-say/laravel-4.1-simple-blog/579606b14d32566413b6a9e701391c5f45b0a7f6/public/packages/maximebf/php-debugbar/vendor/font-awesome/fonts/fontawesome-webfont.ttf
--------------------------------------------------------------------------------
/public/packages/maximebf/php-debugbar/vendor/font-awesome/fonts/fontawesome-webfont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5-say/laravel-4.1-simple-blog/579606b14d32566413b6a9e701391c5f45b0a7f6/public/packages/maximebf/php-debugbar/vendor/font-awesome/fonts/fontawesome-webfont.woff
--------------------------------------------------------------------------------
/public/packages/maximebf/php-debugbar/vendor/highlightjs/styles/github.css:
--------------------------------------------------------------------------------
1 | /*
2 |
3 | github.com style (c) Vasily Polovnyov
4 |
5 | */
6 |
7 | .hljs {
8 | display: block; padding: 0.5em;
9 | color: #333;
10 | background: #f8f8f8
11 | }
12 |
13 | .hljs-comment,
14 | .hljs-template_comment,
15 | .diff .hljs-header,
16 | .hljs-javadoc {
17 | color: #998;
18 | font-style: italic
19 | }
20 |
21 | .hljs-keyword,
22 | .css .rule .hljs-keyword,
23 | .hljs-winutils,
24 | .javascript .hljs-title,
25 | .nginx .hljs-title,
26 | .hljs-subst,
27 | .hljs-request,
28 | .hljs-status {
29 | color: #333;
30 | font-weight: bold
31 | }
32 |
33 | .hljs-number,
34 | .hljs-hexcolor,
35 | .ruby .hljs-constant {
36 | color: #099;
37 | }
38 |
39 | .hljs-string,
40 | .hljs-tag .hljs-value,
41 | .hljs-phpdoc,
42 | .tex .hljs-formula {
43 | color: #d14
44 | }
45 |
46 | .hljs-title,
47 | .hljs-id,
48 | .coffeescript .hljs-params,
49 | .scss .hljs-preprocessor {
50 | color: #900;
51 | font-weight: bold
52 | }
53 |
54 | .javascript .hljs-title,
55 | .lisp .hljs-title,
56 | .clojure .hljs-title,
57 | .hljs-subst {
58 | font-weight: normal
59 | }
60 |
61 | .hljs-class .hljs-title,
62 | .haskell .hljs-type,
63 | .vhdl .hljs-literal,
64 | .tex .hljs-command {
65 | color: #458;
66 | font-weight: bold
67 | }
68 |
69 | .hljs-tag,
70 | .hljs-tag .hljs-title,
71 | .hljs-rules .hljs-property,
72 | .django .hljs-tag .hljs-keyword {
73 | color: #000080;
74 | font-weight: normal
75 | }
76 |
77 | .hljs-attribute,
78 | .hljs-variable,
79 | .lisp .hljs-body {
80 | color: #008080
81 | }
82 |
83 | .hljs-regexp {
84 | color: #009926
85 | }
86 |
87 | .hljs-symbol,
88 | .ruby .hljs-symbol .hljs-string,
89 | .lisp .hljs-keyword,
90 | .tex .hljs-special,
91 | .hljs-prompt {
92 | color: #990073
93 | }
94 |
95 | .hljs-built_in,
96 | .lisp .hljs-title,
97 | .clojure .hljs-built_in {
98 | color: #0086b3
99 | }
100 |
101 | .hljs-preprocessor,
102 | .hljs-pragma,
103 | .hljs-pi,
104 | .hljs-doctype,
105 | .hljs-shebang,
106 | .hljs-cdata {
107 | color: #999;
108 | font-weight: bold
109 | }
110 |
111 | .hljs-deletion {
112 | background: #fdd
113 | }
114 |
115 | .hljs-addition {
116 | background: #dfd
117 | }
118 |
119 | .diff .hljs-change {
120 | background: #0086b3
121 | }
122 |
123 | .hljs-chunk {
124 | color: #aaa
125 | }
126 |
--------------------------------------------------------------------------------
/public/packages/maximebf/php-debugbar/widgets/mails/widget.css:
--------------------------------------------------------------------------------
1 |
2 | div.phpdebugbar-widgets-mails span.phpdebugbar-widgets-subject {
3 | display: block;
4 | }
5 |
6 | div.phpdebugbar-widgets-mails li.phpdebugbar-widgets-list-item pre.phpdebugbar-widgets-headers {
7 | display: none;
8 | margin: 10px;
9 | padding: 5px;
10 | border: 1px solid #ddd;
11 | font-family: monospace;
12 | }
13 |
--------------------------------------------------------------------------------
/public/packages/maximebf/php-debugbar/widgets/mails/widget.js:
--------------------------------------------------------------------------------
1 | (function($) {
2 |
3 | var csscls = PhpDebugBar.utils.makecsscls('phpdebugbar-widgets-');
4 |
5 | /**
6 | * Widget for the displaying mails data
7 | *
8 | * Options:
9 | * - data
10 | */
11 | var MailsWidget = PhpDebugBar.Widgets.MailsWidget = PhpDebugBar.Widget.extend({
12 |
13 | className: csscls('mails'),
14 |
15 | render: function() {
16 | this.$list = new PhpDebugBar.Widgets.ListWidget({ itemRenderer: function(li, mail) {
17 | $('').addClass(csscls('subject')).text(mail.subject).appendTo(li);
18 | $('').addClass(csscls('to')).text(mail.to).appendTo(li);
19 | if (mail.headers) {
20 | var headers = $('').addClass(csscls('headers')).appendTo(li);
21 | $('
').text(mail.headers).appendTo(headers);
22 | li.click(function() {
23 | if (headers.is(':visible')) {
24 | headers.hide();
25 | } else {
26 | headers.show();
27 | }
28 | });
29 | }
30 | }});
31 | this.$list.$el.appendTo(this.$el);
32 |
33 | this.bindAttr('data', function(data) {
34 | this.$list.set('data', data);
35 | });
36 | }
37 |
38 | });
39 |
40 | })(PhpDebugBar.$);
41 |
--------------------------------------------------------------------------------
/public/packages/maximebf/php-debugbar/widgets/sqlqueries/widget.css:
--------------------------------------------------------------------------------
1 | div.phpdebugbar-widgets-sqlqueries .phpdebugbar-widgets-status {
2 | font-family: monospace;
3 | padding: 6px 6px;
4 | border-bottom: 1px solid #ddd;
5 | font-weight: bold;
6 | color: #555;
7 | background: #fafafa;
8 | }
9 |
10 | div.phpdebugbar-widgets-sqlqueries li.phpdebugbar-widgets-list-item.phpdebugbar-widgets-error {
11 | color: red;
12 | }
13 |
14 | div.phpdebugbar-widgets-sqlqueries span.phpdebugbar-widgets-duration,
15 | div.phpdebugbar-widgets-sqlqueries span.phpdebugbar-widgets-memory,
16 | div.phpdebugbar-widgets-sqlqueries span.phpdebugbar-widgets-row-count,
17 | div.phpdebugbar-widgets-sqlqueries span.phpdebugbar-widgets-stmt-id {
18 | float: right;
19 | margin-left: 8px;
20 | color: #888;
21 | }
22 | div.phpdebugbar-widgets-sqlqueries div.phpdebugbar-widgets-status span.phpdebugbar-widgets-duration,
23 | div.phpdebugbar-widgets-sqlqueries div.phpdebugbar-widgets-status span.phpdebugbar-widgets-memory,
24 | div.phpdebugbar-widgets-sqlqueries div.phpdebugbar-widgets-status span.phpdebugbar-widgets-row-count,
25 | div.phpdebugbar-widgets-sqlqueries div.phpdebugbar-widgets-status span.phpdebugbar-widgets-stmt-id {
26 | color: #555;
27 | }
28 | div.phpdebugbar-widgets-sqlqueries span.phpdebugbar-widgets-duration:before,
29 | div.phpdebugbar-widgets-sqlqueries span.phpdebugbar-widgets-memory:before,
30 | div.phpdebugbar-widgets-sqlqueries span.phpdebugbar-widgets-row-count:before,
31 | div.phpdebugbar-widgets-sqlqueries span.phpdebugbar-widgets-stmt-id:before {
32 | font-family: FontAwesome;
33 | margin-right: 4px;
34 | font-size: 12px;
35 | }
36 | div.phpdebugbar-widgets-sqlqueries span.phpdebugbar-widgets-duration:before {
37 | content: "\f017";
38 | }
39 | div.phpdebugbar-widgets-sqlqueries span.phpdebugbar-widgets-memory:before {
40 | content: "\f085";
41 | }
42 | div.phpdebugbar-widgets-sqlqueries span.phpdebugbar-widgets-row-count:before {
43 | content: "\f0ce";
44 | }
45 | div.phpdebugbar-widgets-sqlqueries span.phpdebugbar-widgets-stmt-id:before {
46 | content: "\f08d";
47 | }
48 | div.phpdebugbar-widgets-sqlqueries table.phpdebugbar-widgets-params {
49 | display: none;
50 | width: 70%;
51 | margin: 10px;
52 | border: 1px solid #ddd;
53 | font-family: monospace;
54 | border-collapse: collapse;
55 | }
56 | div.phpdebugbar-widgets-sqlqueries table.phpdebugbar-widgets-params td {
57 | border: 1px solid #ddd;
58 | text-align: center;
59 | }
60 | div.phpdebugbar-widgets-sqlqueries table.phpdebugbar-widgets-params .phpdebugbar-widgets-name {
61 | width: 20%;
62 | font-weight: bold;
63 | }
64 |
65 | div.phpdebugbar-widgets-sqlqueries li.phpdebugbar-widgets-list-item span.phpdebugbar-widgets-error {
66 | display: block;
67 | font-weight: bold;
68 | }
69 |
70 | code.phpdebugbar-widgets-sql {
71 | white-space: pre-wrap;
72 | overflow-wrap: break-word;
73 | word-wrap: break-word;
74 | }
75 |
76 | div.phpdebugbar-widgets-sqlqueries li.phpdebugbar-widgets-list-item.phpdebugbar-widgets-sql-duplicate {
77 | background-color: #edeff0;
78 | }
79 |
80 | div.phpdebugbar-widgets-sqlqueries li.phpdebugbar-widgets-list-item.phpdebugbar-widgets-sql-duplicate:hover {
81 | background-color: #ffc;
82 | }
83 |
--------------------------------------------------------------------------------
/public/packages/maximebf/php-debugbar/widgets/sqlqueries/widget.js:
--------------------------------------------------------------------------------
1 | (function($) {
2 |
3 | var csscls = PhpDebugBar.utils.makecsscls('phpdebugbar-widgets-');
4 |
5 | /**
6 | * Widget for the displaying sql queries
7 | *
8 | * Options:
9 | * - data
10 | */
11 | var SQLQueriesWidget = PhpDebugBar.Widgets.SQLQueriesWidget = PhpDebugBar.Widget.extend({
12 |
13 | className: csscls('sqlqueries'),
14 |
15 | render: function() {
16 | this.$status = $('').addClass(csscls('status')).appendTo(this.$el);
17 |
18 | this.$list = new PhpDebugBar.Widgets.ListWidget({ itemRenderer: function(li, stmt) {
19 | $('
').addClass(csscls('sql')).html(PhpDebugBar.Widgets.highlight(stmt.sql, 'sql')).appendTo(li);
20 | if (stmt.duration_str) {
21 | $('').addClass(csscls('duration')).text(stmt.duration_str).appendTo(li);
22 | }
23 | if (stmt.memory_str) {
24 | $('').addClass(csscls('memory')).text(stmt.memory_str).appendTo(li);
25 | }
26 | if (typeof(stmt.is_success) != 'undefined' && !stmt.is_success) {
27 | li.addClass(csscls('error'));
28 | li.append($('').addClass(csscls('error')).text("[" + stmt.error_code + "] " + stmt.error_message));
29 | } else if (typeof(stmt.row_count) != 'undefined') {
30 | $('').addClass(csscls('row-count')).text(stmt.row_count).appendTo(li);
31 | }
32 | if (typeof(stmt.stmt_id) != 'undefined' && stmt.stmt_id) {
33 | $('').addClass(csscls('stmt-id')).text(stmt.stmt_id).appendTo(li);
34 | }
35 | if (stmt.params && !$.isEmptyObject(stmt.params)) {
36 | var table = $('').addClass(csscls('params')).appendTo(li);
37 | for (var key in stmt.params) {
38 | if (typeof stmt.params[key] !== 'function') {
39 | table.append('' + key + ' | ' + stmt.params[key] + ' |
');
41 | }
42 | }
43 | li.css('cursor', 'pointer').click(function() {
44 | if (table.is(':visible')) {
45 | table.hide();
46 | } else {
47 | table.show();
48 | }
49 | });
50 | }
51 | }});
52 | this.$list.$el.appendTo(this.$el);
53 |
54 | this.bindAttr('data', function(data) {
55 | this.$list.set('data', data.statements);
56 | this.$status.empty();
57 |
58 | // Search for duplicate statements.
59 | for (var sql = {}, duplicate = 0, i = 0; i < data.statements.length; i++) {
60 | var stmt = data.statements[i].sql;
61 | if (data.statements[i].params && !$.isEmptyObject(data.statements[i].params)) {
62 | stmt += ' {' + $.param(data.statements[i].params, false) + '}';
63 | }
64 | sql[stmt] = sql[stmt] || { keys: [] };
65 | sql[stmt].keys.push(i);
66 | }
67 | // Add classes to all duplicate SQL statements.
68 | for (var stmt in sql) {
69 | if (sql[stmt].keys.length > 1) {
70 | duplicate++;
71 | for (var i = 0; i < sql[stmt].keys.length; i++) {
72 | this.$list.$el.find('.' + csscls('list-item')).eq(sql[stmt].keys[i])
73 | .addClass(csscls('sql-duplicate')).addClass(csscls('sql-duplicate-'+duplicate));
74 | }
75 | }
76 | }
77 |
78 | var t = $('').text(data.nb_statements + " statements were executed").appendTo(this.$status);
79 | if (data.nb_failed_statements) {
80 | t.append(", " + data.nb_failed_statements + " of which failed");
81 | }
82 | if (duplicate) {
83 | t.append(", " + duplicate + " of which were duplicated");
84 | }
85 | if (data.accumulated_duration_str) {
86 | this.$status.append($('').addClass(csscls('duration')).text(data.accumulated_duration_str));
87 | }
88 | if (data.memory_usage_str) {
89 | this.$status.append($('').addClass(csscls('memory')).text(data.memory_usage_str));
90 | }
91 | });
92 | }
93 |
94 | });
95 |
96 | })(PhpDebugBar.$);
97 |
--------------------------------------------------------------------------------
/public/packages/maximebf/php-debugbar/widgets/templates/widget.css:
--------------------------------------------------------------------------------
1 |
2 | div.phpdebugbar-widgets-templates div.phpdebugbar-widgets-status {
3 | font-family: monospace;
4 | padding: 6px 6px;
5 | border-bottom: 1px solid #ddd;
6 | font-weight: bold;
7 | color: #555;
8 | background: #fafafa;
9 | }
10 |
11 | div.phpdebugbar-widgets-templates span.phpdebugbar-widgets-render_time {
12 | float: right;
13 | }
14 | div.phpdebugbar-widgets-templates span.phpdebugbar-widgets-render_time:before {
15 | content: "\f017";
16 | font-family: FontAwesome;
17 | font-size: 12px;
18 | margin-right: 4px;
19 | }
20 |
21 | div.phpdebugbar-widgets-templates div.phpdebugbar-widgets-status span.phpdebugbar-widgets-render_time {
22 | color: #555;
23 | }
--------------------------------------------------------------------------------
/public/packages/maximebf/php-debugbar/widgets/templates/widget.js:
--------------------------------------------------------------------------------
1 | (function($) {
2 |
3 | var csscls = PhpDebugBar.utils.makecsscls('phpdebugbar-widgets-');
4 |
5 | /**
6 | * Widget for the displaying templates data
7 | *
8 | * Options:
9 | * - data
10 | */
11 | var TemplatesWidget = PhpDebugBar.Widgets.TemplatesWidget = PhpDebugBar.Widget.extend({
12 |
13 | className: csscls('templates'),
14 |
15 | render: function() {
16 | this.$status = $('').addClass(csscls('status')).appendTo(this.$el);
17 |
18 | this.$list = new PhpDebugBar.Widgets.ListWidget({ itemRenderer: function(li, tpl) {
19 | $('').addClass(csscls('name')).text(tpl.name).appendTo(li);
20 | if (tpl.render_time_str) {
21 | $('').addClass(csscls('render_time')).text(tpl.render_time_str).appendTo(li);
22 | }
23 | }});
24 | this.$list.$el.appendTo(this.$el);
25 |
26 | this.bindAttr('data', function(data) {
27 | this.$list.set('data', data.templates);
28 | var sentence = data.sentence || "templates were rendered";
29 | this.$status.empty().append($('').text(data.templates.length + " " + sentence));
30 | if (data.accumulated_render_time_str) {
31 | this.$status.append($('').addClass(csscls('render_time')).text(data.accumulated_render_time_str));
32 | }
33 | });
34 | }
35 |
36 | });
37 |
38 | })(PhpDebugBar.$);
--------------------------------------------------------------------------------
/public/portrait/large/.size.220:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5-say/laravel-4.1-simple-blog/579606b14d32566413b6a9e701391c5f45b0a7f6/public/portrait/large/.size.220
--------------------------------------------------------------------------------
/public/portrait/medium/.size.128:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5-say/laravel-4.1-simple-blog/579606b14d32566413b6a9e701391c5f45b0a7f6/public/portrait/medium/.size.128
--------------------------------------------------------------------------------
/public/portrait/small/.size.64:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5-say/laravel-4.1-simple-blog/579606b14d32566413b6a9e701391c5f45b0a7f6/public/portrait/small/.size.64
--------------------------------------------------------------------------------
/public/readmeAssets/mx3540D.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5-say/laravel-4.1-simple-blog/579606b14d32566413b6a9e701391c5f45b0a7f6/public/readmeAssets/mx3540D.png
--------------------------------------------------------------------------------
/public/readmeAssets/mx3826D.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5-say/laravel-4.1-simple-blog/579606b14d32566413b6a9e701391c5f45b0a7f6/public/readmeAssets/mx3826D.png
--------------------------------------------------------------------------------
/public/readmeAssets/mx384D1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5-say/laravel-4.1-simple-blog/579606b14d32566413b6a9e701391c5f45b0a7f6/public/readmeAssets/mx384D1.png
--------------------------------------------------------------------------------
/public/readmeAssets/mx3D2BE.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/5-say/laravel-4.1-simple-blog/579606b14d32566413b6a9e701391c5f45b0a7f6/public/readmeAssets/mx3D2BE.png
--------------------------------------------------------------------------------
/public/robots.txt:
--------------------------------------------------------------------------------
1 | User-agent: *
2 | Disallow:
3 |
--------------------------------------------------------------------------------
/readme.md:
--------------------------------------------------------------------------------
1 | # laravel-4.1-simple-blog
2 |
3 | - 这是一个 laravel-4.1 的 Demo,一个简单的博客实例。
4 | - 涵盖知识点:
5 | - 路由、过滤器。
6 | - Eloquent 基础、模型对象关系、分页、搜索、排序。
7 | - 控制器、blade 模板。
8 | - Mail 操作。
9 | - Auth 类的使用。
10 | - Validator 类的使用。
11 | - 为求开发尽可能的简单高效,做出以下调整。
12 | - 所有控制器均置于顶层命名空间,遵循 PSR-0 规范,使用 PEAR 命名风格进行前后台控制器分离。
13 | - 开发阶段引入了 laravel-debugbar。
14 | - 开发阶段使用了自定义的辅助工具包 Assists,部署后可以完全移除。
15 | - 此项目仅用于学习交流,有任何问题请发 [issues](https://github.com/5-say/laravel-4.1-simple-blog/issues)。
16 | - 2014-02-19 初始版本编写结束。
17 | - 2014-09-09 为避免对新人产生错误引导,移除开发辅助工具(不规范),采用常规化的迁移与填充流程。
18 |
19 | ---
20 |
21 | - [项目进度](#project)
22 | - [安装方法](#install)
23 | - [变更项目数据库的方法](/change-db.md)
24 | - [项目截图](#screenshot)
25 | - [项目依赖](#require)
26 | - [开发者私人信息保密方法](#assume-unchanged)
27 |
28 | ---
29 |
30 |
31 | ### 项目进度
32 |
33 | - 已经完成
34 | - 权限
35 | - 注册、登录、邮箱激活、忘记密码
36 | - 最简陋的权限:仅区分管理员、注册用户、游客
37 | - 博客
38 | - 文章列表页
39 | - 分类文章列表页
40 | - 文章展示页
41 | - 评论
42 | - 管理员后台
43 | - 用户管理
44 | - 分类管理
45 | - 文章管理
46 | - Markdown 编辑器(编辑和发布文章)
47 | - 资源列表搜索功能
48 | - 资源列表排序功能
49 | - 用户中心
50 | - 修改密码
51 | - 更改头像
52 | - 我的评论
53 | - 预计加入的功能
54 | - 初始版本编写结束
55 |
56 |
57 | ### 安装方法
58 |
59 | [下载项目文件](https://github.com/5-say/laravel-4.1-simple-blog/archive/master.zip)
60 |
61 | 使用 composer 进行安装
62 |
63 | composer install
64 |
65 | > **注意:** 项目默认采用 Sqlite 数据库,数据库文件已包含于项目中。composer 安装结束后即可直接使用。
66 | > Assist 包中存放着迁移文件,可配合开发辅助工具无缝切换至 MySql 等 laravel 支持的数据库。(工具 URI `/5-say` )
67 |
68 | 默认管理员账号密码:
69 |
70 | admin@demo.com
71 | 111111
72 |
73 | > 账号激活等功能需要进行邮件发送,请在 `/app/config/mail.php` 文件中做好邮件服务器的相关配置。
74 |
75 |
76 | ### 项目截图
77 |
78 | 
79 | 
80 | 
81 |
82 |
83 | ### 项目依赖
84 |
85 | - 主要依赖
86 | - laravel/framework
87 | - 主框架
88 | - five-say/laravel-route-group
89 | - 对象化分组路由辅助
90 | - five-say/laravel-schema-extend
91 | - 默认结构生成器拓展(支持 MySql 表注释、列注释)
92 | - intervention/image
93 | - 图片处理
94 | - yzalis/identicon
95 | - 头像生成
96 | - michelf/php-markdown
97 | - markdown 文档解析
98 | - nickcernis/html-to-markdown
99 | - “html 文档”转“markdown 文档”
100 | - 开发辅助
101 | - barryvdh/laravel-debugbar
102 | - 调试工具栏
103 |
104 |
105 | ### 开发者私人信息保密方法
106 |
107 | 实际开发中(类似邮件功能)需要开发者私人密码的文件,可以采用以下方法进行隐私保护。**请在命令行中使用**。
108 |
109 | // 假设文件无改动,作用于版本库中已存在的文件。
110 | // 此方法将确保本地文件不提交,并且版本库中此文件的变更无法影响本地文件。
111 | git update-index --assume-unchanged app/config/mail.php
112 | // 取消并恢复为普通文件
113 | git update-index --no-assume-unchanged app/config/mail.php
--------------------------------------------------------------------------------
/server.php:
--------------------------------------------------------------------------------
1 |