1/5/2022
This commit is contained in:
13
app/Http/Controllers/Controller.php
Normal file
13
app/Http/Controllers/Controller.php
Normal file
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
|
||||
use Illuminate\Foundation\Bus\DispatchesJobs;
|
||||
use Illuminate\Foundation\Validation\ValidatesRequests;
|
||||
use Illuminate\Routing\Controller as BaseController;
|
||||
|
||||
class Controller extends BaseController
|
||||
{
|
||||
use AuthorizesRequests, DispatchesJobs, ValidatesRequests;
|
||||
}
|
||||
53
app/Http/Controllers/DUNGA.php
Normal file
53
app/Http/Controllers/DUNGA.php
Normal file
@@ -0,0 +1,53 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use App\Http\Resources\ContactResource;
|
||||
use App\Models\Contact;
|
||||
use App\Http\Resources\MomoResource;
|
||||
use App\Models\Momo;
|
||||
|
||||
class DUNGA extends Controller
|
||||
{
|
||||
public function settings() {
|
||||
return response()->json(array(
|
||||
'status' => true,
|
||||
'message' => 'Thành công',
|
||||
'contacts' => ContactResource::collection(Contact::where('status', 1)->get()),
|
||||
'note' => '<p style="margin-right: 0px; margin-bottom: 3px; margin-left: 0px; background-color: rgb(247, 247, 247);"><span style="font-weight: 600; background-color: rgb(255, 255, 255);"><span style="font-size: 15px;"><font color="#ff0000">HỆ THỐNG CHẲN LẺ TÀI XỈU UY TÍN AUTO THANH TOÁN TỰ ĐỘNG</font></span></span></p><p style="margin-right: 0px; margin-bottom: 3px; margin-left: 0px; background-color: rgb(247, 247, 247);"><span style="font-weight: 600; background-color: rgb(255, 255, 255);"><span style="font-size: 15px;"><font color="#ff0000"><br></font></span></span></p><p style="margin-right: 0px; margin-bottom: 3px; margin-left: 0px; background-color: rgb(247, 247, 247);"><span style="font-weight: 600; background-color: rgb(255, 255, 255);"><span style="font-size: 15px;"><font color="#ff0000"><br></font></span></span></p><h5 style="font-family: Tahoma; line-height: 1.1; color: rgb(51, 51, 51); margin-bottom: 10px; font-size: 14px; text-align: center; text-size-adjust: 100%;"><p style="margin-right: 0px; margin-bottom: 3px; margin-left: 0px; font-family: Tahoma, Verdana, Helvetica, sans-serif; caret-color: rgb(51, 51, 51); text-size-adjust: 100%; text-align: justify;"><span style="color: rgb(255, 0, 0); font-weight: bold;">ĐỌC THÔNG BÁO TRÁNH MẤT TIỀN : (MỚI)</span><br></p><p style="margin-right: 0px; margin-bottom: 3px; margin-left: 0px; font-family: Tahoma, Verdana, Helvetica, sans-serif; caret-color: rgb(51, 51, 51); text-size-adjust: 100%; text-align: justify;"><font style="text-align: left; -webkit-tap-highlight-color: transparent; font-weight: bold;">-</font><font style="text-align: left; -webkit-tap-highlight-color: transparent; font-weight: bold;"> </font><font color="#000000" style="text-align: left; -webkit-tap-highlight-color: transparent; font-weight: bold;">CHÚ Ý</font><font style="text-align: left; -webkit-tap-highlight-color: transparent; font-weight: bold;">: </font><font color="#000000" style="text-align: left; -webkit-tap-highlight-color: transparent;"><span style="font-weight: 600;">KHÔNG NÊN MÃI CHƠI 1 SỐ VÌ SỐ THAY ĐỔI LIÊN TỤC , NÊN TẢI LẠI TRANG SAU 10-20P VÀ LẤY SỐ HẠN MỨC THẤP CHƠI TIẾP . NẾU SỐ TRÊN WED ĐÃ TẮT VUI LÒNG KHÔNG CHƠI , KHI CHƠI TRÁNH KHÔNG TRẢ ĐƠN </span></font></p><p style="margin-right: 0px; margin-bottom: 3px; margin-left: 0px; font-family: Tahoma, Verdana, Helvetica, sans-serif; caret-color: rgb(51, 51, 51); text-size-adjust: 100%; text-align: justify;"><br></p><p style="margin-right: 0px; margin-bottom: 3px; margin-left: 0px; font-family: Tahoma, Verdana, Helvetica, sans-serif; caret-color: rgb(51, 51, 51); text-size-adjust: 100%; text-align: justify;"><span style="font-weight: bold;"><font color="#ff0000">- <span style="background-color: rgb(255, 255, 0);">Lỗi phải báo ngay trong 6 tiếng , tránh mất giao dịch sẽ không xữ lý được</span></font></span></p></h5><p style="margin-right: 0px; margin-bottom: 3px; margin-left: 0px;"><br style="color: rgb(51, 51, 51); font-family: Tahoma, Verdana, Helvetica, sans-serif; font-size: 14px;"></p>',
|
||||
'ads' => '',
|
||||
'active' => 1,
|
||||
'history' => 1,
|
||||
'only_win' => 1,
|
||||
'limit' => 10,
|
||||
'week_top' => 1,
|
||||
'day_mission' => array(
|
||||
'active' => 1,
|
||||
)
|
||||
));
|
||||
}
|
||||
|
||||
public function momo() {
|
||||
return response()->json(array(
|
||||
'status' => true,
|
||||
'message' => 'Thành công',
|
||||
'data_momo' => MomoResource::collection(Momo::where('status', 1)->get()),
|
||||
'game' => array(
|
||||
'active' => array('chanle2', 'chanle', 'taixiu2', 'taixiu', 'x3', 'hieu2so', 'lo', 'gap3'),
|
||||
'html' => view('game')->render()
|
||||
)
|
||||
));
|
||||
}
|
||||
|
||||
public function minigame(Request $request) {
|
||||
if ($request->game == 'day_mission') {
|
||||
$game = view('dayMission')->render();
|
||||
}
|
||||
return response()->json(array(
|
||||
'message' => 'Thành công',
|
||||
'html' => $game,
|
||||
'game' => $request->game
|
||||
));
|
||||
}
|
||||
}
|
||||
67
app/Http/Kernel.php
Normal file
67
app/Http/Kernel.php
Normal file
@@ -0,0 +1,67 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http;
|
||||
|
||||
use Illuminate\Foundation\Http\Kernel as HttpKernel;
|
||||
|
||||
class Kernel extends HttpKernel
|
||||
{
|
||||
/**
|
||||
* The application's global HTTP middleware stack.
|
||||
*
|
||||
* These middleware are run during every request to your application.
|
||||
*
|
||||
* @var array<int, class-string|string>
|
||||
*/
|
||||
protected $middleware = [
|
||||
// \App\Http\Middleware\TrustHosts::class,
|
||||
\App\Http\Middleware\TrustProxies::class,
|
||||
\Fruitcake\Cors\HandleCors::class,
|
||||
\App\Http\Middleware\PreventRequestsDuringMaintenance::class,
|
||||
\Illuminate\Foundation\Http\Middleware\ValidatePostSize::class,
|
||||
\App\Http\Middleware\TrimStrings::class,
|
||||
\Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull::class,
|
||||
];
|
||||
|
||||
/**
|
||||
* The application's route middleware groups.
|
||||
*
|
||||
* @var array<string, array<int, class-string|string>>
|
||||
*/
|
||||
protected $middlewareGroups = [
|
||||
'web' => [
|
||||
\App\Http\Middleware\EncryptCookies::class,
|
||||
\Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
|
||||
\Illuminate\Session\Middleware\StartSession::class,
|
||||
// \Illuminate\Session\Middleware\AuthenticateSession::class,
|
||||
\Illuminate\View\Middleware\ShareErrorsFromSession::class,
|
||||
\App\Http\Middleware\VerifyCsrfToken::class,
|
||||
\Illuminate\Routing\Middleware\SubstituteBindings::class,
|
||||
],
|
||||
|
||||
'api' => [
|
||||
// \Laravel\Sanctum\Http\Middleware\EnsureFrontendRequestsAreStateful::class,
|
||||
'throttle:api',
|
||||
\Illuminate\Routing\Middleware\SubstituteBindings::class,
|
||||
],
|
||||
];
|
||||
|
||||
/**
|
||||
* The application's route middleware.
|
||||
*
|
||||
* These middleware may be assigned to groups or used individually.
|
||||
*
|
||||
* @var array<string, class-string|string>
|
||||
*/
|
||||
protected $routeMiddleware = [
|
||||
'auth' => \App\Http\Middleware\Authenticate::class,
|
||||
'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
|
||||
'cache.headers' => \Illuminate\Http\Middleware\SetCacheHeaders::class,
|
||||
'can' => \Illuminate\Auth\Middleware\Authorize::class,
|
||||
'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class,
|
||||
'password.confirm' => \Illuminate\Auth\Middleware\RequirePassword::class,
|
||||
'signed' => \Illuminate\Routing\Middleware\ValidateSignature::class,
|
||||
'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
|
||||
'verified' => \Illuminate\Auth\Middleware\EnsureEmailIsVerified::class,
|
||||
];
|
||||
}
|
||||
21
app/Http/Middleware/Authenticate.php
Normal file
21
app/Http/Middleware/Authenticate.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Middleware;
|
||||
|
||||
use Illuminate\Auth\Middleware\Authenticate as Middleware;
|
||||
|
||||
class Authenticate extends Middleware
|
||||
{
|
||||
/**
|
||||
* Get the path the user should be redirected to when they are not authenticated.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @return string|null
|
||||
*/
|
||||
protected function redirectTo($request)
|
||||
{
|
||||
if (! $request->expectsJson()) {
|
||||
return route('login');
|
||||
}
|
||||
}
|
||||
}
|
||||
17
app/Http/Middleware/EncryptCookies.php
Normal file
17
app/Http/Middleware/EncryptCookies.php
Normal file
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Middleware;
|
||||
|
||||
use Illuminate\Cookie\Middleware\EncryptCookies as Middleware;
|
||||
|
||||
class EncryptCookies extends Middleware
|
||||
{
|
||||
/**
|
||||
* The names of the cookies that should not be encrypted.
|
||||
*
|
||||
* @var array<int, string>
|
||||
*/
|
||||
protected $except = [
|
||||
//
|
||||
];
|
||||
}
|
||||
17
app/Http/Middleware/PreventRequestsDuringMaintenance.php
Normal file
17
app/Http/Middleware/PreventRequestsDuringMaintenance.php
Normal file
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Middleware;
|
||||
|
||||
use Illuminate\Foundation\Http\Middleware\PreventRequestsDuringMaintenance as Middleware;
|
||||
|
||||
class PreventRequestsDuringMaintenance extends Middleware
|
||||
{
|
||||
/**
|
||||
* The URIs that should be reachable while maintenance mode is enabled.
|
||||
*
|
||||
* @var array<int, string>
|
||||
*/
|
||||
protected $except = [
|
||||
//
|
||||
];
|
||||
}
|
||||
32
app/Http/Middleware/RedirectIfAuthenticated.php
Normal file
32
app/Http/Middleware/RedirectIfAuthenticated.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Middleware;
|
||||
|
||||
use App\Providers\RouteServiceProvider;
|
||||
use Closure;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
|
||||
class RedirectIfAuthenticated
|
||||
{
|
||||
/**
|
||||
* Handle an incoming request.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param \Closure(\Illuminate\Http\Request): (\Illuminate\Http\Response|\Illuminate\Http\RedirectResponse) $next
|
||||
* @param string|null ...$guards
|
||||
* @return \Illuminate\Http\Response|\Illuminate\Http\RedirectResponse
|
||||
*/
|
||||
public function handle(Request $request, Closure $next, ...$guards)
|
||||
{
|
||||
$guards = empty($guards) ? [null] : $guards;
|
||||
|
||||
foreach ($guards as $guard) {
|
||||
if (Auth::guard($guard)->check()) {
|
||||
return redirect(RouteServiceProvider::HOME);
|
||||
}
|
||||
}
|
||||
|
||||
return $next($request);
|
||||
}
|
||||
}
|
||||
19
app/Http/Middleware/TrimStrings.php
Normal file
19
app/Http/Middleware/TrimStrings.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Middleware;
|
||||
|
||||
use Illuminate\Foundation\Http\Middleware\TrimStrings as Middleware;
|
||||
|
||||
class TrimStrings extends Middleware
|
||||
{
|
||||
/**
|
||||
* The names of the attributes that should not be trimmed.
|
||||
*
|
||||
* @var array<int, string>
|
||||
*/
|
||||
protected $except = [
|
||||
'current_password',
|
||||
'password',
|
||||
'password_confirmation',
|
||||
];
|
||||
}
|
||||
20
app/Http/Middleware/TrustHosts.php
Normal file
20
app/Http/Middleware/TrustHosts.php
Normal file
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Middleware;
|
||||
|
||||
use Illuminate\Http\Middleware\TrustHosts as Middleware;
|
||||
|
||||
class TrustHosts extends Middleware
|
||||
{
|
||||
/**
|
||||
* Get the host patterns that should be trusted.
|
||||
*
|
||||
* @return array<int, string|null>
|
||||
*/
|
||||
public function hosts()
|
||||
{
|
||||
return [
|
||||
$this->allSubdomainsOfApplicationUrl(),
|
||||
];
|
||||
}
|
||||
}
|
||||
28
app/Http/Middleware/TrustProxies.php
Normal file
28
app/Http/Middleware/TrustProxies.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Middleware;
|
||||
|
||||
use Illuminate\Http\Middleware\TrustProxies as Middleware;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class TrustProxies extends Middleware
|
||||
{
|
||||
/**
|
||||
* The trusted proxies for this application.
|
||||
*
|
||||
* @var array<int, string>|string|null
|
||||
*/
|
||||
protected $proxies;
|
||||
|
||||
/**
|
||||
* The headers that should be used to detect proxies.
|
||||
*
|
||||
* @var int
|
||||
*/
|
||||
protected $headers =
|
||||
Request::HEADER_X_FORWARDED_FOR |
|
||||
Request::HEADER_X_FORWARDED_HOST |
|
||||
Request::HEADER_X_FORWARDED_PORT |
|
||||
Request::HEADER_X_FORWARDED_PROTO |
|
||||
Request::HEADER_X_FORWARDED_AWS_ELB;
|
||||
}
|
||||
17
app/Http/Middleware/VerifyCsrfToken.php
Normal file
17
app/Http/Middleware/VerifyCsrfToken.php
Normal file
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Middleware;
|
||||
|
||||
use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken as Middleware;
|
||||
|
||||
class VerifyCsrfToken extends Middleware
|
||||
{
|
||||
/**
|
||||
* The URIs that should be excluded from CSRF verification.
|
||||
*
|
||||
* @var array<int, string>
|
||||
*/
|
||||
protected $except = [
|
||||
//
|
||||
];
|
||||
}
|
||||
22
app/Http/Resources/ContactResource.php
Normal file
22
app/Http/Resources/ContactResource.php
Normal file
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Resources;
|
||||
|
||||
use Illuminate\Http\Resources\Json\JsonResource;
|
||||
|
||||
class ContactResource extends JsonResource
|
||||
{
|
||||
/**
|
||||
* Transform the resource into an array.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @return array|\Illuminate\Contracts\Support\Arrayable|\JsonSerializable
|
||||
*/
|
||||
public function toArray($request)
|
||||
{
|
||||
return [
|
||||
'name' => $this->name,
|
||||
'href' => $this->href
|
||||
];
|
||||
}
|
||||
}
|
||||
28
app/Http/Resources/MomoResource.php
Normal file
28
app/Http/Resources/MomoResource.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Resources;
|
||||
|
||||
use Illuminate\Http\Resources\Json\JsonResource;
|
||||
|
||||
class MomoResource extends JsonResource
|
||||
{
|
||||
/**
|
||||
* Transform the resource into an array.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @return array|\Illuminate\Contracts\Support\Arrayable|\JsonSerializable
|
||||
*/
|
||||
public function toArray($request)
|
||||
{
|
||||
return [
|
||||
'username' => $this->phone,
|
||||
'status' => $this->status,
|
||||
'settings' => array(
|
||||
'transfers_today' => array(
|
||||
'times' => $this->times,
|
||||
'amount' => $this->amount
|
||||
)
|
||||
)
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user