Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
JosephCrespin committed Jan 24, 2021
2 parents 8297b89 + f157292 commit 1d84cc3
Show file tree
Hide file tree
Showing 61 changed files with 14,762 additions and 200 deletions.
49 changes: 0 additions & 49 deletions .env.example

This file was deleted.

6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,9 @@ Homestead.json
Homestead.yaml
npm-debug.log
yarn-error.log
.DS_Store
app/.DS_Store
database/.DS_Store
public/.DS_Store
public/assets/.DS_Store
resources/.DS_Store
1 change: 1 addition & 0 deletions Procfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
web: vendor/bin/heroku-php-apache2 public/
85 changes: 36 additions & 49 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,62 +1,49 @@
<p align="center"><a href="https://laravel.com" target="_blank"><img src="https://raw.githubusercontent.com/laravel/art/master/logo-lockup/5%20SVG/2%20CMYK/1%20Full%20Color/laravel-logolockup-cmyk-red.svg" width="400"></a></p>
# "Factoría" team Challenge - Web development

<p align="center">
<a href="https://travis-ci.org/laravel/framework"><img src="https://travis-ci.org/laravel/framework.svg" alt="Build Status"></a>
<a href="https://packagist.org/packages/laravel/framework"><img src="https://img.shields.io/packagist/dt/laravel/framework" alt="Total Downloads"></a>
<a href="https://packagist.org/packages/laravel/framework"><img src="https://img.shields.io/packagist/v/laravel/framework" alt="Latest Stable Version"></a>
<a href="https://packagist.org/packages/laravel/framework"><img src="https://img.shields.io/packagist/l/laravel/framework" alt="License"></a>
</p>
# Perseo - Web Project
This is a full responsive web site made for PERSEO, a fictional Human Resources company. We did the front-end in React, where you can see some of the candidate profiles and courses you can buy. In addition, you have access to 'login' and 'registration' areas.<br>
From the back-end side, made with laravel, you will access into the user and admin private zones, being able to add your profile, modify or delete it.

## About Laravel
Live preview here: [Take a look to our project!!](https://)

Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experience to be truly fulfilling. Laravel takes the pain out of development by easing common tasks used in many web projects, such as:
## Design
Beautiful design made by [Lorena](https://github.com/crimanlor), check here the [prototipe](https://www.figma.com/file/jfpHMfhmKVMjA2M5BiU8U7/Hackaton?node-id=0%3A1).

- [Simple, fast routing engine](https://laravel.com/docs/routing).
- [Powerful dependency injection container](https://laravel.com/docs/container).
- Multiple back-ends for [session](https://laravel.com/docs/session) and [cache](https://laravel.com/docs/cache) storage.
- Expressive, intuitive [database ORM](https://laravel.com/docs/eloquent).
- Database agnostic [schema migrations](https://laravel.com/docs/migrations).
- [Robust background job processing](https://laravel.com/docs/queues).
- [Real-time event broadcasting](https://laravel.com/docs/broadcasting).
![Demo](public/assets/demoPerseo.gif)

Laravel is accessible, powerful, and provides tools required for large, robust applications.
## Prerequisites 📋
What you need to work on our project:

## Learning Laravel
```
Code editor and install React/Laravel
```

Laravel has the most extensive and thorough [documentation](https://laravel.com/docs) and video tutorial library of all modern web application frameworks, making it a breeze to get started with the framework.
### Installing 🔧
Clone ' repository from GitHub:
```
$ git clone https://
```

If you don't feel like reading, [Laracasts](https://laracasts.com) can help. Laracasts contains over 1500 video tutorials on a range of topics including Laravel, modern PHP, unit testing, and JavaScript. Boost your skills by digging into our comprehensive video library.
## Built With 🛠️
* HTML
* CSS
* React
* PHP
* Laravel

## Laravel Sponsors

We would like to extend our thanks to the following sponsors for funding Laravel development. If you are interested in becoming a sponsor, please visit the Laravel [Patreon page](https://patreon.com/taylorotwell).
## Authors ✒️
'Factoria Team'
* **Giacomo** - *Back-End* - [GitHub Giacomo](https://github.com/pilpod)
* **Joseph** - *Back-End* - [GitHub Joseph](https://github.com/JosephCrespin)
* **Lorena Criado** - *Front-End* - [GitHub Lorena](https://github.com/crimanlor)
* **Vanessa Poppe** - *Front-End* - [GitHub Vanessa](https://github.com/vanessacor)
* **Moisés Mena** - *Front-End* - [GitHub Moisés](https://github.com/mmena4)

### Premium Partners

- **[Vehikl](https://vehikl.com/)**
- **[Tighten Co.](https://tighten.co)**
- **[Kirschbaum Development Group](https://kirschbaumdevelopment.com)**
- **[64 Robots](https://64robots.com)**
- **[Cubet Techno Labs](https://cubettech.com)**
- **[Cyber-Duck](https://cyber-duck.co.uk)**
- **[Many](https://www.many.co.uk)**
- **[Webdock, Fast VPS Hosting](https://www.webdock.io/en)**
- **[DevSquad](https://devsquad.com)**
- **[Curotec](https://www.curotec.com/)**
- **[OP.GG](https://op.gg)**
## License 📄
This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details

## Contributing

Thank you for considering contributing to the Laravel framework! The contribution guide can be found in the [Laravel documentation](https://laravel.com/docs/contributions).

## Code of Conduct

In order to ensure that the Laravel community is welcoming to all, please review and abide by the [Code of Conduct](https://laravel.com/docs/contributions#code-of-conduct).

## Security Vulnerabilities

If you discover a security vulnerability within Laravel, please send an e-mail to Taylor Otwell via [[email protected]](mailto:[email protected]). All security vulnerabilities will be promptly addressed.

## License

The Laravel framework is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT).
## Acknowledgments 🎁
* Many thanks to [NUWE](https://nuwe.vercel.app/app) for proposing us to do this challenge as part of their Hackathon.
--------------------------------------------
46 changes: 46 additions & 0 deletions app/Http/Controllers/AdminController.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
<?php

namespace App\Http\Controllers;

use App\Models\User;
use Illuminate\Http\Request;

class AdminController extends Controller
{
public function __construct()
{
$this->middleware('admin');
}

public function index()
{
$users = User::all();

return view('admin-dashboard', ['users' => $users]);
}

public function edit($id)
{
$user = User::find($id);
return view('edit-user', ['user' => $user]);
}

public function show($id)
{
$user = User::find($id);
return view('show-user', ['user' => $user]);
}

public function update(Request $request, $id)
{
$user = User::find($id);

$user->name = $request->name;
$user->isAdmin = $request->isAdmin;

$user->save();

return view('show-user', ['user' => $user]);
}

}
2 changes: 2 additions & 0 deletions app/Http/Controllers/Auth/LoginController.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace App\Http\Controllers\Auth;

use App\Http\Controllers\Controller;
use App\Models\User;
use App\Providers\RouteServiceProvider;
use Illuminate\Foundation\Auth\AuthenticatesUsers;

Expand All @@ -26,6 +27,7 @@ class LoginController extends Controller
*
* @var string
*/

protected $redirectTo = RouteServiceProvider::HOME;

/**
Expand Down
2 changes: 2 additions & 0 deletions app/Http/Controllers/Auth/RegisterController.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ protected function validator(array $data)
'name' => ['required', 'string', 'max:255'],
'email' => ['required', 'string', 'email', 'max:255', 'unique:users'],
'password' => ['required', 'string', 'min:8', 'confirmed'],
'isAdmin' => ['required', 'string', 'max:255'],
]);
}

Expand All @@ -68,6 +69,7 @@ protected function create(array $data)
'name' => $data['name'],
'email' => $data['email'],
'password' => Hash::make($data['password']),
'isAdmin' => $data['isAdmin'],
]);
}
}
36 changes: 35 additions & 1 deletion app/Http/Controllers/HomeController.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
namespace App\Http\Controllers;

use Illuminate\Http\Request;
use App\Models\User;
use App\Models\WorkExperience;

class HomeController extends Controller
{
Expand All @@ -23,6 +25,38 @@ public function __construct()
*/
public function index()
{
return view('home');
$user = User::find(auth()->id());

return view('home', ['user' => $user]);
}

public function show(User $user)
{
$works = $user->WorkExperiences()->get();

return view('work-experiences', ['works' => $works]);

}

public function create()
{
return view('create-work');
}

public function store(Request $request)
{
WorkExperience::create([
'position' => $request->position,
'org_name' => $request->org_name,
'org_activity' => $request->org_activity,
'description' => $request->description,
'month_start' => $request->month_start,
'year_start' => $request->year_start,
'month_end' => $request->month_end,
'year_end' => $request->year_end,
'user_id' => auth()->id(),
]);

return redirect()->route('home');
}
}
15 changes: 15 additions & 0 deletions app/Http/Controllers/UserController.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?php

namespace App\Http\Controllers;

use App\Models\User;
use Illuminate\Http\Request;

class UserController extends Controller
{
public function index()
{

}

}
85 changes: 85 additions & 0 deletions app/Http/Controllers/WorkExperienceController.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
<?php

namespace App\Http\Controllers;

use App\Models\WorkExperience;
use Illuminate\Http\Request;

class WorkExperienceController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
//
}

/**
* Show the form for creating a new resource.
*
* @return \Illuminate\Http\Response
*/
public function create()
{
//
}

/**
* Store a newly created resource in storage.
*
* @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\Response
*/
public function store(Request $request)
{
//
}

/**
* Display the specified resource.
*
* @param \App\Models\WorkExperience $workExperience
* @return \Illuminate\Http\Response
*/
public function show(WorkExperience $workExperience)
{
//
}

/**
* Show the form for editing the specified resource.
*
* @param \App\Models\WorkExperience $workExperience
* @return \Illuminate\Http\Response
*/
public function edit(WorkExperience $workExperience)
{
//
}

/**
* Update the specified resource in storage.
*
* @param \Illuminate\Http\Request $request
* @param \App\Models\WorkExperience $workExperience
* @return \Illuminate\Http\Response
*/
public function update(Request $request, WorkExperience $workExperience)
{
//
}

/**
* Remove the specified resource from storage.
*
* @param \App\Models\WorkExperience $workExperience
* @return \Illuminate\Http\Response
*/
public function destroy(WorkExperience $workExperience)
{
//
}
}
Loading

0 comments on commit 1d84cc3

Please sign in to comment.