Skip to content

wdc-nitsikkim/dashboard

Repository files navigation

Build Status Total Downloads Latest Stable Version License

Documentation

Setting up local environment

  • Download PHP v.7.0.33
  • Extract the above downloaded file to a suitable location
  • Add this folder to your path
    • Remove any other versions of PHP if present (just removing them from your path will work)
  • Open php.ini, which can be found at the root directory of the newly extracted PHP folder
  • Replace all occurences of D:\Program Files\php-7.0.33 with the absolute path of your PHP installation folder (as this version of PHP doesn't support relative paths)
  • Open a terminal and run php -v. If it looks something like below, you can continue else follow the above steps more carefully or try restarting your PC
  • php-v
  • After this, download Composer
  • Configure it accordingly so that you can run it from command line
  • composer-V
  • Clone this repository at a location of your preference.
  • Open a terminal inside this folder and run composer install or composer updateto download all the required dependencies
  • Create a .env file from the provided .env.sample and fill in the required fields
  • Run php artisan migrate from inside the project folder to migrate database structure
  • Finally, run php artisan serve to start your local development server at http://127.0.0.1:8000

For initial login

  • Open the database and insert an entry in the users table
    • Generate a compatible password by visiting http://127.0.0.1:8000/hash/{your-password} where {your password} is any string
    • Copy the above generated password & paste it in the password field of the new user
  • Insert a record in the user_roles table using the user_id of the above inserted row & role as admin for unrestricted access
  • Give c, r & u permissions to this new role using the user_role_permissions table (different row for each permission). role_id will be the same as id of the role you created in user_roles table

That's it, now open http://localhost:8000/login and login using the credentials (if the email you used belongs to the nitsikkim.ac.in domain, you can also login via google)