- Create a middleware
php artisan make:middleware AjaxSessionExpiredMiddleware
- Open the
AjaxSessionExpiredMiddleware
and add following code:
<?php
<?php | |
namespace App\Http\Controllers\AdminAuth; | |
use App\AdminUser; | |
use Validator; | |
use App\Http\Controllers\Controller; | |
use Illuminate\Foundation\Auth\RegistersUsers; | |
class RegisterController extends Controller |
public function index(Request $request)
{
$userId = $request->user()->id;
$groupId = $request->get('group_id');
$keywords = '%' . $request->get('term') . '%';
$contacts = Contact::where(function($query) use ($userId, $groupId, $keywords) {
// filter by current user
$query->where("user_id", $userId);
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); | |
class Site extends CI_Controller { | |
public function upload() | |
{ | |
if ( ! empty($_FILES)) | |
{ | |
$config['upload_path'] = "./assets/uploads"; | |
$config['allowed_types'] = 'gif|jpg|png|mp4|ogv'; |
<?php | |
$config["full_tag_open"] = '<ul class="pagination">'; | |
$config["full_tag_close"] = '</ul>'; | |
$config["first_link"] = "«"; | |
$config["first_tag_open"] = "<li>"; | |
$config["first_tag_close"] = "</li>"; | |
$config["last_link"] = "»"; | |
$config["last_tag_open"] = "<li>"; |