LaraBBS is a simple forum application writen with Laravel. It's a practice learn from
L02 Laravel 教程 - Web 开发实战进阶
L03 Laravel 教程 - 实战构架 API 服务器
- User authentication —— Register、Login、Logout
- Profile
- Upload images
- Multiple role manage
- Notification
- Custom Artisan command
The enviroment is Laravel Homestead. The following description will be made assuming user has already installed homestead.
1. Clone the source code
> https://github.com/JasonDontw/laravelbbs_v2.git
2. Set up Homestead
1). run the commend to edit Homestead.yaml
> homestead edit
2). edit Homestead.yaml
folders:
- map: ~/my-path/larabbs/ # your project path
to: /home/vagrant/larabbs
sites:
- map: larabbs.test
to: /home/vagrant/larabbs/public
databases:
- larabbs
3). apply chandes
> homestead provision
> homestead reload
3. Install composer
> composer install
4. Generate .env file
> cp .env.example .env
5. Generate key
> php artisan key:generate
6. Migration
php artisan migrate --seed
7. Set up hosts file
echo "192.168.10.10 phphub.app" | sudo tee -a /etc/hosts
yarn install
- running Mix
// run all Mix task...
npm run dev
// Run all Mix tasks and minify output...
npm run production
- watching assets for changes
npm run watch
You may find that in certain environments Webpack isn't updating when your files change. If this is the case on your system, consider using the watch-poll command:
npm run watch-poll
- Intervention/image
- predis/predis
- spatie/laravel-permission
- barryvdh/laravel-debugbar
- mewebstudio/Purifier
- hieu-le/active
- summerblue/administrator
- viacreative/sudo-su
- laravel/horizon
Calculate active user :
larabbs:calculate-active-user
Record user's last active time to datebase from Redis
larabbs:sync-user-actived-at