diff --git a/.env.example b/.env.example old mode 100644 new mode 100755 diff --git a/.gitattributes b/.gitattributes old mode 100644 new mode 100755 diff --git a/.gitignore b/.gitignore old mode 100644 new mode 100755 diff --git a/README.md b/README.md old mode 100644 new mode 100755 index b81272a..167d71c --- a/README.md +++ b/README.md @@ -1,58 +1,66 @@ +# DO NOT PUSH ANYTHING TO MASTER. ALL WORK SHOULD BE DONE ON A SEPARATE BRANCH AND MERGED IN +# THERE HAS BEEN TOO MUCH BROKEN CODE PUSHED TO MASTER + # Project Information ## About Project -Taskr is task sourcing platform for people to outsource tasks to others who wants to make a quick living from it. Taskr is built on Laravel framework using PHP 7.1 and currently developed by a group of five developers. + +Taskr is task sourcing platform for people to outsource tasks to others who wants to make a quick living from it. Taskr is currently ## Setting Your Dev Environment -> ###### As this project is not meant to be production ready, it is advisable to perform the same steps below when deploying the application for production. - -#### Follow the steps below to replicate the environment required for development. There are two ways to setup _Taskr_ where one involves in running the environment in a virtual machine while the other in your local machine. It is up to your discretion in the choice made. - -### Using Homestead (Recommended) -1. Install and Configure Homestead by following this [guide](https://laravel.com/docs/5.4/homestead). - 1. When configuring the `sites` in `homestead.yaml`, use the code block below and replace the folder path with the actual path - ``` - sites: - - map: homestead.app - to: {folder_path}/public - ``` -2. Start Homestead by `vagrant up` and SSH into Homestead using `vagrant ssh`. -3. Navigate into the project folder within the SSH session and run `composer install` to get PHP dependencies. -4. Run `yarn` to install Javascript dependencies (e.g. jQuery, Bootstrap, etc.). -5. Run `cp .env.example .env` and modify the .env file using your favourite editor e.g. `nano`, `vim`, `sublime` -6. From [Laravel Homestead](https://laravel.com/docs/5.4/homestead) guide, put in the username and password of the PostgreSQL into .env. defaults: `username: homestead, password: secret` -7. Login to PostgreSQL database by running `psql -U homestead -h localhost` and create database using `CREATE DATABASE taskr` within `psql` shell. -8. Generate an application key for laravel by running the command `php artisan key:generate`. -9. Run database migrations to setup the database tables automatically using `php artisan migrate`. - 1. You can also execute database setup code using the SQL file provided `psql -U homestead -h localhost example.sql`. -10. If configured properly in the guide found in step 1, your application should be accessible from your local machine through the domain you have configured. - -### Using XAMP (LAMP, MAMP, WAMP) Stack -1. Installing the pre-requisites using one-click installers provided by Bitnami below. Choose your stack based on your host operating system. - 1. https://bitnami.com/stack/lamp (Linux) - 2. https://bitnami.com/stack/wamp (Windows) - 3. https://bitnami.com/stack/mamp (MacOS) -2. Install `composer` onto your machine from https://getcomposer.org/. -3. Navigate to the project folder and run `composer install` to install PHP dependencies. -4. In the same folder, run `yarn` to install Javascript dependencies (e.g. jQuery, Bootstrap, etc.). -5. Create `.env` file and copy `.env.example` content into it. Configure `.env` information with respect to your host configuration. -6. Access your `postgreSQL` database using `phpPgAdmin` and create a new database called `taskr`. -7. Run database migrations to setup the database tables automatically using `php artisan migrate`. - 1. You can also execute database setup code using the SQL file provided `psql -U {your_username} -h localhost example.sql`. -8. Ensure that your project folder is in your Apache folder (e.g. Linux - /var/www/html) and it has writable permissions. -9. Navigate to the site based on your Apache settings using your browser. +1. Configure Homestead by following this [guide](https://laravel.com/docs/5.4/homestead). +2. Start Homestead by `vagrant up` and SSH into it using `vagrant ssh`. +3. Navigate into the project folder within the SSH session and run `composer install` to get dependencies. +4. Run `yarn` to get javascript dependencies (e.g. jquery, bootstrap, etc.). +5. Execute `cp .env.example .env` and modify the .env file using your favourite editor e.g. `nano`, `vim` +6. From [Laravel Homestead](https://laravel.com/docs/5.4/homestead) guide, put in the username and password of the PostgreSQL into .env. +7. Login to PostgreSQL database using shell commands or Datagrip and create database called `taskr`. +8. To generate an application key, run the command `php artisan key:generate`. +9. Run database migrations to setup the tables using `php artisan migrate:reset`. +10. If configured properly in step 1, your application should be accessible from your machine through the domain you configured. ## Database Models and Manipulation -Due to the restrictions against ORMs (Eloquent), the project requires the execution of raw queries instead. To understand how to do that in Laravel, take a look at their [documentation](https://laravel.com/docs/5.4/database#running-queries) to learn more. +Due to the restrictions against ORMs (Eloquent), the project requires the execution of raw queries instead. To understand how to do that in Laravel, take a look at their [documentation](https://laravel.com/docs/5.4/database#running-queries) to learn more. + +# Laravel Information +--- +
| Title | Category | Start | End | -Bids | Status | +Max Bid | +Total Bids | +|
|---|---|---|---|---|---|---|---|---|
| {{$task->category}} | {{$task->start_date}} | {{$task->end_date}} | -{{$task->total_bids}} - @if($task->new_bids > 0) - {{$task->new_bids}} new - @endif - | @php switch($task->status) { @@ -58,6 +92,12 @@ } @endphp | +{{ $maxprice }} | + +{{ $countbids }} | ++ Edit + |
Home Page
diff --git a/resources/views/layouts/app.blade.php b/resources/views/layouts/app.blade.php old mode 100644 new mode 100755 diff --git a/resources/views/layouts/errors.blade.php b/resources/views/layouts/errors.blade.php old mode 100644 new mode 100755 diff --git a/resources/views/layouts/footer.blade.php b/resources/views/layouts/footer.blade.php old mode 100644 new mode 100755 diff --git a/resources/views/layouts/nav.blade.php b/resources/views/layouts/nav.blade.php old mode 100644 new mode 100755 diff --git a/resources/views/tasks/create.blade.php b/resources/views/tasks/create.blade.php old mode 100644 new mode 100755 diff --git a/resources/views/tasks/edit.blade.php b/resources/views/tasks/edit.blade.php old mode 100644 new mode 100755 index 8afd978..de7fd47 --- a/resources/views/tasks/edit.blade.php +++ b/resources/views/tasks/edit.blade.php @@ -46,7 +46,7 @@ value="{{ $task->end_date }}" placeholder="YYYY-MM-DD HH:mm">Start Time: {{ $task->start_date }}
-Category: {{ $task->category }}
-End Time: {{ $task->end_date }}
-Category: {{ $task->category }}
+Start Time: {{ $task->start_date }}
+End Time: {{ $task->end_date }}
Description: {{ $task->description }}
- - - -The Search results for your query {{ $query }} are :
+| Title | +Created_at | +Category | +Start_Date | +End_Date | +
|---|---|---|---|---|
| {{$task->title}} | +{{$task->created_at}} | +{{$task->category}} | +{{$task->start_date}} | +{{$task->end_date}} | +
Owner: {{$taskOwner->first_name}} {{$taskOwner->last_name}}
-Created at: {{ $task->created_at }}
-Category: {{ $task->category }}
-Start Time: {{ $task->start_date }}
-End Time: {{ $task->end_date }}
-Description: {{ $task->description }}
-Category: {{ $task->category }}
+Start Time: {{ $task->start_date }}
+End Time: {{ $task->end_date }}
+Description: {{ $task->description }}
+ @if (Auth::check() && ($user->is_admin || $user->id == $task->owner)) + Edit + {{ Form::open(['method' => 'DELETE', 'route' => ['task.destroy', $task->id]]) }} + {{ Form::submit('Delete', ['class' => 'btn btn-danger']) }} + {{ Form::close() }} + @endif