定制 brainboxlabs/persist-query 二次开发

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

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

brainboxlabs/persist-query

最新稳定版本:1.0.0

Composer 安装命令:

composer require brainboxlabs/persist-query

包简介

Persist request query parameters in Laravel controllers

README 文档

README

Persist request query parameters in Laravel controllers.

Use Case

Suppose you run a bookstore website with two pages; /home and /books. The /books page lists all the books you have stored in your database and allows users to filter books by name and author. Also, suppose a user applies the following filters on the books listing page /books?name=invisible&author=Mark. After navigating away from this page, say to /home and back to /books the applied filters will be lost. This package allows users to continue where they left off after navigating back to /books by restoring the page to its last known state /books?name=invisible&author=Mark.

Installation

composer require brainboxlabs/persist-query

Add Persist Query To Your Laravel Controller

<?php 

namespace App\Http\Controllers; 

use Illuminate\Http\Request; 

class BookController extends Controller 
{ 

    public function __construct() 
    { 
    	$this->middleware('persist-query:index');
    } 
 
    public function index(Request $request) 
    { 
    	// ...
    } 
}

The persist-query:action_name,another_action_name,... middleware should be used with GET controller actions.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: Unknown
  • 更新时间: 2023-06-06

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固