I am Trying to get deleted data in laravel charts but its not working.
$daily_e = [
'chart_title' => 'No. of Ecommerce sales on daily bases (Current Month)',
'report_type' => 'group_by_date',
'model' => 'App\EcommerceHistory::withTrashed()',
'group_by_field' => 'created_at',
'group_by_period' => 'day',
'chart_type' => 'bar',
];
Model
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
class EcommerceHistory extends Model
{
use SoftDeletes;
protected $table="ecommerce_histories";
}
I tried to use withTrashed() in model attribute but its not working.
I also want to get deleted data's information.
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire