You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
4- You must add one method to your \App\User (in laravel 8 \App\Models\User) model. As the name of this method shows it determines which user can manage posts. Place your logic there
44
+
5- You must add one method to your \App\User (in laravel 8 \App\Models\User) model. As the name of this method shows it determines which user can manage posts. Place your logic there
43
45
44
46
```
45
47
/**
@@ -72,17 +74,33 @@ php artisan ui vue --auth
72
74
}
73
75
```
74
76
75
-
5- Create a directory in `public/` named `blog_images`
77
+
6- Create a directory in `public/` named `blog_images`
78
+
79
+
7- Start the server
80
+
81
+
```
82
+
php artisan serve
83
+
```
76
84
77
-
Congrats! Your blog is ready to use. (URLs are customizable in the config file)
85
+
Congrats! Your blog is ready to use. Now you can log in as admin. (URLs are customizable in the config file)
78
86
79
-
Admin panel URI: `/blog_admin`
80
-
Front URI: `/blog`
87
+
Default Admin panel URI: `/blog_admin`
88
+
Default Front URI: `/en/blog`
81
89
82
90
To see package on Packagist click this [Link](https://packagist.org/packages/binshops/laravel-blog)
83
91
84
-
### Bagisto version
85
-
To see the Bagisto version of this package go to `bagisto-compatible` branch
92
+
### Single Language Version
93
+
To install the single language version of the package use version v8.1x:
You can see the single version in "single-lang" branch. The major difference with multi-language version is the database structure.
86
104
87
105
## Important Notes
88
106
- For laravel 8.x's default auth User model, change user model in `binshopsblog.php` to: `\App\Models\User::class`
@@ -108,7 +126,7 @@ To see the Bagisto version of this package go to `bagisto-compatible` branch
108
126
## What/who this package is for:
109
127
110
128
- For websites running Laravel
111
-
-Who wants to have a site blog. This laravel blog gives an easy to use interface to write blog posts/assign categories/manage existing posts
129
+
-Anyone, who wants to have a site blog. This laravel blog gives an easy to use interface to write blog posts/assign categories/manage existing posts
112
130
- Where only admin users can edit/manage the blog (this is not suitable for every user on your site to be able to manage posts)
113
131
- For anyone who likes to add a wordpress-like laravel blog to laravel website
114
132
@@ -141,9 +159,31 @@ Add these (and an Event Listener) to your `EventServiceProvider.php` file to mak
141
159
142
160
## Built in CAPTCHA / anti spam
143
161
144
-
There is a builtin captcha (antispam comment) system built in, which will be easy for you to replace with your own implementation.
162
+
There is a built-in captcha (anti-spam comment) system built in, which will be easy for you to replace with your own implementation.
145
163
146
-
Please see [this Captcha docs](https://binshops.binshops.com/laravel-blog-package#captcha) for more details.
164
+
There is a basic anti-spam captcha function built-in.
165
+
166
+
See the config/binshops.php captcha section. There is a built in system (basic!) that will prevent most automated spam attempts.
167
+
Writing your own captcha system:
168
+
169
+
I wrote the captcha system simple on purpose, so you can add your own captcha options. It should be easy to add any other captcha system to this.
170
+
171
+
If you want to write your own implementation then create your own class that implements \BinshopsBlog\Interfaces\CaptchaInterface, then update the config/binshopsblog.php file (change the captcha_type option).
172
+
173
+
There are three methods you need to implement:
174
+
public function captcha_field_name() : string
175
+
176
+
Return a string such as "captcha". It is used for the form validation and <inputname=???>.
177
+
public function view() : string
178
+
179
+
What view file should the binshops::partials.add_comment_form view include? You can set this to whatever you need, and then create your own view file. The default included basic captcha class will return "binshops::captcha.basic".
180
+
public function rules() : array
181
+
182
+
Return an array for the rules (which are just the standard Laravel validation rules. This is where you can check if the captcha was successful or not.
183
+
Optional:
184
+
public function runCaptchaBeforeShowingPosts() : null
185
+
186
+
This isn't part of the interface, it isn't required. By default it does nothing. But you can put some code in this method and it'll be run in the BinshopsReaderController::viewSinglePost method.
147
187
148
188
## Image upload errors
149
189
@@ -156,43 +196,14 @@ Try adding this to config/app.php:
156
196
- You might need to set a higher memory limit, or upload smaller image files. This will depend on your server. I've used it to upload huge (10mb+) jpg images without problem, once the server was set up correctly to handle larger file uploads.
157
197
158
198
## Version History
159
-
-**9.2.x** Stable version of package
199
+
-**10.x** Stable version - Compatibility with laravel 11, 12
200
+
- 9.3.x Old multi lang
160
201
- 9.0.x Multi-language support beta release
161
202
- 8.0.x Compatibility with Laravel 8
162
-
- 7.3.2 Some bug fixes
163
203
- 7.3.0 New Admin UI
164
-
- 7.2.2
165
-
- bug fix: do not show search bar when it's disabled
166
-
- feature: configure to show full text post or preview
167
-
- 7.2.1 - adds logout button at admin panel
168
-
- 7.2.0
169
-
- adds sub-category functionality to blog
170
-
- adds reading progress bar feature (if you upgrade, re-publish config file and view files)
171
-
- 7.1.8 - ability to remove images from posts (this feature does not work for old posts)
172
-
- 7.1.7 - updates CKEditor
173
-
- 7.1.5 - minor fix for recent posts
174
-
- 7.1.4 - updates fulltext search package which solves the search issue
175
-
- 7.1.2 - shows categories on blog home page - minor fix (if you upgrade try to re-publish view files)
176
-
- 7.1.1 - minor fix and some admin panel text changes
177
-
- 7.1.0 - Adds support for custom user model (if you upgrade, try to publish new config)
178
-
- 7.0.2 - Bug fix for listing posts and search page
179
-
- 7.0.1 - made compatible with Laravel 6.x & 7.x
180
-
- 3.1 - minor fixes
181
-
- 3.0.3 - fixed RSS feed cache issue
182
-
- 3.0.2 - fixed default medium image size (changed to 600x400)
183
204
- 3.0.1 - replaced all short tags (<?) with full opening ones (<?php)
184
-
- 3.0 - Added separate functionality for uploading images (and save some meta data in db)
185
-
- 2.1 - added 'short_description' to db + form, and BinshopsBlogPost::generate_introduction() method will try and use this to generate intro text.
186
205
- 2.0 - added full text search (enable it via the config file - it is disabled by default).
0 commit comments