Unverified Commit 7a0b1505 authored by excaandita's avatar excaandita Committed by GitHub
Browse files

Merge pull request #21 from excaandita/tampilan

tampilan
No related merge requests found
Showing with 108 additions and 39 deletions
+108 -39
......@@ -13,12 +13,13 @@
class BiodataController extends Controller
{
public function create(){
public function create()
{
$user = Auth::user();
$prodis = Prodi::all();
return view('pages.portofolio.biodata-create', [
'user' => $user,
'prodis'=>$prodis
'prodis' => $prodis
]);
}
public function store(Request $request)
......@@ -26,7 +27,7 @@ public function store(Request $request)
$validator = Validator::make($request->all(), [
'name' => 'required|string|max:255',
'nim' => 'nullable|string|max:255',
'email' => 'required','string','email','max:255',Rule::unique('users')->ignore($request->id),
'email' => 'required', 'string', 'email', 'max:255', Rule::unique('users')->ignore($request->id),
'tempat_lahir' => 'nullable|string|max:255',
'tanggal_lahir' => 'nullable|date',
'address_one' => 'nullable|string',
......@@ -38,24 +39,48 @@ public function store(Request $request)
]);
if ($validator->fails()) {
return response(['errors'=>$validator->errors()->all()], 422);
return response(['errors' => $validator->errors()->all()], 422);
}
if ($request->file('foto')) {
$user = User::where('id', $request->users_id)->first();
//mengatur nama file foto
$file = $request->file('foto');
$filename= date('Ymdhi').$file->getClientOriginalName();
$file->move(public_path('public/images'), $filename);
$user = User::where('id', $request->users_id)->first();
$user['name'] = $request['name'];
$user['image'] = $filename;
$user['nim'] = $request['nim'];
$user['email'] = $request['email'];
$user['tempat_lahir'] = $request['tempat_lahir'];
$user['tanggal_lahir'] = $request['tanggal_lahir'];
$user['address_one'] = $request['address_one'];
$user['alamat_solo'] = $request['alamat_solo'];
$user['angkatan'] = $request['angkatan'];
$user['fakultas'] = 'Sekolah Vokasi';
$user['deskripsi'] = $request['deskripsi'];
$user['prodis_id'] = $request['prodis_id'];
$user['phone_number'] = $request['phone_number'];
$user['updated_at'] = Carbon::now();
}else{
$user = User::where('id', $request->users_id)->first();
$user['name'] = $request['name'];
$user['nim'] = $request['nim'];
$user['email'] = $request['email'];
$user['tempat_lahir'] = $request['tempat_lahir'];
$user['tanggal_lahir'] = $request['tanggal_lahir'];
$user['address_one'] = $request['address_one'];
$user['alamat_solo'] = $request['alamat_solo'];
$user['angkatan'] = $request['angkatan'];
$user['fakultas'] = 'Sekolah Vokasi';
$user['deskripsi'] = $request['deskripsi'];
$user['prodis_id'] = $request['prodis_id'];
$user['phone_number'] = $request['phone_number'];
$user['updated_at'] = Carbon::now();
}
$user['name'] = $request['name'];
$user['nim'] = $request['nim'];
$user['email'] = $request['email'];
$user['tempat_lahir'] = $request['tempat_lahir'];
$user['tanggal_lahir'] = $request['tanggal_lahir'];
$user['address_one'] = $request['address_one'];
$user['alamat_solo'] = $request['alamat_solo'];
$user['angkatan'] = $request['angkatan'];
$user['fakultas'] = 'Sekolah Vokasi';
$user['deskripsi'] = $request['deskripsi'];
$user['prodis_id'] = $request['prodis_id'];
$user['phone_number'] = $request['phone_number'];
$user['updated_at'] = Carbon::now();
$user->save();
$prodi = Prodi::where('id', $user->prodis_id)->first(); ///untuk nyari nama prodi
......@@ -66,7 +91,8 @@ public function store(Request $request)
]);
}
public function index() {
public function index()
{
$user = Auth::user();
$prodi = Prodi::where('id', $user->prodis_id)->first();
return view('pages.portofolio.biodata', [
......@@ -74,5 +100,4 @@ public function index() {
'prodi' => $prodi
]);
}
}
......@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "22ec04fdb27989edea94168be1fa344c",
"content-hash": "d6b6c1821d29854d2c98317cbbb3a9ca",
"packages": [
{
"name": "asm89/stack-cors",
......@@ -1634,31 +1634,29 @@
},
{
"name": "kavist/rajaongkir",
"version": "dev-master",
"version": "v1.1.0",
"source": {
"type": "git",
"url": "https://github.com/rizqunazs/rajaongkir.git",
"reference": "b0f137fed3a8d678494004938e38bd53d4d71bc1"
"reference": "c1ab72000d05b1cb6b0a1a1364d6200b78976377"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/rizqunazs/rajaongkir/zipball/b0f137fed3a8d678494004938e38bd53d4d71bc1",
"reference": "b0f137fed3a8d678494004938e38bd53d4d71bc1",
"url": "https://api.github.com/repos/rizqunazs/rajaongkir/zipball/c1ab72000d05b1cb6b0a1a1364d6200b78976377",
"reference": "c1ab72000d05b1cb6b0a1a1364d6200b78976377",
"shasum": ""
},
"require": {
"php": "^8.0"
"php": "^7.0"
},
"require-dev": {
"codedungeon/phpunit-result-printer": "^0.26.2",
"fzaninotto/faker": "^1.8",
"guzzlehttp/guzzle": "^6.3",
"mockery/mockery": "^1.2",
"orchestra/testbench": "^6.24.1",
"phpunit/phpunit": "^9.5",
"spatie/phpunit-watcher": "^1.23"
"orchestra/testbench": "^4.1",
"phpunit/phpunit": "^8.0",
"spatie/phpunit-watcher": "^1.12"
},
"default-branch": true,
"type": "library",
"extra": {
"laravel": {
......@@ -1705,9 +1703,9 @@
"rajaongkir"
],
"support": {
"source": "https://github.com/rizqunazs/rajaongkir/tree/master"
"source": "https://github.com/rizqunazs/rajaongkir/tree/v1.1.0"
},
"time": "2022-06-24T14:57:57+00:00"
"time": "2019-10-11T01:21:56+00:00"
},
{
"name": "laravel/framework",
......@@ -10095,14 +10093,12 @@
],
"aliases": [],
"minimum-stability": "dev",
"stability-flags": {
"kavist/rajaongkir": 20
},
"stability-flags": [],
"prefer-stable": true,
"prefer-lowest": false,
"platform": {
"php": "^7.3|^8.0"
},
"platform-dev": [],
"plugin-api-version": "2.3.0"
"plugin-api-version": "2.0.0"
}
......@@ -36,6 +36,22 @@ body {
font-family: "Nunito Sans", sans-serif;
-webkit-font-smoothing: antialiased;
}
.card {
position: relative;
display: -ms-flexbox;
display: flex;
-ms-flex-direction: column;
flex-direction: column;
min-width: 0;
word-wrap: break-word;
background-color: #fff;
background-clip: border-box;
border: 1px solid rgba(0,0,0,.125);
border-radius: 15px;
}
.card:hover{
box-shadow: 0 10px 20px rgba(0,0,0,.12), 0 4px 8px rgba(0,0,0,.06);
}
h1,
h2,
......@@ -507,6 +523,38 @@ .header__nav__option {
text-align: right;
padding: 30px 0;
}
.header__nav__option ul li .dropdown {
position: absolute;
left: 0;
top: 56px;
width: 150px;
background: #111111;
text-align: left;
padding: 5px 0;
z-index: 9;
opacity: 0;
visibility: hidden;
-webkit-transition: all, 0.3s;
-o-transition: all, 0.3s;
transition: all, 0.3s;
}
.header__nav__option ul li .dropdown li {
display: block;
margin-right: 0;
}
.header__nav__option ul li .dropdown li a {
font-size: 14px;
color: #ffffff;
font-weight: 400;
padding: 5px 20px;
text-transform: capitalize;
}
.header__nav__option ul li .dropdown li a:after {
display: none;
}
.header__nav__option a {
display: inline-block;
......
public/images/phone/0818930452.png

3.49 KB

public/images/phone/097778287372.png

3.14 KB

public/img/LOGO-SV-1.webp

10.1 KB

public/img/bg1.jpeg

7.57 KB

public/img/person.png

1.82 KB

public/public/images/202208040356LOGO-SV-1.webp

10.1 KB

public/public/images/202208040357LOGO-SV-1.webp

10.1 KB

public/public/images/202208040358LOGO-TGP-512.webp

51.3 KB

public/public/images/202208040359LOGO-TGP-512.webp

51.3 KB

public/public/images/202208040400LOGO-TGP-512.webp

51.3 KB

public/public/images/202208040401LOGO-TGP-512.webp

51.3 KB

public/public/images/202208040647pngwing.com (24).png

4.44 MB

File added
@extends('layouts.app')
@extends('1')
@section('content')
<div class="container">
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment