/
var
/
www
/
html
/
web
/
routes
/
Upload File
HOME
<?php use Illuminate\Support\Facades\Route; use App\Http\Controllers\ShopifySettingController; use App\Http\Controllers\ShopifyWebhookController; use Illuminate\Support\Facades\Artisan; use App\Models\Plan; use App\Models\User; /* |-------------------------------------------------------------------------- | 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'); // })->middleware(['verify.shopify'])->name('home'); //Route::get('/', [ShopifySettingController::class, 'index'])->middleware(['verify.shopify'])->name('home'); Route::group(['middleware' => ['verify.shopify']], function () { Route::get('/', [ShopifySettingController::class, 'index'])->middleware(['verify.shopify'])->name('home'); Route::post('/domain-authentication', [ShopifySettingController::class, 'sf_domain_authentication'])->name('domain-authentication'); Route::post('/import-products', [ShopifySettingController::class, 'sf_import_products'])->name('import-products'); }); Route::get('/clear-cache', function () { Artisan::call('cache:clear'); Artisan::call('route:clear'); Artisan::call('view:clear'); Artisan::call('config:clear'); return "Cache cleared successfulldy"; }); Route::post('webhook/customers/redact', [ShopifyWebhookController::class, 'webhookGdprCustomersRedact']); Route::post('webhook/customers/data_request',[ShopifyWebhookController::class, 'webhookGdprCustomersDataRequest']); Route::post('webhook/shop/redact',[ShopifyWebhookController::class, 'webhookGdprShopRedact']); Route::get('/clear-data', function () { // dd( User::all()); // User::whereNotNull('id')->delete(); // User::truncate(); // }); }); Route::get('/Plan', function () { // $plan=Plan::find(1); // $plan->test=true; // $plan->save(); // $Plan=new Plan(); // $Plan->type="ONETIME"; // $Plan->name="SubscriptionFlow Plan"; // $Plan->price="30.00"; // $Plan->interval="ANNUAL"; // $Plan->capped_amount="0.00"; // $Plan->terms=NULL; // $Plan->trial_days=NULL; // $Plan->test=true; // $Plan=Plan::find(1); // $Plan->on_install=false; // $Plan->interval=""; // $Plan->save(); // User::whereNotNull('id')->delete(); // dd( User::all(),Plan::all()); /** * * To enable testing mode of payment update with true * */ dd( Plan::all()); $plan=Plan::find(1); $plan->test=false; $plan->save(); }); // dd( Plan::all()); Route::get('/example', function () { return response()->json([ 'message' => 'Hello, this is a JSON response!', 'success' => true, 'data' => [ 'id' => 1, 'name' => 'Example Item', ], ]); });