Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/saiht/forum
https://github.com/saiht/forum
database forum laravel55 php phpunit test-automation thread
Last synced: 13 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/saiht/forum
- Owner: saiht
- Created: 2017-12-10T16:03:08.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2023-01-04T01:20:24.000Z (about 2 years ago)
- Last Synced: 2025-01-03T10:40:01.211Z (20 days ago)
- Topics: database, forum, laravel55, php, phpunit, test-automation, thread
- Language: PHP
- Size: 2.26 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 20
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Create forum with TDD
If you want to test this project, start by cloning the project with this command:
`git clone [email protected]:saiht/forum.git`
Then, copy .env.example to .env:
`cp .env.example .env`
Now you need to generate a new key for laravel:
`php artisan key:generate`
Edit .env file to access to your database.
To generate entities for users, threads, relies,... You need to use this command to migrate database:
`php artisan migrate`
And to generate entities, helpers have been created for you, copy and execute all the commands below:
`php artisan tinker`
You will have access to the artisan tinker to edit, add, remove,... entities. Type to generate threads, and then to generate replies to each thread
`$threads = factory('App\Thread', 50)->create();`
`$threads->each(function($thread) { factory('App\Reply', 10)->create([ 'thread_id' => $thread->id ]); });`Now you are ready, type :
`php artisan serve`
And open your browser to the indicated url.If you want, you have Unit/Feature testing available with the simple `phpunit` command.
Enjoy !