Coder Social home page Coder Social logo

baijunyao / laravel-bjyblog Goto Github PK

View Code? Open in Web Editor NEW
526.0 34.0 202.0 62.4 MB

Laravel v9 blog

Home Page: https://baijunyao.com/docs/laravel-bjyblog

License: MIT License

PHP 94.88% Vue 0.01% HTML 0.09% Dockerfile 0.01% Shell 0.04% Blade 0.79% JavaScript 3.41% CSS 0.02% SCSS 0.76%
laravel blog php

laravel-bjyblog's Introduction

laravel-bjyblog

Latest Stable Version Build Status master Code Coverage PHP version Chat on Slack

Laravel PHP and MySQL Compatibility

Blog Laravel PHP MySQL
v17 9 8.0.2 - 8.1 5.6 - 8.0
v15 - v16 8 8.0 - 8.1 5.6 - 8.0
v14 8 7.3 - 7.4 5.6 - 8.0
v7 - v13 7 7.2 5.6 - 8.0
v6 6 7.2 5.6 - 8.0
v5.8 5.8 7.1 5.6 - 8.0
v5.5 5.5 7.0 5.6 - 8.0
v1 - v5.3 5.3 5.6 5.6 - 8.0

Preview

laravel-bjyblog

Documentation

English 中文文档

Testing

Run the tests with

./vendor/bin/phpunit

Example

Welcome to submit a PR or tell me to include your blog

Links

Contributors

Thanks goes to these wonderful people (emoji key):

韩槑槑
韩槑槑

💻
k26
k26

💻 🌍
loyating
loyating

💻
lenkaren
lenkaren

💻
Doraemon
Doraemon

💻
Yuran
Yuran

🐛 🌍
白俊遥
白俊遥

💻 🌍 📖 ⚠️
Tahsin Gökalp Şaan
Tahsin Gökalp Şaan

💻
阿杰
阿杰

💻
梁桂锋
梁桂锋

💻
KKKyle97
KKKyle97

💻
仙痕缘
仙痕缘

💻
黄浩
黄浩

💻
HDVinnie
HDVinnie

🛡️
Ogbonna Henry
Ogbonna Henry

💻

This project follows the all-contributors specification. Contributions of any kind welcome!

License

laravel-bjyblog is open-sourced software licensed under the MIT license.

Sponsors

PHPStorm Laravel-idea

laravel-bjyblog's People

Contributors

allcontributors[bot] avatar baijunyao avatar dependabot[bot] avatar fossabot avatar hdvinnie avatar hen8y avatar huanghao9015 avatar khyoz avatar kkkyle97 avatar liangguifeng avatar loyating avatar shukunwang avatar tahsingokalp avatar xianhenyuan avatar xyj2156 avatar yuri25 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

laravel-bjyblog's Issues

About translation - Question

Can you please tell me how to add another language to the system? And in what files you need to change for this? I want to try to translate into Russian. Thank.

mix doesn't resolve path

i have installed all packages and dipendencies with composer update, and after that, i installated the frontend libraries with npm install and npm run dev
After all this resource projects are not avalaible becase laravel mix doesn't convert the resource path.
So this instruction doesn't work

<script src="{{ mix('js/admin.js') }}"></script>

I had to change it to

<script src="{{ asset('js/admin.js') }}"></script>

this in both the admin and home templates

This happen only to me?

Question about music and video

Could you add the ability to the editor to add music as a mp3 file and embed the video from the YouTube service? Thank.

申请友链存在xss漏洞

在前台申请友链的时候在url地址输入javascript:alert('xss');//http
1001

在后台查看的时候.点击这个url就会触发.
10002

10003

public function setUrlAttribute($value)
    {
        // 如果没有http 则补上http
        if (strpos($value, 'http') === false) {
            $value = 'http://' . $value;
        }

        $this->attributes['url'] = strtolower(rtrim($value, '/'));
    }

代码里判断URL时,只判断了字符串里面是否有http,没有则在开头位置拼接http。
没有判断字符串在http的位置,javascript:alert('xss');//http 那这样就绕过了,应该判断http要在字符串开始位置出现.

Sites (recommended blogs) that users add do not appear in the admin panel.

If the user adds a blog, a message appears that everything is successful .... However, the recommended blog (site) does not appear in the admin panel after that. I am authorized by the administrator and I do not see the blog, which as administrator I have to approve or delete. Please help solve the problem.

php artisan db:seed

composer update/install
php artisan key:generate 生成随机key
改好env 后,数据库地址账号密码
php artisan migrate
上边都做完后 , 不执行生成随机数据的话, 直接访问 会报错, cache [ php artisan db:seed ]
image

统计缓存有问题

所有统计都是1的,看了统计的代码好像只有读缓存,没有写缓存的操作

正则匹配错误

好吧,还是我

文章提取图片的正则出错了,先上原来的代码和结果图:
default
default
再来看修改后的结果图:
default
default

我自己感觉有一些问题,不知道是不是我没看完这次的修改

首先 AppServiceProvider.php 中就很奇怪,表中没有 id > 100 的数据呀
image
其次 config($config->toArray()); 这个函数也没有指定 key,并不能分配到相应的配置文件中啊。
最后,App\Http\Controllers\Admin\ConfigController 文件中的 $config = cache('config'); 的 数据结构应该是这样的
image
并不存在 view 中的 $config['services.qq.client_id']、$config['bjyblog.author']、$config['email.driver'] 等等

安装项目时报错,求助

compact(): Undefined variable: (View: /var/www/resources/views/home/index/index.blade.php)
按照文档中的步骤执行后,打开页面显示如上错误,求告知解决方法

Update error

php artisan bjyblog:update

In PhpRedisConnector.php line 72:
Please remove or rename the Redis facade alias in your "app" configuration
file in order to avoid collision with the PHP Redis extension.

I searched and found here:
laravel/horizon#659

1 Replace in config\app.php
aliasess:
'Redis' => Illuminate\Support\Facades\Redis::class,
for:
'RedisManager' => Illuminate\Support\Facades\Redis::class,

2 Replace in config\database.php

'redis' => [

'client' => env('REDIS_CLIENT', 'predis'), //default phpredis
...

I checked with myself - it works. Perhaps you will find a better solution and fix the problem as you think best.

problem upgrade

I wanted to update the project, I give the git pull command and I get an error.

error: Your local changes in the specified files will be overwritten during merging:
         public / js / admin.js
         public / js / app.js
Commit or hide your changes before merging branches.

Please tell me how to fix it. Thank.

Production : migrate error

I try to install in production on CentOS 7
When I run : php artisan migrate
I have an error message :

In DuskServiceProvider.php line 43:

It is unsafe to run Dusk in production.

in my .env file I have set

APP_ENV=production

Add to translation into other languages

In file /app/Http/Controllers/Home/SiteController.php
Hard spelled:

 $head = [
            'title'       => '推荐博客',
            'keywords'    => '推荐博客',
            'description' => '推荐博客',

 return ajax_return(200, '提交成功');
        } else {
            return ajax_return(400, '提交失败');
        }

Please include this in translations into other languages. And it would be very good that these parameters could be set in the admin panel.
Although there is an SEO item in the admin panel ... how to understand?
I follow the link https://xtty.ru/site in the browser tab, I see this word 推荐 博客 - Мой блог

Some commands lead to errors

php artisan optimize

Configuration cache cleared!
Configuration cached successfully!
Route cache cleared!

In Route.php line 917:

Unable to prepare route [api/user] for serialization. Uses Closure.

php artisan route:cache

Route cache cleared!

In Route.php line 917:

Unable to prepare route [api/user] for serialization. Uses Closure.

Also authorization via google has stopped working. Because of this, I can not log in as administrator. It produces such a 500 | server error. Other social login services work fine. Take a look and fix it please.

I see this in the logs:
production.ERROR: Call to undefined function SocialiteProviders\Google\array_get() {"exception":"[object] (Symfony\Component\Debug\Exception\FatalThrowableError(code: 0): Call to undefined function SocialiteProviders\Google\array_get() at /............/xtty.ru/vendor/socialiteproviders/google/Provider.php:69)

I can't figure out how chat works

I understand this is a chat for one administrator? Because authorized users can not answer anything in the chat .... It’s rather the admin notes - I understand correctly? Who are the chat participants?

Is it possible to? sitemap and robots.txt

A big request, please, if possible, add something to your project to generate a site map and normal use of sitemaps and robots.txt file.
I found several solutions on the network, but on my own I do not dare to install, I am afraid to ruin everything. Please look like a professional.
https://github.com/Laravelium/laravel-sitemap
https://github.com/spatie/laravel-sitemap
https://github.com/digitaldreams/laravel-seo-tools
If this is implemented, then the project will be much better perceived by search engines.
A third option would be great.
Thank you for your work.

Problem after connexion with Facebook

Hello, once I'm connected with Facebook when I try fo fill the comment, or fill the mail address field, I'm redirected to the home page...
Is there something more to configure ?

bug-comment-2019-06-11_141530

Thanks for support.

Your .dependabot/config.yml contained invalid details

Dependabot encountered the following error when parsing your .dependabot/config.yml:

The property '#/update_configs/0/automerged_updates' of type object did not match the following type: array
The property '#/update_configs/1/automerged_updates' of type object did not match the following type: array

Please update the config file to conform with Dependabot's specification using our docs and online validator.

后台新增文章时模型调用create后报错

后台新增文章时模型调用create后,create()方法内部报错,但数据已插入到库中了,由于报错,导致热门标签没有显示

报错信息如下:

[2018-07-18 16:38:13] local.ERROR: Type error: Too few arguments to function Illuminate\Support\Manager::createDriver(), 0 passed in /www/laravel-blog/vendor/laravel/framework/src/Illuminate/Support/Manager.php on line 89 and exactly 1 expected {"userId":2,"email":"[email protected]","exception":"[object] (Symfony\Component\Debug\Exception\FatalThrowableError(code: 0): Type error: Too few arguments to function Illuminate\Support\Manager::createDriver(), 0 passed in /www/laravel-blog/vendor/laravel/framework/src/Illuminate/Support/Manager.php on line 89 and exactly 1 expected at /www/laravel-blog/vendor/laravel/framework/src/Illuminate/Support/Manager.php:78)

Emoji does not appear on the site.

In the Emoji editor from git are not displayed. It is necessary to replace the path to the pictures in the files editormd.js and editormd.min.js
Replace this URL emoji-cheat-sheet.com with such URL
webfx.com/tools/emoji-cheat-sheet
After this replacement, images from Emoji github appear in the editor.
Nevertheless, when editing the article - on the right, these Emoji I observe. However, when publishing an article, only text is visible on the site, images of eiuji are absent: (

image

image

执行php artisan bjyblog:install,报错了

数据库账号密码都是对的

In Connection.php line 664: SQLSTATE[HY000] [1045] Access denied for user 'root'@'127.0.0.1' (using pas sword: NO) (SQL: select * from information_schema.tables where table_schema = blogdb and table_name = bjy_migrations)

crontab -e.... Help please

Please help me ... I receive such reports in the mail
/bin/sh: 1: cd: can't cd to /xtty.ru/artisan
This is defined in your instructions
* * * * * cd /baijunyao.com/artisan && php artisan schedule:run >> /dev/null 2>&1
Probably you need to specify the full path on the server eg: /var/www/user/data/www/mysite.com/artisan && php artisan schedule:run >> /dev/null 2>&1
Right?

comment popup empty

When I try to create a comment, I have a popup but no choice for connexion anymore

empty screen when trying to connect for comment

This is what I have on your blog and what I got a few days ago

comment your blog

Registration

Please, if possible, make a standard user registration. It is very difficult to register on graph.qq.com and weibo.com
With best regards!

[BUG]后台的退出登录功能有bug,建议修复(已经附上代码说明)

在routes/web.php里面的74行的退出代码

// 退出
Route::get('logout', 'LoginController@logout');

写在这里有bug的,这个路由不应该用'admin.login'去校验

因为这个路由的检验 AdminAuth.php里面是这样的:

public function handle($request, Closure $next)
    {
        // 如果登录;则重定向到首页
        if (session('user.is_admin') == 1) {
            return redirect('admin/index/index');
        }
        return $next($request);
    }

这将导致后台用户永远无法从后台的登出按钮登出(用户在触发登出action前已经被中间件重定向到后台首页)

应改为类似:

Route::get('admin/login/logout', 'Admin\LoginController@logout')->middleware('admin.auth');

同时控制器 Admin/LoginController.php 的logout方法也有遗漏

// should add
session()->forget('user');

关于bug的提醒

  1. categories表id字段没有设置自增长,而且里面挺多字段类型都是错的。
    

_20170805112042
2. 分类的排序方法只在路由注册了,没写对应的方法

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.