定制 yagneshprajapati/url-history-tracker 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

yagneshprajapati/url-history-tracker

最新稳定版本:v1.0.5

Composer 安装命令:

composer require yagneshprajapati/url-history-tracker

包简介

A package to track and manage URL history

README 文档

README

url-history-tracker is a Laravel package that tracks the last few URLs visited by a user during their session. It allows you to easily access these URLs, providing a handy way to redirect users back to a previous page or perform other actions based on their navigation history.

Features

  • Tracks the last N URLs visited by the user (configurable).
  • Provides a simple API to access the Nth last URL.
  • Option to retrieve URLs by their position in history (e.g., 2nd last, 3rd last).

Installation

You can install the package via Composer:

composer require yagneshprajapati/url-history-tracker

# Publish

php artisan vendor:publish --tag=config --provider="YagneshPrajapati\UrlHistoryTracker\UrlHistoryTrackerServiceProvider"

# Example:

use Illuminate\Support\Facades\Redirect;

// Get the 2nd last URL (default behavior)
$secondLastUrl = Redirect::getLastUrl();

// Get the 3rd last URL
$thirdLastUrl = Redirect::getLastUrl(3);

// Get the most recent URL (after the first one was popped)
$lastUrl = Redirect::getLastUrl(1);

统计信息

  • 总下载量: 22
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-08-09