Laravel Installation (Mac Users) for other OS use https://laravel.com/docs/7.x
1)Install HomeBrew, if you don't have it already
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
- Download php and composer from terminal
brew install php composer
2.1) Make sure to place composer’s system-wide vendor bin directory in your $PATH so the Laravel executable can be located by your system.
echo 'export PATH="$PATH:$HOME/.composer/vendor/bin"' >> ~/.bash_profile
source ~/.bash_profile
- Laravel Installation
composer global require laravel/installer
- Clone the Repository
git clone https://github.com/Maher-RJ/Monitoring-system.git
- update the composer// very importan, otherwise u get error in the terminal with the autoload.php
cd path-of-the-Laravel-folder //the folder you cloned in monitoring system
composer updat
- Fix Database file Path To make the database work, in .env file you will need to edit DB_DATABASE and put there the path of data.sqlite which you will find it also in folder Laravel->database.
cd Laravel-folder
sudo nano .env
DB_DATABASE=/Users/MJ/Desktop/Monitoring-system-master/Laravel/database/data.sqlite //I use mac if you use mac too then instead of MJ, put your mac home folder name
7)Finally in Laravel Folder
cd Laravel-folder
php artisan serve --host=192.168.0.11 --port=8000 //put your ip
note! i use md5 hash, by defualt the password is "secret" and email is [email protected]
After you clone my Android repository, open Android studio and choose
Open an existing Android studio proejct
then open my android folder and choose build.gradle
.
You need to make some change in file Request.kt
.
in public val url: String = "http://192.168.0.11:8000/api/"
Change it to your Laravel localhost ip adress. Becuase the mobile app has to send an email and password using post HTTP request to the web API
note! password is "secret" and email is [email protected]