https://github.com/uptutu/yattao
个人博客源码
https://github.com/uptutu/yattao
Last synced: over 1 year ago
JSON representation
个人博客源码
- Host: GitHub
- URL: https://github.com/uptutu/yattao
- Owner: uptutu
- Created: 2018-12-07T07:25:29.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2023-01-04T21:52:29.000Z (over 3 years ago)
- Last Synced: 2025-02-10T03:47:53.531Z (over 1 year ago)
- Language: PHP
- Size: 19 MB
- Stars: 2
- Watchers: 0
- Forks: 0
- Open Issues: 20
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
## About this Project
This project is my first personal Web in the Internet.
You can browse Yattao[https://www.yattao.top] to visit this complete.
## Power By

## Technology stack
HTML
CSS
JS
PHP7.2+
MySQL5.8+
Bootstrap 4
Laravel6
## Target of This Project
- Message Board
- Blog
- User Login
- Push this Web application in Internet
## Core Code
Message Board Core Code
```PHP
class MsgBoardController extends Controller
{
public function __construct()
{
$this->middleware('auth')->except(['index',]);
}
public function index()
{
$msgs = Msg::orderBy('created_at', 'desc')->get();
return view('models.messageboard', compact('msgs'));
}
public function store(Request $request, Msg $msg)
{
$user_id = Auth::id();
$content = clean( $request->input('content'), 'default');
if (!empty($content)){
$msg->user_id = $user_id;
$msg->content = $content;
$msg->save();
return redirect()->to(route('msgs.index'))->with('success', '留言成功!');
} else {
return redirect()->to(route('msgs.index'))->with('danger', '留言失败!');
}
}
public function destroy(Msg $msg)
{
$this->authorize('delete', $msg);
$msg->delete();
return redirect()->to(route('msgs.index'))->with('success', '成功删除留言');
}
}
```
## Summaries
Mastering the use of the Laravel framework allows you to quickly develop a WEB application based on Laravel and familiarize yourself with using bootstrap to build front-end pages.
Third-party cloud chip behavior verification is used as additional validation.