This commit is contained in:
paoloar77
2024-05-17 19:10:21 +02:00
parent 23f5fcd25c
commit 18de78ce93
2 changed files with 18 additions and 1 deletions

10
app/WpPostMeta.php Normal file
View File

@@ -0,0 +1,10 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class WpPostMeta extends Model
{
protected $table = 'wp_postmeta';
}

View File

@@ -8,6 +8,7 @@ use App\Clientegm;
use App\Clientegmdest;
use App\Gm_product;
use App\Http\Controllers\TestPaoController;
use App\Models\WpPostMeta;
use App\Newproduct;
use App\Order;
use App\Orderdetail;
@@ -6054,12 +6055,18 @@ Route::get('/ordineclientegm/{id}', function ($id) {
Route::get('/provapao', [TestPaoController::class, 'provapao']);
Route::get('/aggiornapreorder/{idarticolo}', function ($idarticolo) {
Route::get('/aggiornapreorder/{idarticolo}/{postid}', function ($idarticolo, $postid) {
$product = Product::where('sku', $idarticolo)->first();
if ($product) {
dd($product);
$metadata = WpPostMeta::where('post_id', postid)->get();
if ($metadata) {
dd($metadata);
}
$aggiorna = false;
if ($aggiorna) {