I'm Jiajian Chan.
🕹 Web Developer
:star2: PJ Blog is an open source blog built with Laravel and Vue.js.
Home Page: https://www.pigjian.com
License: MIT License
I'm Jiajian Chan.
🕹 Web Developer
When I logged in as admin, hit the "/discussion" route, this error occur. My OS is Linux Mint, I tried to change folder permission(/storage) but still got the same error.
BTW, you can reply me in Chinese, because I just installed this OS I haven't figure how to type Chinese in Linux, thanks you for provide this awesome project!
Really awesome app... great app to learn
我按照你地的文档安装部署成功搭建起来,但是只能访问到默认的主页,点击其他的路径全部是404。求解~
Hi again, I have an error when I put a comment to discussion after the discussion became disabled my notification page show an error....
my steps:
https://www.youtube.com/watch?v=f4W_owBKHd4
How we can remove all notifications after read them all? so they will not showing after read them.
thanks
how to change code, let blog install in sub-folder and call it like http://xxx.xxx.xxx/blog ?
You're damn good!!!
Discussion submission needs isSubmiting variable
If server lag you can submit 3-4 times same discussion.
error when trying not existent tag or category
exemple
/category/111111111111111111111111111
/tag/111111111111111111
$articles = $this->category->getByName($category)->articles;
$tag = $this->tag->getByName($tag);
后台开发出来了吗
Hello to you I wanna thank you for your blog its awesome.
I wanna add the Like system to the comment and to the articles
so I add this the the template section in the Comment.vue
<a href="javascript:;" @click="like(index)"><i class="ion-ios-heart"></i></a>
I have this in the Javascritp section in Comment.vue
like(index) { this.comments[index].like = !this.comments[index].like this.comments[index].like ? this.comments[index].like_num++ : this.comments[index].like_num-- }
the question how can I make it works? do I have to add a field in the database comment table : like_num?
thanks for the help.
Article 表的content里面夹杂了html和markdown,如果再建一个字段分别存放这两个内容的话,可以用solr来做full text search。
我运行成功了。可是全是英文的。但是我看你官网是中文的。so.想问下是否可以设置为中文还是需要自己配置.
if I run php artisan blog:install, I got some massages following.
php artisan key:generate
Application key [base64:cDeboONQP5eHhkErNlhyVfqCzHyWL/9SltOcJFSnZbQ=] set successfully.
php artisan migrate --seed
[Illuminate\Database\QueryException]
SQLSTATE[3D000]: Invalid catalog name: 1046 No database selected (SQL: create table migrations
(id
int unsign
ed not null auto_increment primary key, migration
varchar(255) not null, batch
int not null) default character set utf8 collate utf8_unicode_ci)
[PDOException]
SQLSTATE[3D000]: Invalid catalog name: 1046 No database selected
php artisan passport:install
Encryption keys generated successfully.
[Illuminate\Database\QueryException]
SQLSTATE[3D000]: Invalid catalog name: 1046 No database selected (SQL: insert into oauth_clients
(user_id
, n ame
, secret
, redirect
, personal_access_client
, password_client
, revoked
, updated_at
, created_at
) values (, PJ Blog Personal Access Client, QfMFsu6SGodoThaVinX8rTLS7K7nQbZNVqM94q9B, http://localhost, 1, 0, 0, 201
7-01-08 16:41:50, 2017-01-08 16:41:50))
[PDOException]
SQLSTATE[3D000]: Invalid catalog name: 1046 No database selected
And .env file like this:
APP_ENV=local
APP_KEY=base64:cDeboONQP5eHhkErNlhyVfqCzHyWL/9SltOcJFSnZbQ=
APP_DEBUG=true
APP_LOG_LEVEL=debug
APP_URL=http://localhost
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=
DB_USERNAME=
DB_PASSWORD=
I don't know if it's me or but after making the recent changes you did, my admin dashboard just don't show up. Everything else does show but the admin panel, all i see is a blank white page..
Maybe a good practice to think about some issues with SEO
Here is HTMLImprovements report from google webmasters tools search console
about the blog
Maybe we could use the articles Meta description as page metadescription
and article tags as title tags
Also Search Engines "like" when every page have 1 <h1>
安装后,点击“login”,出现 404 页面内。
修改原来的 .htaccess 如下:
# Redirect Trailing Slashes If Not A Folder...
# RewriteCond %{REQUEST_FILENAME} !-d
# RewriteRule ^(.*)/$ /$1 [L,R=301]
# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php/$1 [L]
点击 login 都是 404,只有在 url 后面添加 index.php,才可以看到页面。不过,样式与 JavaScript 文件都包含不进来了。我觉得你的这个项目并没有什么作用。
I modified the code on AuthController so can add more socialite providers buy changing public function redirectToProvider()
{
return Socialite::driver($github)->redirect();
}
to
public function redirectToProvider($provider)
{
return Socialite::driver($provider)->redirect();
}
public function redirectToProvider($provider)
{
return Socialite::driver($provider)->redirect();
}
/**
* Obtain the user information from GitHub.
*
* @return Response
*/
public function handleProviderCallback($provider)
{
$User = Socialite::driver($provider)->user();
$user = $this->user->getByProviderId($User->id);
if (auth()->check()) {
$currentUser = auth()->user();
if ($currentUser->provider_id) {
return redirect()->back();
} else {
if ($user) {
return redirect()->back();
} else {
$this->bindProvider($currentUser, $User);
return redirect()->back();
}
}
} else {
if ($user) {
auth()->loginUsingId($user->id);
return redirect()->to('article');
} else {
$this->registerUser($User);
return redirect()->to('auth/register');
}
}
}
/**
* Bind the github account.
*
* @param $currentUser
* @param $registerData
* @return mixed
*/
public function bindProvider($currentUser, $registerData)
{
$currentUser->provider_id = $registerData->user['id'];
$currentUser->name = $registerData->nickname;
$currentUser->url = $registerData->user['url'];
return $currentUser->save();
}
/**
* Save the register data in session.
*
* @param $registerData
*/
public function registerUser($registerData)
{
$data['avatar'] = $registerData->user['avatar_url'];
$data['provider_id'] = $registerData->user['id'];
$data['url'] = $registerData->user['url'];
$data['name'] = $registerData->nickname;
$data['nickname'] = $registerData->user['name'];
$data['email'] = $registerData->user['email'];
session()->put('oauthData', $data);
}
/**
* Display the github oauth for register page.
*
* @return \Illuminate\Contracts\View\Factory|\Illuminate\Http\RedirectResponse|\Illuminate\View\View
*/
public function create()
{
if (! session()->has('oauthData')) {
return redirect()->to('login');
}
$oauthData = array_merge(session('oauthData'), request()->old());
return view('auth.register', compact('oauthData'));
}
/**
* Store a new user.
*
* @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector
*/
public function store()
{
if (! session()->has('oauthData')) {
return redirect('login');
}
$this->validator(request()->all())->validate();
$oauthData = session('oauthData');
$data = array_merge($oauthData, request()->all());
$data['password'] = bcrypt($data['password']);
$data['status'] = true;
auth()->guard()->login(User::create($data));
session()->forget('oauthData');
return redirect()->to('article');
}
hi hope you doing well,
I try to edit a discussion and I get this error :
Argument 1 passed to App\Repositories\DiscussionRepository::update() must be an instance of App\Repositories\int, string given, called in C:\xampp\htdocs\blog\app\Http\Controllers\DiscussionController.php on line 121 and defined
both side from dashboard and also from the homepage...
the discussionRepository code :
/**
* Update a record by id.
*
* @param int $id
* @param array $data
* @return boolean
*/
public function update($id, $data)
{
$this->model = $this->checkAuthScope();
$discussion = $this->model->findOrFail($id);
if (is_array($data['tags'])) {
$this->syncTag($discussion, $data['tags']);
} else {
$this->syncTag($discussion, json_decode($data['tags']));
}
return $discussion->update($data);
}
Hi, thank you for this awesome blog.
my issue is when I make the discussion status off, I still can comment and I get a alert that the comment is disabled...
https://www.youtube.com/watch?v=EYimD-PBN9c
my fix for that is to check if the status is = 0 then I show just the comment without the textaria, and if = 1 I show normal comment for all guest and user..
my code :
@if($discussion->status == 0)
<comment commentable-type="discussions"
commentable-id="{{ $discussion->id }}"
null-text="dfasdf"></comment>
@else
@if(Auth::guest())
<comment commentable-type="discussions"
commentable-id="{{ $discussion->id }}"
null-text=""></comment>
@else
<comment username="{{ Auth::user()->name }}"
user-avatar="{{ Auth::user()->avatar }}"
commentable-type="discussions"
commentable-id="{{ $discussion->id }}"
null-text=""
can-comment></comment>
@endif
@endif
Hi,
when I try to edit profile, I get this error:
ErrorException in helpers.php line 412:
File js/jcrop.js not defined in asset manifest. (View: /home/ubuntu/workspace/resources/views/user/profile.blade.php)
in helpers.php line 412
at CompilerEngine->handleViewException(object(InvalidArgumentException), 1) in PhpEngine.php line 44
at PhpEngine->evaluatePath('/home/ubuntu/workspace/storage/framework/views/7eac6ec6ee2880a80eeb3f7ce028ddf3c482e05f.php', array('__env' => object(Factory), 'app' => object(Application), 'errors' => object(ViewErrorBag), 'user' => object(User))) in CompilerEngine.php line 59
at CompilerEngine->get('/home/ubuntu/workspace/resources/views/user/profile.blade.php', array('__env' => object(Factory), 'app' => object(Application), 'errors' => object(ViewErrorBag), 'user' => object(User))) in View.php line 137
...
...
...
Can You help me?
Thanks in advance
I believe I missed something?
or there is something missing in the migration?
Please advice.
app/Services/FileManager/BaseManager.php line 29
BTW, I posted a discussion in your blog about it.
Discussion won't open ;) Sorry....
Plus is there another way to select a page image without actually typing an image path like 'images/image.jpg' maybe to use a button to select a path of a page image from a device/computer storage just in case of an end user?
I am sorry if I am bothering you Sir, this a a great project that you have.
本地安装测试没有问题;
部署后出现问题
Right now, you can only know if user has voted by is_voted, in the comment.vue
Need also something like is_voted_type to know what kind of vote was that, Down or Up.
test/Unit dir name is error. you spell Unit start with \n
hi jian, my problem is when I try to upload an image to the article cover, the image upload for all articles, and it not show the extension of the image file, this is a video to explain to you the issue
thanks again.
i did everything from docs and it wont work. see http://psds.pl/
I try to add a new article but nothing happen the database is empty and the list of article also showing nothing.. U guess something related to the post method in the Form Article
` onSubmit() {
if (!this.tags || !this.selected) {
toastr.error('Category and Tag must select one or more.')
return;
}
let tagIDs = []
let url = 'article/' + (this.article.id || '')
let method = (this.mode == 'update') ? 'patch' : 'post'
for(var i = 0 ; i < this.tags.length ; i++) {
tagIDs[i] = this.tags[i].id
}
this.article.published_at = this.startTime.time
this.article.content = this.simplemde.value()
this.article.category_id = this.selected.id
this.article.tags = JSON.stringify(tagIDs)
this.$http[method](url, this.article)
.then((response) => {
toastr.success('You ' + this.mode + 'd the article success!')
this.$router.push('/dashboard/articles')
}).catch(({response}) => {
stack_error(response.data)
})
},
`
thanks
I use windows 10 + local Xampp server.
Hi,
Can You tell me where I can change language of control panel items like Articles, Tags etc.?
I also don't know where to change color of view elements like navbar?
Thanks
I can't upload, change avatar. It does select the avatar but there are no changes from the default avatar into a new selected one.
[Symfony\Component\Debug\Exception\FatalThrowableError]
Class 'Faker\Factory' not found
php artisan passport:install
Encryption keys generated successfully.
Personal access client created successfully.
Hello, I've pulled the latest version that uses the AvatarUpload.vue but still i have the avatar upload issue, but it does upload the images into the public path uploads/avatar it's just it doesn't change from default avatar into a new uploaded avatar... I uploaded a screen shot of the issue so you can see because i get this... http://127.0.0.1:8000/user/profile/1 with a response status code 302, it seems like it does Post but doesn't return anything.
Please help, Thank you.
Hello,
How would you create a live video stream, would you use a facebook live api or what, like if i wanna create an article with a live video stream just like on facebook?
in user profile when i try to upload an avatar i get this javascript error
Uncaught TypeError: $(...).ajaxForm is not a function
I installed one fresh blog from your GIThub repo.
I still have this error
500 Base table or view not found: 1146 Table 'votables' doesn't exist
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.