-
Notifications
You must be signed in to change notification settings - Fork 164
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added mail register & reset password
fixed some bugs added simple register theme part
- Loading branch information
Showing
24 changed files
with
434 additions
and
37 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 |
---|---|---|
|
@@ -4,7 +4,6 @@ on: | |
push: | ||
tags: | ||
- "*" | ||
branches: [ "master" ] | ||
pull_request: | ||
branches: [ "master" ] | ||
|
||
|
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,108 @@ | ||
<?php | ||
|
||
namespace App\Http\Controllers\Admin; | ||
|
||
use App\Http\Controllers\Controller; | ||
use App\Http\Controllers\XController; | ||
use App\Http\Requests\GuestLogSaveRequest; | ||
use App\Models\Access; | ||
use App\Models\GuestLog; | ||
use Illuminate\Http\Request; | ||
use App\Helper; | ||
use function App\Helpers\hasCreateRoute; | ||
|
||
class GuestLogController extends XController | ||
{ | ||
|
||
// protected $_MODEL_ = GuestLog::class; | ||
// protected $SAVE_REQUEST = GuestLogSaveRequest::class; | ||
|
||
protected $cols = ['ip','action','created_at','loggable_type','loggable_id']; | ||
protected $extra_cols = ['id']; | ||
|
||
protected $searchable = ['action','ip']; | ||
|
||
protected $listView = 'admin.guestlogs.guestlog-list'; | ||
protected $formView = 'admin.guestlogs.guestlog-form'; | ||
|
||
|
||
protected $buttons = [ | ||
// 'edit' => | ||
// ['title' => "Edit", 'class' => 'btn-outline-primary', 'icon' => 'ri-edit-2-line'], | ||
// 'show' => | ||
// ['title' => "Detail", 'class' => 'btn-outline-light', 'icon' => 'ri-eye-line'], | ||
// 'destroy' => | ||
// ['title' => "Remove", 'class' => 'btn-outline-danger delete-confirm', 'icon' => 'ri-close-line'], | ||
]; | ||
|
||
|
||
public function __construct() | ||
{ | ||
parent::__construct(GuestLog::class, GuestLogSaveRequest::class); | ||
} | ||
|
||
/** | ||
* @param $guestlog GuestLog | ||
* @param $request GuestLogSaveRequest | ||
* @return GuestLog | ||
*/ | ||
public function save($guestlog, $request) | ||
{ | ||
|
||
$guestlog->save(); | ||
return $guestlog; | ||
|
||
} | ||
|
||
|
||
/** | ||
* Show the form for creating a new resource. | ||
*/ | ||
public function create() | ||
{ | ||
// | ||
return view($this->formView); | ||
} | ||
|
||
/** | ||
* Show the form for editing the specified resource. | ||
*/ | ||
public function edit(GuestLog $item) | ||
{ | ||
// | ||
return view($this->formView, compact('item')); | ||
} | ||
|
||
public function bulk(Request $request) | ||
{ | ||
|
||
// dd($request->all()); | ||
$data = explode('.', $request->input('action')); | ||
$action = $data[0]; | ||
$ids = $request->input('id'); | ||
switch ($action) { | ||
case 'delete': | ||
$msg = __(':COUNT items deleted successfully', ['COUNT' => count($ids)]); | ||
$this->_MODEL_::destroy($ids); | ||
break; | ||
|
||
default: | ||
$msg = __('Unknown bulk action : :ACTION', ["ACTION" => $action]); | ||
} | ||
|
||
return $this->do_bulk($msg, $action, $ids); | ||
} | ||
|
||
public function destroy(GuestLog $item) | ||
{ | ||
return parent::delete($item); | ||
} | ||
|
||
|
||
public function update(Request $request, GuestLog $item) | ||
{ | ||
return $this->bringUp($request, $item); | ||
} | ||
|
||
|
||
} |
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,28 @@ | ||
<?php | ||
|
||
namespace App\Http\Requests; | ||
|
||
use Illuminate\Foundation\Http\FormRequest; | ||
|
||
class GuestLogSaveRequest extends FormRequest | ||
{ | ||
/** | ||
* Determine if the user is authorized to make this request. | ||
*/ | ||
public function authorize(): bool | ||
{ | ||
return false; | ||
} | ||
|
||
/** | ||
* Get the validation rules that apply to the request. | ||
* | ||
* @return array<string, \Illuminate\Contracts\Validation\ValidationRule|array<mixed>|string> | ||
*/ | ||
public function rules(): array | ||
{ | ||
return [ | ||
// | ||
]; | ||
} | ||
} |
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,60 @@ | ||
<?php | ||
|
||
namespace App\Mail; | ||
|
||
use Illuminate\Bus\Queueable; | ||
use Illuminate\Contracts\Queue\ShouldQueue; | ||
use Illuminate\Mail\Mailable; | ||
use Illuminate\Mail\Mailables\Address; | ||
use Illuminate\Mail\Mailables\Content; | ||
use Illuminate\Mail\Mailables\Envelope; | ||
use Illuminate\Queue\SerializesModels; | ||
|
||
class AuthMail extends Mailable | ||
{ | ||
use Queueable, SerializesModels; | ||
|
||
/** | ||
* Create a new message instance. | ||
*/ | ||
public function __construct( | ||
protected string $code, | ||
) | ||
{ | ||
// | ||
} | ||
|
||
/** | ||
* Get the message envelope. | ||
*/ | ||
public function envelope(): Envelope | ||
{ | ||
return new Envelope( | ||
from: new Address(getSetting('email'),config('app.name')), | ||
subject: __('Authentication Mail').' - '. config('app.name'), | ||
); | ||
} | ||
|
||
/** | ||
* Get the message content definition. | ||
*/ | ||
public function content(): Content | ||
{ | ||
return new Content( | ||
view: 'website.auth-mail', | ||
with:[ | ||
'code' => $this->code | ||
], | ||
); | ||
} | ||
|
||
/** | ||
* Get the attachments for the message. | ||
* | ||
* @return array<int, \Illuminate\Mail\Mailables\Attachment> | ||
*/ | ||
public function attachments(): array | ||
{ | ||
return []; | ||
} | ||
} |
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
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,42 @@ | ||
@extends('admin.templates.panel-form-template') | ||
@section('title') | ||
@if(isset($item)) | ||
{{__("Edit guestlog")}} [{{$item->id}}] | ||
@else | ||
{{__("Add new guestlog")}} | ||
@endif - | ||
@endsection | ||
@section('form') | ||
|
||
<div class="row"> | ||
<div class="col-lg-3"> | ||
|
||
@include('components.err') | ||
<div class="item-list mb-3"> | ||
<h3 class="p-3"> | ||
<i class="ri-message-3-line"></i> | ||
{{__("Tips")}} | ||
</h3> | ||
<ul> | ||
<li> | ||
{{__("Recommends")}} | ||
</li> | ||
</ul> | ||
</div> | ||
|
||
</div> | ||
<div class="col-lg-9 ps-xl-1 ps-xxl-1"> | ||
<div class="general-form "> | ||
|
||
<h1> | ||
@if(isset($item)) | ||
{{__("Edit guestlog")}} [{{$item->id}}] | ||
@else | ||
{{__("Add new guestlog")}} | ||
@endif | ||
</h1> | ||
|
||
</div> | ||
</div> | ||
</div> | ||
@endsection |
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,15 @@ | ||
@extends('admin.templates.panel-list-template') | ||
|
||
@section('list-title') | ||
<i class="ri-user-3-line"></i> | ||
{{__("GuestLogs list")}} | ||
@endsection | ||
@section('title') | ||
{{__("GuestLogs list")}} - | ||
@endsection | ||
@section('filter') | ||
{{-- Other filters --}} | ||
@endsection | ||
@section('bulk') | ||
{{-- <option value="-"> - </option> --}} | ||
@endsection |
Oops, something went wrong.