forked from DioBom/BomShop
-
Notifications
You must be signed in to change notification settings - Fork 0
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
9 changed files
with
144 additions
and
65 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?php | ||
/** +---------------------------------------------------------------------- | ||
* | KeepMoving | ||
* +---------------------------------------------------------------------- | ||
* | Date : 16/6/5 下午4:08 | ||
* +---------------------------------------------------------------------- | ||
* | Author: WuXueHai '<367052992@qq.com>' | ||
* +----------------------------------------------------------------------*/ | ||
|
||
namespace App\Http\Controllers\Admin; | ||
|
||
use App\Http\Controllers\Controller; | ||
|
||
class LoginController extends Controller | ||
{ | ||
public function login(){ | ||
return View('Admin.login'); | ||
} | ||
} |
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,12 @@ | ||
<?php | ||
/** +---------------------------------------------------------------------- | ||
* | KeepMoving | ||
* +---------------------------------------------------------------------- | ||
* | Date : 16/6/5 下午3:57 | ||
* +---------------------------------------------------------------------- | ||
* | Author: WuXueHai '<367052992@qq.com>' | ||
* +----------------------------------------------------------------------*/ | ||
|
||
namespace App\Models\Admin; | ||
|
||
class Admin |
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,8 @@ | ||
<?php | ||
/** +---------------------------------------------------------------------- | ||
* | KeepMoving | ||
* +---------------------------------------------------------------------- | ||
* | Date : 16/6/5 下午3:49 | ||
* +---------------------------------------------------------------------- | ||
* | Author: WuXueHai '<367052992@qq.com>' | ||
* +----------------------------------------------------------------------*/ |
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,17 @@ | ||
<?php | ||
/** +---------------------------------------------------------------------- | ||
* | KeepMoving | ||
* +---------------------------------------------------------------------- | ||
* | Date : 16/6/5 下午3:45 | ||
* +---------------------------------------------------------------------- | ||
* | Author: WuXueHai '<367052992@qq.com>' | ||
* +----------------------------------------------------------------------*/ | ||
|
||
namespace App\Models\Admin; | ||
|
||
use Zizaco\Entrust\EntrustRole; | ||
|
||
class Role extends EntrustRole | ||
{ | ||
|
||
} |
34 changes: 0 additions & 34 deletions
34
database/migrations/2014_10_12_000000_create_users_table.php
This file was deleted.
Oops, something went wrong.
31 changes: 0 additions & 31 deletions
31
database/migrations/2014_10_12_100000_create_password_resets_table.php
This file was deleted.
Oops, something went wrong.
71 changes: 71 additions & 0 deletions
71
database/migrations/2016_06_05_073918_entrust_setup_tables.php
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,71 @@ | ||
<?php | ||
use Illuminate\Database\Migrations\Migration; | ||
use Illuminate\Database\Schema\Blueprint; | ||
|
||
class EntrustSetupTables extends Migration | ||
{ | ||
/** | ||
* Run the migrations. | ||
* | ||
* @return void | ||
*/ | ||
public function up() | ||
{ | ||
// Create table for storing roles | ||
Schema::create('roles', function (Blueprint $table) { | ||
$table->increments('id'); | ||
$table->string('name')->unique(); | ||
$table->string('display_name')->nullable(); | ||
$table->string('description')->nullable(); | ||
$table->timestamps(); | ||
}); | ||
|
||
// Create table for associating roles to users (Many-to-Many) | ||
Schema::create('role_user', function (Blueprint $table) { | ||
$table->integer('user_id')->unsigned(); | ||
$table->integer('role_id')->unsigned(); | ||
|
||
/*$table->foreign('user_id')->references('id')->on('') | ||
->onUpdate('cascade')->onDelete('cascade'); | ||
$table->foreign('role_id')->references('id')->on('roles') | ||
->onUpdate('cascade')->onDelete('cascade');*/ | ||
|
||
$table->primary(['user_id', 'role_id']); | ||
}); | ||
|
||
// Create table for storing permissions | ||
Schema::create('permissions', function (Blueprint $table) { | ||
$table->increments('id'); | ||
$table->string('name')->unique(); | ||
$table->string('display_name')->nullable(); | ||
$table->string('description')->nullable(); | ||
$table->timestamps(); | ||
}); | ||
|
||
// Create table for associating permissions to roles (Many-to-Many) | ||
Schema::create('permission_role', function (Blueprint $table) { | ||
$table->integer('permission_id')->unsigned(); | ||
$table->integer('role_id')->unsigned(); | ||
|
||
$table->foreign('permission_id')->references('id')->on('permissions') | ||
->onUpdate('cascade')->onDelete('cascade'); | ||
$table->foreign('role_id')->references('id')->on('roles') | ||
->onUpdate('cascade')->onDelete('cascade'); | ||
|
||
$table->primary(['permission_id', 'role_id']); | ||
}); | ||
} | ||
|
||
/** | ||
* Reverse the migrations. | ||
* | ||
* @return void | ||
*/ | ||
public function down() | ||
{ | ||
Schema::drop('permission_role'); | ||
Schema::drop('permissions'); | ||
Schema::drop('role_user'); | ||
Schema::drop('roles'); | ||
} | ||
} |
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,11 @@ | ||
<?php | ||
/** +---------------------------------------------------------------------- | ||
* | KeepMoving | ||
* +---------------------------------------------------------------------- | ||
* | Date : 16/6/5 下午4:13 | ||
* +---------------------------------------------------------------------- | ||
* | Author: WuXueHai '<367052992@qq.com>' | ||
* +----------------------------------------------------------------------*/ | ||
echo 111; |