<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class Galeri extends Model
{
protected $guarded = [];
protected $appends = ['gambar_slide_url'];
public function getGambarAttribute()
{
$url = explode('.', $this->image);
$n = $url[0].'-980x380.'.$url[1];
return $n;
}
public function getGambarThumbAttribute()
{
$url = explode('.', $this->image);
$n = $url[0].'-190x90.'.$url[1];
return $n;
}
public function getGambarSlideUrlAttribute()
{
$url = explode('.', $this->image);
$n = $url[0].'-980x380.'.$url[1];
return url('images/galeri/'.$n);
}
}
Anons79 File Manager Version 1.0, Coded By Anons79
Email: [email protected]