Skip to content

Commit f8eae68

Browse files
committed
readme update
1 parent 0931385 commit f8eae68

File tree

1 file changed

+66
-55
lines changed

1 file changed

+66
-55
lines changed

README.md

Lines changed: 66 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,24 @@
1-
# Laravel Blog
2-
Single language version of Binshops Laravel Blog
1+
<h1 align="center">Laravel Blog Package</h1>
32

4-
### Contact us for any customization:
5-
3+
<p align="center">
4+
<img src="https://user-images.githubusercontent.com/20775532/215362765-c2a3360e-c165-4cba-809b-4f04316c8d5e.png" width="80%" />
5+
</p>
66

7-
### Lightweight and Comprehensive
7+
### Lightweight and Easy to Install
88

9-
Incredible features with a lightweight laravel blog package. I highly recommend it because:
9+
Incredible features with a lightweight laravel blog package.
1010
- Quick installation (<3 minutes)
1111
- It's very easy to extend
1212
- Included great features out-of-box
1313
- Its simplicity allows to be easily made compatible with latest laravel
1414
- No additional concept except laravel knowledge
15-
- Compatible with other Laravel platforms like Bagisto
16-
17-
## Outstanding Features
1815
- Fulltext Search - search throughout all blog posts
1916
- Multi Level Category - nested sets using Baum
20-
- Multi Language Support
2117

22-
### Quick and easy installation
18+
### Quick and easy installation (Multi-lang version)
2319
1- Install via composer
2420

25-
`composer require binshops/laravel-blog:v8.2.0`
21+
`composer require binshops/laravel-blog`
2622

2723
For a fresh Laravel installation run the following too:
2824

@@ -31,15 +27,21 @@ composer require laravel/ui
3127
php artisan ui vue --auth
3228
```
3329

34-
2- Run the following two commands to copy config file, migration files, and view files
30+
2- Scaffold
31+
32+
```
33+
npm install && npm run build
34+
```
35+
36+
3- Run the following two commands to copy config file, migration files, and view files
3537

3638
`php artisan vendor:publish --provider="BinshopsBlog\BinshopsBlogServiceProvider"`
3739

38-
3- Execute migrations to create tables
40+
4- Execute migrations to create tables
3941

4042
`php artisan migrate;`
4143

42-
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
4345

4446
```
4547
/**
@@ -72,17 +74,33 @@ php artisan ui vue --auth
7274
}
7375
```
7476

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+
```
7684

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)
7886

79-
Admin panel URI: `/blog_admin`
80-
Front URI: `/blog`
87+
Default Admin panel URI: `/blog_admin`
88+
Default Front URI: `/en/blog`
8189

8290
To see package on Packagist click this [Link](https://packagist.org/packages/binshops/laravel-blog)
8391

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:
94+
95+
1- `composer require binshops/laravel-blog:v8.2.0`
96+
97+
2- `php artisan vendor:publish --provider="BinshopsBlog\BinshopsBlogServiceProvider"`
98+
99+
3- `php artisan vendor:publish --tag=laravel-fulltext`
100+
101+
4- `php artisan migrate;`
102+
103+
You can see the single version in "single-lang" branch. The major difference with multi-language version is the database structure.
86104

87105
## Important Notes
88106
- 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
108126
## What/who this package is for:
109127

110128
- 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
112130
- 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)
113131
- For anyone who likes to add a wordpress-like laravel blog to laravel website
114132

@@ -141,9 +159,31 @@ Add these (and an Event Listener) to your `EventServiceProvider.php` file to mak
141159

142160
## Built in CAPTCHA / anti spam
143161

144-
There is a built in captcha (anti spam 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.
145163

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 <input name=???>.
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.
147187

148188
## Image upload errors
149189

@@ -156,43 +196,14 @@ Try adding this to config/app.php:
156196
- 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.
157197

158198
## 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
160201
- 9.0.x Multi-language support beta release
161202
- 8.0.x Compatibility with Laravel 8
162-
- 7.3.2 Some bug fixes
163203
- 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)
183204
- 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.
186205
- 2.0 - added full text search (enable it via the config file - it is disabled by default).
187-
- 1.2 - added WYSIWYG, few smaller changes
188206
- 1.1.1 - added basic captcha
189207
- 1.0.5 - composer.json changes.
190208
- 1.0 - First release
191-
- 0.3 - Small changes, packagist settings.
192209
- 0.1 - Initial release
193-
194-
195-
196-
197-
198-

0 commit comments

Comments
 (0)