Skip to content

Commit

Permalink
用户个人页面原型
Browse files Browse the repository at this point in the history
  • Loading branch information
summerblue committed Jul 31, 2020
1 parent 2e89037 commit e205f6e
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 0 deletions.
14 changes: 14 additions & 0 deletions app/Http/Controllers/UsersController.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?php

namespace App\Http\Controllers;

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

class UsersController extends Controller
{
public function show(User $user)
{
return view('users.show', compact('user'));
}
}
38 changes: 38 additions & 0 deletions resources/views/users/show.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
@extends('layouts.app')

@section('title', $user->name . ' 的个人中心')

@section('content')

<div class="row">

<div class="col-lg-3 col-md-3 hidden-sm hidden-xs user-info">
<div class="card ">
<img class="card-img-top" src="https://cdn.learnku.com/uploads/images/201709/20/1/PtDKbASVcz.png?imageView2/1/w/600/h/600" alt="{{ $user->name }}">
<div class="card-body">
<h5><strong>个人简介</strong></h5>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. </p>
<hr>
<h5><strong>注册于</strong></h5>
<p>January 01 1901</p>
</div>
</div>
</div>
<div class="col-lg-9 col-md-9 col-sm-12 col-xs-12">
<div class="card ">
<div class="card-body">
<h1 class="mb-0" style="font-size:22px;">{{ $user->name }} <small>{{ $user->email }}</small></h1>
</div>
</div>
<hr>

{{-- 用户发布的内容 --}}
<div class="card ">
<div class="card-body">
暂无数据 ~_~
</div>
</div>

</div>
</div>
@stop
2 changes: 2 additions & 0 deletions routes/web.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,5 @@
Route::get('email/verify', 'Auth\VerificationController@show')->name('verification.notice');
Route::get('email/verify/{id}/{hash}', 'Auth\VerificationController@verify')->name('verification.verify');
Route::post('email/resend', 'Auth\VerificationController@resend')->name('verification.resend');

Route::resource('users', 'UsersController', ['only' => ['show', 'update', 'edit']]);

0 comments on commit e205f6e

Please sign in to comment.