jeffreyway / council Goto Github PK
View Code? Open in Web Editor NEWAn open source forum built on Laravel.
License: MIT License
An open source forum built on Laravel.
License: MIT License
I think it would be easier and more logic for the average user to have all the configurable data in the same place.
@JeffreyWay and everyone else: how do you feel about it? Does this approach have any real downside?
I think it will be nice if when the user access the root "/" route, he is redirected to to the threads page.
Currently any non-human visitors hitting the url cause an increment to happen for thread visits statistics.
which can create fake stats.
ThreadsController@show
$thread->increment('visits');
#
After installing the project, when trying to seed the database I notice a small type error.
In DatabaseSeeder.php line 16:
Parse error: syntax error, unexpected '->' (T_OBJECT_OPERATOR)
Sometimes when you install the forum you end up with some dirt on cache.
I think it will be cool if the command council:install clear the cache just to make sure everything is reseted.
When creating a new thread spam detection is triggered when posting code
Example code that triggers spam
public function index() { return view('home'); }
Posting this code when editing a thread does not trigger spam detection
THere arent any instructions to do the migration, it should be in step 2 after you set your DB config.
Syntax highlighting for various languages for thread bodies and replies
There is no command provided to use the database seeder.
It's good practice to do that within the php artisan migrate --seed
On MySQL database server older than 5.7.7 php artisan migrate
generates error "key was too long".
To solve this you need to add line: \Schema::defaultStringLength(191);
to AppServiceProvider@boot.
If i’m not mistaken the points on the favoritable class should be rewarded (and reduced) to the owner of the reply not to the authenticated user.
If your email address isn't yet confirmed, you shouldn't be able to visit the page to create a new thread. This is annoying.
When user replies to the same thread (without refreshing browser), editor's content hasn't cleared like after first time.
Not quite sure what's going on here..
➜ council git:(master) phpunit
PHPUnit 6.5.5 by Sebastian Bergmann and contributors.
..E...................S........................................ 63 / 103 ( 61%)
........S............................... 103 / 103 (100%)
Time: 10.39 seconds, Memory: 34.00MB
There was 1 error:
1) Tests\Console\InstallCommandTest::it_optionally_migrates_the_database
Mockery\Exception\NoMatchingExpectationException: No matching handler found for Mockery_0_App_Console_Commands_InstallCommand::call("cache:clear"). Either the method was unexpected or its arguments matched no expected argument list for this method
/Users/dframe/Projects/Deframe/council/vendor/mockery/mockery/library/Mockery/ExpectationDirector.php:93
/Users/dframe/Projects/Deframe/council/app/Console/Commands/InstallCommand.php:48
/Users/dframe/Projects/Deframe/council/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:29
/Users/dframe/Projects/Deframe/council/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:87
/Users/dframe/Projects/Deframe/council/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:31
/Users/dframe/Projects/Deframe/council/vendor/laravel/framework/src/Illuminate/Container/Container.php:549
/Users/dframe/Projects/Deframe/council/vendor/laravel/framework/src/Illuminate/Console/Command.php:183
/Users/dframe/Projects/Deframe/council/vendor/symfony/console/Command/Command.php:252
/Users/dframe/Projects/Deframe/council/vendor/laravel/framework/src/Illuminate/Console/Command.php:170
/Users/dframe/Projects/Deframe/council/vendor/symfony/console/Application.php:936
/Users/dframe/Projects/Deframe/council/vendor/symfony/console/Application.php:240
/Users/dframe/Projects/Deframe/council/vendor/symfony/console/Application.php:148
/Users/dframe/Projects/Deframe/council/vendor/laravel/framework/src/Illuminate/Console/Application.php:88
/Users/dframe/Projects/Deframe/council/vendor/laravel/framework/src/Illuminate/Console/Application.php:177
/Users/dframe/Projects/Deframe/council/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php:249
/Users/dframe/Projects/Deframe/council/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/InteractsWithConsole.php:18
/Users/dframe/Projects/Deframe/council/tests/Console/InstallCommandTest.php:56
/Users/dframe/.composer/vendor/phpunit/phpunit/src/TextUI/Command.php:195
/Users/dframe/.composer/vendor/phpunit/phpunit/src/TextUI/Command.php:148
ERRORS!
Tests: 103, Assertions: 187, Errors: 1, Skipped: 2.
For new installs, your readme looks to be missing an important note in step 2 for setting up the initial database migration. :)
php artisan migrate
Cheers!
David
Nice to have a attachment for thread and user can upload files
Users can successfully post a new reply without having their account confirmed.
Still not sure if it's intended or not, but I think this shouldn't be allowed :)
Currently after a user logins or registers, they are redirected to the /home
route.
Having their emails listed in a config file is ok to bootstrap things, but not good enough to stay there much longer :)
Tbh, I think a forum will need - at some point - a real roles system, but at first maybe we could add the isAdmin column directly to the users and make the user create him during the installation process.
When i subscribe to thread, it gives me console error.
Avoid mutating a prop directly since the value will be overwritten whenever the parent component re-renders. Instead, use a data or computed property based on the prop's value. Prop being mutated: "active"
Its good practice to add LICENSE.md
file to the project.
Click the new file button in the repository and name the file LICENSE.md click the choice a license from template button. Choose a license guide
GitHub supports adding issue and/or PR templates to pre-populate some things. This can ve very useful when you want to get extra info in issues, or ensure PRs have the quality the project has, or add tests, etc. As an example of an open-source project, we should add this templates.
Would be nice to add the function to edit/remove a channel.
It would be good if entire authentication system scaffolding was via AJAX like Laracasts
This is now standard Laravel and should speed up the tests once they are all passing.
There seems to be an issue with running migrations when prompted by the install command. This is the error I get when trying to do a fresh install:
SQLSTATE[HY000] [1044] Access denied for user ''@'localhost' to database 'forge' (SQL: select * from information_schema.tables where table_schema = forge and table_name = mi
grations)
Steps to reproduce
Clone the repo and follow installation instructions from README.
When prompted with the question whether you want to migrate the database, enter yes
.
Summary
php artisan council:install
..env
file..env
file but never picked up by the application instance.If you re-run install command after seeing that error (and even provide invalid data this time), the migrations will work because .env
file exists at the boot time.
That means the application instance will load up with correct environment variables, the migrations will be ran successfully, and the .env file will get populated with invalid data.
Since this is both open source project and video series on Laracast it could be opportune to include a roadmap either in the readme or in a new file.
This roadmap could include ideas you have or things you like to work on down the road and also mentioned if you want to do them yourself as a video on Laracast or have the community involved. This would also focus feature request PR's towards what you have in mind as the progression of Council.
If you prefer to use github issues maybe label issues with milestones and assign features you want to include as part of a video to yourself. While features you want the community to make, can be labeled with Help wanted
.
on TestCase disableExceptionHandling can be replace
// Hat tip, @adamwathan.
protected function disableExceptionHandling()
{
$this->oldExceptionHandler = $this->app->make(ExceptionHandler::class);
$this->app->instance(ExceptionHandler::class, new class extends Handler {
public function __construct() {}
public function report(\Exception $e) {}
public function render($request, \Exception $e) {
throw $e;
}
});
}
to
// Hat tip, @adamwathan.
protected function disableExceptionHandling()
{
$this->oldExceptionHandler = $this->app->make(ExceptionHandler::class);
$this->app->instance(ExceptionHandler::class, new \App\Exceptions\Handler($this->app));
}
for me it worked normally. please test, comments what you guys think?
composer.lock is not up to date and doesn't contain stevebauman/purify package, so you need to execute composer update
instead just of composer install
We think that much easier is just execute php artisan db:seed
instead of tinkering and generating fake channels and threads every time we need clean slate.
It seems switching to trix has broken instant username autocompletion.
In Lesson 8 Jeffrey uses the term reduce a user deletes a thread or a reply to lower the users reputation.
I would refer to these as transactions. Thus when a user deleted a thread or reply we should 'reverse' the reputation transaction related to the thread or reply
It would be nice if users accrue "reputation" points as they participate in the forum.
We should also then add further instructions to the readme of how to generate them
Maybe we should add more named routes for coherency and simplicity? :)
When you are merging PR and have more than one commit (merge commit is also a separated commit), then history of repo will be a lot more cleaner than now, when every PR is duplicated in Git's history.
Maybe with ban and/or account suspension system?
Hi,
it would be nice if we can see the test status within a badge in the readme.md.
I've done a few projects recently and utilized Vuetify. It's quite flexible and looks nice too. I would like to open a pull request to begin incorporating that theme into this project if others also agree this would be a good approach to take.
I got my eye on you, @JeffreyWay haha
Thanks for all the great content you work on. I smell a new series coming up.
The a_user_can_search_threads
test fails owing to the lack of valid Algolia credentials.
Isn't this incorrect; if I am signed in and favorite a reply by @JeffreyWay, then he should get the points, not me!
Line 39 in 5041b53
Hi,
I know you usually use foo.dev for a local development project
Unfortunately chrome forces all .dev to redirect to https, As I understand the gTLD .dev is registered by google and for some reason they have codded this into chrome.
If you don't have https setup for your local development, you cannot use .dev
The a_thread_requires_recaptcha_verification
test is failing since the reCaptcha test keys have been used - they always return a positive response:
With the following test keys, you will always get No CAPTCHA and all verification requests will pass.
Our tests expect verification to fail.
We could happy path the test, and assert that the thread was created?
It's good practice to add a CONTRIBUTING.md explaining the best ways for another person to contribute to your project. Here is a good example of one.
On the user's profile page, the activities are displaying escaped HTML tags.
The title is pretty much self-explanatory.
At this point, we should probably wait to see if PR #100 gets merged, and after that add configuration steps for every single database credential :)
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.