I have doing following query
$x = Invoice::all();
dd($x);
But I am getting following answer where I am not able to read most of object.
#table: "event_invoice"
#primaryKey: "Id"
#connection: null
#perPage: 15
+incrementing: true
+timestamps: true
#attributes: array:38 [ …38]
#original: array:38 [ …38]
#relations: []
#hidden: []
#visible: []
#appends: []
#fillable: []
#guarded: array:1 [ …1]
#dates: []
#dateFormat: null
#casts: []
#touches: []
#observables: []
#with: []
#morphClass: null
+exists: true
+wasRecentlyCreated: false
Here the arrays is not readable.
My Eloquent look like this
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Invoice extends Model
{
//
protected $table = 'event_invoice';
protected $primaryKey = 'Id';
/*
* An invoice can has many payments
*
*/
public function payments(){
return $this->hasMany('App\paymentrecieved');
}
public function comments(){
return $this->hasMany('App\comments');
}
}
Is there any mistake I am doing
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire