Search
 
SCRIPT & CODE EXAMPLE
 

PHP

cakephp Not Found error handle in pagination

use CakeHttpExceptionNotFoundException;

public function index()
{
    try {
        $this->paginate();
    } catch (NotFoundException $e) {
        // Do something here like redirecting to first or last page.
        // $this->request->getAttribute('paging') will give you required info.
    }
}
Comment

PREVIOUS NEXT
Code Example
Php :: index.php when deploying 
Php :: php define() 
Php :: laravel helper.php session data 
Php :: An expression was expected phpmyadmin 
Php :: date fomat in php 
Php :: how to access session value passed to sub domain 
Php :: Read the index and hashid of the last block in the blockchain 
Php :: utf8 decode 
Php :: encrypt number 
Php :: amazon ami 2 php ini 
Php :: laravel insert multiple rows from form 
Php :: how to validate students who made payment in php and mysql 
Php :: laravel soft delete 
Php :: File: C:xampphtdocsmarvellogistikapplicationlibrariesProfiler.php Line: 386 Function: sendDataInHeaders 
Php :: query for current editing post id 
Php :: how to conditional values in old value or edit new value with validsation faild to redirect back in laravel 
Php :: what is WP_USE_THEMES 
Php :: numeros positivos input laravel 
Php :: laravel check if pagination is empty 
Php :: laravel convert array to string 
Php :: drupal 9 custom access checking for routes 
Php :: Maintenace Mode Up using cron 
Php :: generate press viewport 
Php :: datetime confict function php 
Php :: wordpress single_cat_title slug 
Php :: laravel length validation 
Php :: morph laravel without classes name 
Php :: Laravel - How to create custom configuration variables and access 
Php :: laravel-filemanager 404 error 
Php :: Laravel Mix npm run production error 
ADD CONTENT
Topic
Content
Source link
Name
8+1 =