Skip to content

LucasDontw/laravelbbs_v2

Repository files navigation

About LaraBBS

LaraBBS is a simple forum application writen with Laravel. It's a practice learn from
L02 Laravel 教程 - Web 开发实战进阶
L03 Laravel 教程 - 实战构架 API 服务器

alt demo

Feature

  • User authentication —— Register、Login、Logout
  • Profile
  • Upload images
  • Multiple role manage
  • Notification
  • Custom Artisan command

Build/Set up

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

Front-end set up

  1. install node.js
  2. install Yarn
  3. install Laravel Mix
yarn install
  1. running Mix
// run all Mix task...
npm run dev

// Run all Mix tasks and minify output...
npm run production
  1. 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

Used package

Custom Artisan command

Calculate active user :

larabbs:calculate-active-user

Record user's last active time to datebase from Redis

larabbs:sync-user-actived-at

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages