<?php
namespace App\Casts;
use Illuminate\Contracts\Database\Eloquent\CastsAttributes;

class HttpToHttps  implements CastsAttributes
{
    public function get($model, string $key, $value, array $attributes)
    {
        return  $value = str_replace('http://','https://',$value);
    }


    public function set($model, string $key, $value, array $attributes)
    {

        return  $value = str_replace('http://','https://',$value);
    }
}
