/
home
/
old_henza
/
server
/
routes
/
File Upload :
llllll
Current File: /home/old_henza/server/routes/web.php
<?php use App\Http\Controllers\api\CustomerController; use App\Models\ConfigStatic; use App\Models\Customer; use App\Models\Link; use App\Models\ProductVariant; use App\Models\Sms; use Illuminate\Http\JsonResponse; use Illuminate\Support\Facades\Route; use Illuminate\Support\Facades\Http; /* |-------------------------------------------------------------------------- | Web Routes |-------------------------------------------------------------------------- | | Here is where you can register web routes for your application. These | routes are loaded by the RouteServiceProvider within a group which | contains the "web" middleware group. Now create something great! | */ Route::get('/', function () { return view('welcome'); }); Route::get('/login', function () { Link::set('https://henzagold.com/app'); return redirect()->to('https://henzagold.com/app'); }); Route::get('/download', function () { Link::set('https://henzagold.com/download/henza.apk'); return redirect()->to('https://henzagold.com/download/henza.apk'); }); Route::get('/totalify', function () { $query = \App\Models\Collect::select(['collection_id_id' , 'product_id_id'])->get()->toArray(); $q = []; foreach ($query as $item) { if(!isset($q[$item['collection_id_id']])){ $q[$item['collection_id_id']] = 0; } $q[$item['collection_id_id']] += 1; } dd($q); foreach ($q as $item=>$total) { \App\Models\Category::where(['id'=>$item])->update(['total'=>$total]); } return true; }); /*Route::get('/readsms',[\App\Http\Controllers\Adm\AdminController::class , 'readSMS']);*/ Route::get('/confirem/order',[\App\Http\Controllers\Adm\AdminController::class , 'confiremOrder']); Route::get('/test2',function () { /* $message = 'علی قسامی'.' '."عزیز"."\n". "3 روز تا تخفیف های هیجان انگیز جمعه سیاه..."."\n". "تامینت رو به ما بسپار!"."\n". "اپلیکیشن طلای هنزا"; Sms::Send('09135517425' ,$message); return ;*/ $customers=Customer::get(); $customers->each(function ($item) { $message = $item->name.' '."عزیز"."\n". "3 روز تا تخفیف های هیجان انگیز جمعه سیاه..."."\n". "تامینت رو به ما بسپار!"."\n". "اپلیکیشن طلای هنزا"; Sms::Send($item->mobile ,$message); }); //Sms::Send('09128081392' ,$message); return true; //return true; /*$cutomer = Customer::all(); foreach ($cutomer as $item) { { CustomerController::updateRemain($item['id']); } }*/ }); //Site Api /*Route::get('config/menu' , [\App\Http\Controllers\Api\SiteController::class , 'getMenu']); Route::get('site/get-config' , [\App\Http\Controllers\Api\SiteController::class , 'getConfig']); Route::get('get-product' , [\App\Http\Controllers\Api\SiteController::class , 'getProduct']); Route::get('search' , [\App\Http\Controllers\Api\SiteController::class , 'searchProduct']); Route::get('products' , [\App\Http\Controllers\Api\SiteController::class , 'Products']);*/
Copyright ©2k19 -
Hexid
|
Tex7ure