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
43
+
44
+
```
45
+
/**
46
+
* Enter your own logic (e.g. if ($this->id === 1) to
47
+
* enable this user to be able to add/edit blog posts
48
+
*
49
+
* @return bool - true = they can edit / manage blog posts,
50
+
* false = they have no access to the blog admin panel
51
+
*/
52
+
public function canManageBinshopsBlogPosts()
53
+
{
54
+
// Enter the logic needed for your app.
55
+
// Maybe you can just hardcode in a user id that you
- Who wants to have a site blog, and have an easy to use interface to write blog posts/assign categories/manage existing posts
79
-
- 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)
80
-
- For anyone who likes to add a wordpress-like CMS to her/his web app
112
+
- For websites running Laravel
113
+
- 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
114
+
- 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)
115
+
- For anyone who likes to add a wordpress-like laravel blog to laravel website
81
116
82
117
## How to customise the blog views/templates
83
118
84
-
After doing the correct `vendor:publish`, all of the default template files will be found in /resources/views/vendor/blogetc/ and are easy to edit to match your needs.
119
+
After doing the correct `vendor:publish`, all of the default template files will be found in /resources/views/vendor/binshopsblog/ and are easy to edit to match your needs.
85
120
86
121
### Customizing admin views
87
122
If you need to customize the admin view, just copy the files from
Then you can modify them just like any other view file.
92
127
93
128
## Routes
94
129
95
-
It will auto set all required routes (both public facing, and admin backend). There are some config options (such as changing the /blog/ url to something else), which can be done in the blogetc.php file.
130
+
It will auto set all required routes (both public facing, and admin backend). There are some config options (such as changing the /blog/ url to something else), which can be done in the binshopsblog.php file.
96
131
97
132
## Config options
98
-
All config options have comments which describe what they do. Please just refer to the `blogetc.php` file in your /config/ dir.
133
+
All config options have comments which describe what they do. Please just refer to the `binshopsblog.php` file in your /config/ dir.
99
134
100
135
### Custom User Model
101
136
You can change the default user model through the config file.
@@ -110,7 +145,7 @@ Add these (and an Event Listener) to your `EventServiceProvider.php` file to mak
110
145
111
146
There is a built in captcha (anti spam comment) system built in, which will be easy for you to replace with your own implementation.
112
147
113
-
Please see [this Captcha docs](https://hessam.binshops.com/laravel-blog-package#captcha) for more details.
148
+
Please see [this Captcha docs](https://binshops.binshops.com/laravel-blog-package#captcha) for more details.
114
149
115
150
## Image upload errors
116
151
@@ -122,17 +157,19 @@ Try adding this to config/app.php:
122
157
- Ensure that /public/blog_images (or whatever directory you set it to in the config) is writable by the server
123
158
- 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.
124
159
125
-
## Version History
126
-
-**8.0.x** Compatibility with Laravel 8
160
+
## Version History
161
+
-**9.2.x** Stable version of package
162
+
- 9.0.x Multi-language support beta release
163
+
- 8.0.x Compatibility with Laravel 8
127
164
- 7.3.2 Some bug fixes
128
165
- 7.3.0 New Admin UI
129
-
- 7.2.2
130
-
- bug fix: do not show search bar when it's disabled
131
-
- feature: configure to show full text post or preview
166
+
- 7.2.2
167
+
- bug fix: do not show search bar when it's disabled
168
+
- feature: configure to show full text post or preview
132
169
- 7.2.1 - adds logout button at admin panel
133
-
- 7.2.0
134
-
- adds sub-category functionality to blog
135
-
- adds reading progress bar feature (if you upgrade, re-publish config file and view files)
170
+
- 7.2.0
171
+
- adds sub-category functionality to blog
172
+
- adds reading progress bar feature (if you upgrade, re-publish config file and view files)
136
173
- 7.1.8 - ability to remove images from posts (this feature does not work for old posts)
137
174
- 7.1.7 - updates CKEditor
138
175
- 7.1.5 - minor fix for recent posts
@@ -147,7 +184,7 @@ Try adding this to config/app.php:
147
184
- 3.0.2 - fixed default medium image size (changed to 600x400)
148
185
- 3.0.1 - replaced all short tags (<?) with full opening ones (<?php)
149
186
- 3.0 - Added separate functionality for uploading images (and save some meta data in db)
150
-
- 2.1 - added 'short_description' to db + form, and BlogEtcPost::generate_introduction() method will try and use this to generate intro text.
187
+
- 2.1 - added 'short_description' to db + form, and BinshopsBlogPost::generate_introduction() method will try and use this to generate intro text.
151
188
- 2.0 - added full text search (enable it via the config file - it is disabled by default).
152
189
- 1.2 - added WYSIWYG, few smaller changes
153
190
- 1.1.1 - added basic captcha
@@ -156,7 +193,7 @@ Try adding this to config/app.php:
Copy file name to clipboardExpand all lines: composer.json
+12-11
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
{
2
-
"name": "hessam/laravel-blogger",
2
+
"name": "binshops/laravel-blog",
3
3
"keywords": [
4
4
"laravel",
5
5
"blog",
@@ -12,26 +12,26 @@
12
12
"posts",
13
13
"news",
14
14
"update",
15
-
"hessam-blog"
15
+
"laravel blog",
16
+
"binshops"
16
17
],
17
18
"description": "Simple blog package (with admin panel) for Laravel (6.x and 7.x). Includes all views, controllers, routes and can add a blog to any existing Laravel app. Fully customisable blog (view, urls, and many other options). Includes image uploads and a pretty admin interface to manage your blog. Defaults to /blog but you can change it to anything.",
0 commit comments