Download the PHP package jcergolj/after-action-redirect-pagination-url-for-laravel without Composer

On this page you can find all versions of the php package jcergolj/after-action-redirect-pagination-url-for-laravel. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package after-action-redirect-pagination-url-for-laravel

Why

Watch the video

The After Action Redirect Pagination URL for Laravel package provides a solution for two issues that developers may encounter when working with pagination in their Laravel application. These issues include redirected to an empty last page after deleting the last item on the last page.

Installation

Saving and Redirecting to Last Index URL with Query Parameters

This package allows you to save the full URL, including any query parameters, of the index page in the intended URL session. After a create or update action, you can use the to_intended_route helper method to be redirected to the same page. You can also include or exclude routes from the intended URL saving mechanism for greater customization.

To use this feature, add the following code to your controller:

By default, to_intended_route will redirect to the last intended URL. If no URL was intended, it will redirect to the users.index route.

Example:

Include and Exclude routes

To include or exclude routes from the intended URL saving mechanism, create a SetIntendedUrlMiddleware class in the App\Http\Middleware namespace. In this class, you can specify the routes that should be excluded or included using the $excludedRoutes and $includedRoutes arrays.

Redirect to Last Page with Items after Deleting Last Item on Last Page

When you delete the last item on the last page of your Laravel app, you may encounter an issue where you are redirected to an empty last page. The After Action Redirect Pagination URL for Laravel package solves this problem by redirecting you to the last page with items.

To use this feature, add the following code after your paginated query:

This will check whether there are any items on the last page of your paginated results. If there are no items, it will redirect you to the last page that has items.

Here is an example of how you might use this in your controller's index method:


All versions of after-action-redirect-pagination-url-for-laravel with dependencies

PHP Build Version
Package Version
No informations.
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package jcergolj/after-action-redirect-pagination-url-for-laravel contains the following files

Loading the files please wait ....