Ejemplo n.º 1
0
 /**
  * Get the permalink url.
  * 
  * @return string
  */
 public function getPermalinkUrlAttribute()
 {
     return root_domain(url('t/' . str_slug($this->permalink)));
 }
Ejemplo n.º 2
0
 /**
  * Sends the image response.
  *
  * @param      $path
  * @param bool $storage
  * @return mixed
  *
  * @author Cali
  */
 protected function imageResponse($path, $storage = true)
 {
     return response($storage ? Storage::get($path) : file_get_contents(public_path($path)), 200, ['Content-type' => 'image', 'Access-Control-Allow-Origin' => request()->secure() ? 'https://' : 'http://' . root_domain()]);
 }