-
Notifications
You must be signed in to change notification settings - Fork 2
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
1 parent
d1e7eeb
commit a4f6106
Showing
7 changed files
with
223 additions
and
2 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,62 @@ | ||
<?php | ||
|
||
namespace App\Admin\Controllers; | ||
|
||
use App\Models\CounponCode; | ||
use Nicelizhi\Admin\Controllers\AdminController; | ||
use Nicelizhi\Admin\Form; | ||
use Nicelizhi\Admin\Grid; | ||
use Nicelizhi\Admin\Show; | ||
|
||
class CounponCodeController extends AdminController | ||
{ | ||
/** | ||
* Title for current resource. | ||
* | ||
* @var string | ||
*/ | ||
protected $title = 'CounponCode'; | ||
|
||
/** | ||
* Make a grid builder. | ||
* | ||
* @return Grid | ||
*/ | ||
protected function grid() | ||
{ | ||
$grid = new Grid(new CounponCode()); | ||
|
||
|
||
|
||
return $grid; | ||
} | ||
|
||
/** | ||
* Make a show builder. | ||
* | ||
* @param mixed $id | ||
* @return Show | ||
*/ | ||
protected function detail($id) | ||
{ | ||
$show = new Show(CounponCode::findOrFail($id)); | ||
|
||
|
||
|
||
return $show; | ||
} | ||
|
||
/** | ||
* Make a form builder. | ||
* | ||
* @return Form | ||
*/ | ||
protected function form() | ||
{ | ||
$form = new Form(new CounponCode()); | ||
|
||
|
||
|
||
return $form; | ||
} | ||
} |
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,71 @@ | ||
<?php | ||
|
||
namespace App\Admin\Controllers; | ||
|
||
use App\Models\UsersDomain; | ||
use Nicelizhi\Admin\Controllers\AdminController; | ||
use Nicelizhi\Admin\Form; | ||
use Nicelizhi\Admin\Grid; | ||
use Nicelizhi\Admin\Show; | ||
|
||
class UserDomainController extends AdminController | ||
{ | ||
/** | ||
* Title for current resource. | ||
* | ||
* @var string | ||
*/ | ||
protected $title = 'UsersDomain'; | ||
|
||
/** | ||
* Make a grid builder. | ||
* | ||
* @return Grid | ||
*/ | ||
protected function grid() | ||
{ | ||
$grid = new Grid(new UsersDomain()); | ||
|
||
$grid->column('id', __('Id')); | ||
$grid->column('domain', __('Domain')); | ||
$grid->column('user_id', __('User id')); | ||
$grid->column('created_at', __('Created at')); | ||
$grid->column('updated_at', __('Updated at')); | ||
|
||
return $grid; | ||
} | ||
|
||
/** | ||
* Make a show builder. | ||
* | ||
* @param mixed $id | ||
* @return Show | ||
*/ | ||
protected function detail($id) | ||
{ | ||
$show = new Show(UsersDomain::findOrFail($id)); | ||
|
||
$show->field('id', __('Id')); | ||
$show->field('domain', __('Domain')); | ||
$show->field('user_id', __('User id')); | ||
$show->field('created_at', __('Created at')); | ||
$show->field('updated_at', __('Updated at')); | ||
|
||
return $show; | ||
} | ||
|
||
/** | ||
* Make a form builder. | ||
* | ||
* @return Form | ||
*/ | ||
protected function form() | ||
{ | ||
$form = new Form(new UsersDomain()); | ||
|
||
$form->text('domain', __('Domain')); | ||
$form->number('user_id', __('User id')); | ||
|
||
return $form; | ||
} | ||
} |
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,62 @@ | ||
<?php | ||
|
||
namespace App\Admin\Controllers; | ||
|
||
use App\Models\UsersDomainRecord; | ||
use Nicelizhi\Admin\Controllers\AdminController; | ||
use Nicelizhi\Admin\Form; | ||
use Nicelizhi\Admin\Grid; | ||
use Nicelizhi\Admin\Show; | ||
|
||
class UserDomainRecordController extends AdminController | ||
{ | ||
/** | ||
* Title for current resource. | ||
* | ||
* @var string | ||
*/ | ||
protected $title = 'UsersDomainRecord'; | ||
|
||
/** | ||
* Make a grid builder. | ||
* | ||
* @return Grid | ||
*/ | ||
protected function grid() | ||
{ | ||
$grid = new Grid(new UsersDomainRecord()); | ||
|
||
|
||
|
||
return $grid; | ||
} | ||
|
||
/** | ||
* Make a show builder. | ||
* | ||
* @param mixed $id | ||
* @return Show | ||
*/ | ||
protected function detail($id) | ||
{ | ||
$show = new Show(UsersDomainRecord::findOrFail($id)); | ||
|
||
|
||
|
||
return $show; | ||
} | ||
|
||
/** | ||
* Make a form builder. | ||
* | ||
* @return Form | ||
*/ | ||
protected function form() | ||
{ | ||
$form = new Form(new UsersDomainRecord()); | ||
|
||
|
||
|
||
return $form; | ||
} | ||
} |
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,11 @@ | ||
<?php | ||
|
||
namespace App\Models; | ||
|
||
use Illuminate\Database\Eloquent\Factories\HasFactory; | ||
use Illuminate\Database\Eloquent\Model; | ||
|
||
class UsersDomain extends Model | ||
{ | ||
use HasFactory; | ||
} |
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 | ||
|
||
namespace App\Models; | ||
|
||
use Illuminate\Database\Eloquent\Factories\HasFactory; | ||
use Illuminate\Database\Eloquent\Model; | ||
|
||
class UsersDomainRecord extends Model | ||
{ | ||
use HasFactory; | ||
} |