Tag : Request Method


How to get current controller or method name in Codeigniter ?

In this post, i am going to share with you how to fetch current controller or method name in codeigniter application. We may sometime need to get controller name for logic at that time we require to get current controller name from route. Same way if you require to get current method name then you can do it simply by using $this->route variable of codeigniter. In this example we will use two method of $this->router variable for getting controller name and method name as listed bellow: <strong>fetch_class()</strong> <strong>fetch_method()</strong> We can basically use this way: <pre> $contr.....

By Hardik Savani | June 8, 2017 | | 717 Viewer | Category : PHP Codeigniter
READ MORE

How to check request method is GET or POST in Laravel?

Sometimes we require to get request method is get, post, patch, delete that way we can take action. if need take action on depend on request input method. so you can check using request method so let's see bellow examle: <strong>Example:</strong> <pre class="prettyprint lang-php"> $method = $request->method(); <br> if ($request->isMethod('post')) { print('is post method'); } if ($request->isMethod('get')) { print('post method'); } </pre>

By Hardik Savani | May 5, 2016 | | 5573 Viewer | Category : Laravel
READ MORE

    How to get last record from MySQL table in Codeigniter?

    How to get last record from MySQL table in Codeigniter?

    Open Post

    How to copy to clipboard without flash in AngularJS ?

    How to copy to clipboard without flash in AngularJS ?

    Open Post

    PHP Image upload without refreshing page using jquery example

    PHP Image upload without refreshing page using jquery example

    Open Post

    Laravel 5.3 - Form Input Validation rules example with demo

    Laravel 5.3 - Form Input Validation rules example with demo

    Open Post

    How to call AngularJS controller function in Jquery?

    How to call AngularJS controller function in Jquery?

    Open Post

    Bootstrap form validation example with demo using validator.js plugin

    Bootstrap form validation example with demo using validator.js plugin

    Open Post