-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
115 changed files
with
5,250 additions
and
308 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Changelog | ||
All notable changes to this project will be documented in this file. | ||
|
||
The format is based on [Keep a Changelog](http://keepachangelog.com/) | ||
and this project adheres to [Semantic Versioning](http://semver.org/). | ||
|
||
## [Unreleased] | ||
### Added | ||
- Post publish and draft status | ||
- Soft delete support of models | ||
|
||
### Changed | ||
- Dashboard panel text | ||
|
||
### Fixed | ||
- Post editor full screen bug | ||
|
||
## 0.1.0 - 2017-05-29 | ||
### Added | ||
- Integrated dashboard with AdminLTE and used [webpack.mix.js](webpack.mix.js) | ||
- Repository mode | ||
- Base CRUD of Permission, Role, User, Category, Tag, Post | ||
- Migrations and Seeder of Permission, Role, User, Category, Tag, Post |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# Todo list of project | ||
|
||
## Backend | ||
|
||
- [x] Category | ||
- [x] Tag | ||
- [ ] Comment | ||
- [ ] Visitor & view count(use Middleware) | ||
- [ ] Cache | ||
- [ ] Notification | ||
- [ ] Socialite | ||
- [ ] Wechat related | ||
- [ ] Schedule(backup,stat,) | ||
- [ ] I18N | ||
|
||
## Frontend | ||
|
||
- [ ] Materialize css | ||
- [ ] Search | ||
- [ ] Websocket | ||
|
||
## Future | ||
|
||
- [ ] Refactor views with VueJs | ||
- [ ] API | ||
- [ ] Package | ||
- [ ] Unit test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?php | ||
|
||
namespace App\Http\Controllers\Auth\Traits; | ||
|
||
trait AuthRedirect | ||
{ | ||
/** | ||
* Where to redirect users after login (Priority) | ||
* | ||
* @return string | ||
*/ | ||
protected function redirectTo() | ||
{ | ||
return route('dashboard.index'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
<?php | ||
|
||
namespace App\Http\Controllers\Backend; | ||
|
||
use App\Http\Controllers\Controller; | ||
use App\Http\Requests\StoreUpdateCategoryRequest; | ||
use App\Repositories\Contracts\CategoryRepository; | ||
use Illuminate\Http\Request; | ||
|
||
class CategoryController extends Controller | ||
{ | ||
protected $cateRepo; | ||
|
||
/** | ||
* CategoryController constructor. | ||
* @param CategoryRepository $cateRepo | ||
*/ | ||
public function __construct(CategoryRepository $cateRepo) | ||
{ | ||
$this->cateRepo = $cateRepo; | ||
} | ||
|
||
/** | ||
* Display a listing of the resource. | ||
* | ||
* @return \Illuminate\Http\Response | ||
*/ | ||
public function index() | ||
{ | ||
$categories = $this->cateRepo->paginate(); | ||
|
||
return view('admin.categories.index', compact('categories')); | ||
} | ||
|
||
/** | ||
* Show the form for creating a new resource. | ||
* | ||
* @return \Illuminate\Http\Response | ||
*/ | ||
public function create() | ||
{ | ||
return view('admin.categories.create'); | ||
} | ||
|
||
/** | ||
* Store a newly created resource in storage. | ||
* | ||
* @param StoreUpdateCategoryRequest $request | ||
* @return \Illuminate\Http\Response | ||
*/ | ||
public function store(StoreUpdateCategoryRequest $request) | ||
{ | ||
$category = $this->cateRepo->createCategory($request->all()); | ||
|
||
return redirect()->route('categories.index'); | ||
} | ||
|
||
/** | ||
* Display the specified resource. | ||
* | ||
* @param int $id | ||
* @return \Illuminate\Http\Response | ||
*/ | ||
public function show($id) | ||
{ | ||
$category = $this->cateRepo->find($id); | ||
|
||
return response($category); | ||
} | ||
|
||
/** | ||
* Show the form for editing the specified resource. | ||
* | ||
* @param int $id | ||
* @return \Illuminate\Http\Response | ||
*/ | ||
public function edit($id) | ||
{ | ||
$category = $this->cateRepo->find($id); | ||
|
||
return view('admin.categories.edit', compact('category')); | ||
} | ||
|
||
/** | ||
* Update the specified resource in storage. | ||
* | ||
* @param StoreUpdateCategoryRequest $request | ||
* @param int $id | ||
* @return \Illuminate\Http\Response | ||
*/ | ||
public function update(StoreUpdateCategoryRequest $request, $id) | ||
{ | ||
$category = $this->cateRepo->updateCategory($request->all(), $id); | ||
|
||
return redirect()->route('categories.index'); | ||
} | ||
|
||
/** | ||
* Remove the specified resource from storage. | ||
* | ||
* @param int $id | ||
* @return \Illuminate\Http\Response | ||
*/ | ||
public function destroy($id) | ||
{ | ||
$this->cateRepo->delete($id); | ||
|
||
return redirect()->route('categories.index'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?php | ||
|
||
namespace App\Http\Controllers\Backend; | ||
|
||
use Illuminate\Http\Request; | ||
use App\Http\Controllers\Controller; | ||
|
||
class DashboardController extends Controller | ||
{ | ||
public function index() | ||
{ | ||
return view('admin.home'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
<?php | ||
|
||
namespace App\Http\Controllers\Backend; | ||
|
||
use App\Http\Requests\StoreUpdatePermissionRequest; | ||
use App\Repositories\Contracts\PermissionRepository; | ||
use Illuminate\Http\Request; | ||
use App\Http\Controllers\Controller; | ||
|
||
class PermissionController extends Controller | ||
{ | ||
protected $permRepo; | ||
|
||
/** | ||
* PermissionController constructor. | ||
* @param \App\Repositories\Contracts\PermissionRepository $permRepo | ||
*/ | ||
public function __construct(PermissionRepository $permRepo) | ||
{ | ||
$this->permRepo = $permRepo; | ||
} | ||
|
||
/** | ||
* Display a listing of the resource. | ||
* | ||
* @return \Illuminate\Http\Response | ||
*/ | ||
public function index() | ||
{ | ||
$permissions = $this->permRepo->paginate(); | ||
|
||
return view('admin.permissions.index', compact('permissions')); | ||
} | ||
|
||
/** | ||
* Show the form for creating a new resource. | ||
* | ||
* @return \Illuminate\Http\Response | ||
*/ | ||
public function create() | ||
{ | ||
return view('admin.permissions.create'); | ||
} | ||
|
||
/** | ||
* Store a newly created resource in storage. | ||
* | ||
* @param StoreUpdatePermissionRequest $request | ||
* @return \Illuminate\Http\Response | ||
*/ | ||
public function store(StoreUpdatePermissionRequest $request) | ||
{ | ||
$perm = $this->permRepo->create($request->all()); | ||
|
||
return redirect()->route('permissions.index'); | ||
} | ||
|
||
/** | ||
* Display the specified resource. | ||
* | ||
* @param int $id | ||
* @return \Illuminate\Http\Response | ||
*/ | ||
public function show($id) | ||
{ | ||
$perm = $this->permRepo->find($id); | ||
|
||
return response($perm); | ||
} | ||
|
||
/** | ||
* Show the form for editing the specified resource. | ||
* | ||
* @param int $id | ||
* @return \Illuminate\Http\Response | ||
*/ | ||
public function edit($id) | ||
{ | ||
$permission = $this->permRepo->find($id); | ||
|
||
return view('admin.permissions.edit', compact('permission')); | ||
} | ||
|
||
/** | ||
* Update the specified resource in storage. | ||
* | ||
* @param StoreUpdatePermissionRequest $request | ||
* @param int $id | ||
* @return \Illuminate\Http\Response | ||
*/ | ||
public function update(StoreUpdatePermissionRequest $request, $id) | ||
{ | ||
$perm = $this->permRepo->update($request->all(), $id); | ||
|
||
return redirect()->route('permissions.index'); | ||
} | ||
|
||
/** | ||
* Remove the specified resource from storage. | ||
* | ||
* @param int $id | ||
* @return \Illuminate\Http\Response | ||
*/ | ||
public function destroy($id) | ||
{ | ||
$this->permRepo->delete($id); | ||
|
||
return redirect()->route('permissions.index'); | ||
} | ||
} |
Oops, something went wrong.