Last active
April 26, 2017 07:12
-
-
Save sanuj/0bbf15c11c35be686c3c8e5823a8cf09 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Models; | |
use Illuminate\Database\Eloquent\Model; | |
class EeShippingStatus extends Model | |
{ | |
const INITIATED = 1; | |
const DISPATCHED = 2; | |
const DELIVERED = 3; | |
const RETURNED = 4; | |
const PENDING_RETURN = 5; | |
public static function getStatusNameAttribute($shipping_id) { | |
$map = [ null, 'Initiated', 'Dispatched', 'Delivered', 'Returned', 'Pending Return' ]; | |
return $map[$shipping_id] ?? null; | |
} | |
} |
znck
commented
Apr 26, 2017
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment