Prepping for launch. Reviewed-on: #1 Co-authored-by: Paul Couture <paul@paulcouture.com> Co-committed-by: Paul Couture <paul@paulcouture.com>
		
			
				
	
	
		
			37 lines
		
	
	
		
			662 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			37 lines
		
	
	
		
			662 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
| <?php
 | |
| 
 | |
| namespace App\Models;
 | |
| 
 | |
| use Illuminate\Database\Eloquent\Factories\HasFactory;
 | |
| use Illuminate\Database\Eloquent\Model;
 | |
| 
 | |
| class Wallet extends Model
 | |
| {
 | |
|     use HasFactory;
 | |
| 
 | |
|     protected $table = 'wallets';
 | |
| 
 | |
|     protected $dates = ['created_at', 'updated_at'];
 | |
| 
 | |
|     protected $casts = [
 | |
|         'created_at' => 'datetime',
 | |
|         'updated_at' => 'datetime',
 | |
|     ];
 | |
| 
 | |
|     public function walletType()
 | |
|     {
 | |
|         return $this->hasOne(WalletType::class);
 | |
|     }
 | |
| 
 | |
|     public function user()
 | |
|     {
 | |
|         return $this->hasOneThrough(User::class, Artist::class);
 | |
|     }
 | |
| 
 | |
|     public function artist()
 | |
|     {
 | |
|         return $this->belongsTo(Artist::class);
 | |
|     }
 | |
| 
 | |
| }
 |