madala

Experience

7,910

0 Best Reply Awards

  • Member Since 1 Year Ago
  • 46 Lessons Completed
  • 0 Favorites

14th September, 2018

madala started a new conversation Datebase Design • 6 days ago

HI there,

is it good practice to store all check box values in single column with a delimiter.

6th September, 2018

madala left a reply on Redirect Back Return Sorry Page Not Found. • 2 weeks ago

@tykus the other url is to generate the pdf of the same form. and this redirect()->back() issue is through out the application where ever it used . Some places it says sorry page could not be found.

madala left a reply on Redirect Back Return Sorry Page Not Found. • 2 weeks ago

@tykus @wilburpowery

Hi Here is my Code, the issue causing here is

return redirect()->back()->withErrors($validator)->withInput($inputs)->with('error',
            $successMessage);

when i try to submit form validation fails and trigger redirect()->back(). but its not redirecting back and triggering another url.

This works fine development environment. but it doesn't work in production.

Can you please help.

`` public function storeAccrualsAndAdditionalItems($inputs) { $successMessage = '';

    $contractId = $inputs['agencyContractId'];

    $validator = Validator::make($inputs, [
        'accruals_srvc_month' => 'required',
    ]);

    if ($validator->fails()) {

        //if validation fails it will redirect back with errors
        $successMessage = "Please Select Month";
        return redirect()->back()->withErrors($validator)->withInput($inputs)->with('error',
            $successMessage);
    }

    //checking if there is saved record
    $accrualHeaderExists = DB::table('wdacs_inv_accruals_additionalitems_header')
        ->where('agcy_contract_id', '=', $inputs['agencyContractId'])
        ->where('active_flag', '=', 1)
        ->where('document_status', '=', '3000')
        ->first();


    
    }

   
    return redirect()->back()->with('message', $successMessage);

``

madala left a reply on Redirect Back Return Sorry Page Not Found. • 2 weeks ago

@wilburpowery still it causing the same issue. previously its working fine but today it causing this issue and also when trying to submit the form it triggers another URL. do I need to make any changes in .htaccess file

madala started a new conversation Redirect Back Return Sorry Page Not Found. • 2 weeks ago

Hi Can one help help me with.

redirect()->back() return sorry page can not be found.

its works fine in development but in production the issue occurs.

Thanks

24th August, 2018

madala left a reply on Ajax • 3 weeks ago

@Cronix

##view file

@extends('layouts.app')
@section('breadcrumb')
    @include('layouts.partials._breadcrumb', ['fil' => link_to('/home', trans('Home')).' / '.link_to('/maintenance', trans('Maintenance')).' / '.link_to('/user-roles', trans('SubAward Details'))])
@endsection
@section('content')
    <div class="container-fluid">
        <div class="panel panel-default">
            <div class="panel-heading panelheading-color">Payment Summary</div>
            <div class="panel-heading">
                <div class="row">
                    <form method="post">
                        {{csrf_field()}}
                        <div class="col-md-2">
                            <div class="form-group">
                                <label class="control-label">Fiscal Year</label>
                                <select class="form-control" name="fiscal_year">
                                    <option value="">Select Fiscal Year</option>
                                    @foreach($fiscalYears as $fiscalYear)
                                        <option value="{{$fiscalYear->cfr_fisc_yyyy}}">
                                            {{$fiscalYear->cfr_fisc_yyyy}}
                                        </option>
                                    @endforeach
                                </select>
                            </div>
                        </div>
                        <div class="col-md-3">
                            <div class="form-group">
                                <label class="control-label">Program</label>
                                <select class="form-control" name="program">
                                    <option>Select Program</option>
                                    @foreach($programCds as $programCd)
                                        <option value="{{$programCd->program_cd}}">
                                            {{$programCd->program_cd}}
                                        </option>
                                    @endforeach
                                </select>
                            </div>
                        </div>
                        <div class="col-md-2">
                            <div class="form-group">
                                <label class="control-label">Fiscal Period</label>
                                <select class="form-control" name="fiscal_period">
                                    <option value="">Select Fiscal Period</option>
                                    @foreach($fiscalPeriods as $fiscalPeriod)
                                        <option value="{{$fiscalPeriod->cfr_fisc_yyyy_mmm}}">
                                            {{$fiscalPeriod->cfr_fisc_yyyy_mmm}}
                                        </option>
                                    @endforeach
                                </select>
                            </div>
                        </div>
                        <div class="col-md-2">
                            <div class="form-group">
                                <label>&nbsp;</label><br>
                                <a href="#?" class="btn btn-primary" id="searchPaymentSummary">Search</a>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
@endsection
@section('scripts')
    <script>
        $('#searchPaymentSummary').click(function(e) {
            e.preventDefault();
            $.ajax({
                url: '/getPaymentSummaryData',
                type: 'post',

            });
        });
    </script>
@endsection

controller

public function paymentSummaryIndex()
    {
        $fiscalYears = $this->getFiscalYears();
        $programCds = $this->getProgramCodes();
        $fiscalPeriods = $this->getFiscalPeriods();


        

        return view('reports.paymentIndex', compact('fiscalYears', 'programCds', 'fiscalPeriods'));
    }


    public function paymentSummaryData(Request $request)
    {
        dd($request->all());
    }

Route::get('/paymentSummaryIndex','[email protected]');
Route::post('/getPaymentSummaryData','[email protected]');

madala started a new conversation Ajax • 3 weeks ago

Hi All,

I working with ajax in laravel. when I click the search button it should trigger ajax call. it triggers actual ajax URL and the immediate trigger /home. I don't have any idea why this happens. is there anyone with the same issue?

Thanks

28th February, 2018

madala started a new conversation Not Able To Install Php In RHEL • 6 months ago

Hi there,

can any one help me with this issues. i was trying to install php and getting this error.

[[email protected] ~]$ sudo yum install php70w

Loaded plugins: langpacks, package_upload, product-id, replace, subscription-manager

certificate verify failed

epel/x86_64/metalink | 14 kB 00:00:00 remi-php70 | 2.9 kB 00:00:00 remi-safe | 2.9 kB 00:00:00 https://rhnsat02.xxx.xxx.xxx/pulp/repos/Default_Organization/Library/content/dist/rhel/server/7/7.1/x86_64/os/repodata/repomd.xml: [Errno 14] curl#60 - "Peer's Certificate issuer is not recognized." Trying other mirror.

One of the configured repositories failed (Red Hat Enterprise Linux 7 Server (RPMs)), and yum doesn't have enough cached data to continue. At this point the only safe thing yum can do is fail. There are a few ways to work "fix" this:

 1. Contact the upstream for the repository and get them to fix the problem.


 2. Reconfigure the baseurl/etc. for the repository, to point to a working
    upstream. This is most often useful if you are using a newer
    distribution release than is supported by the repository (and the
    packages for the previous distribution release still work).


 3. Disable the repository, so yum won't use it by default. Yum will then
    just ignore the repository until you permanently enable it again or use
    --enablerepo for temporary usage:


        yum-config-manager --disable rhel-7-server-rpms


 4. Configure the failing repository to be skipped, if it is unavailable.
    Note that yum will try to contact the repo. when it runs most commands,
    so will have to try and fail each time (and thus. yum will be be much
    slower). If it is a very temporary problem though, this is often a nice
    compromise:


        yum-config-manager --save --setopt=rhel-7-server-rpms.skip_if_unavailable=true

failure: repodata/repomd.xml from rhel-7-server-rpms: [Errno 256] No more mirrors to try. https://rhnsat02.xxx.xxx.xx/pulp/repos/Default_Organization/Library/content/dist/rhel/server/7/7.1/x86_64/os/repodata/repomd.xml: [Errno 14] curl#60 - "Peer's Certificate issuer is not recognized."

12th October, 2017

madala started a new conversation After Three Login Failed Attempts I Need To Lock The User Account. • 11 months ago

can anyone help to achieve this with laravel authentication

madala started a new conversation Blank Pdf • 11 months ago

$attachment =BudgetAttachment::where("attachment_id",$attachmentId)->get();
    $fileName =$attachment[0]->attachment_name;
    $fileContent=$attachment[0]->attachment_content;
    $fileSize=$attachment[0]->attachment_size;
    $fileType =$attachment[0]->attachment_type;
    $fileMime =$attachment[0]->attachment_mime;
    header("Content-length: ".strlen($fileContent));
    header("Content-disposition: attachment; filename=\"".$fileName."\"");
    header("Content-type: $fileMime");
    echo $fileContent;

when i try to download pdf file it show blank pdf.

can any one help me with this.

8th October, 2017

madala started a new conversation Ajax Calling A Different Route IN LARAVEL • 11 months ago

HI,

My actual route is Route::get('ponumber/{program_cd}','[email protected]');

but its calling a diffrent route http://localhost:8888/works/public/agency/cashfundrequest/ponumber/26921

its appending /agency/cashfundrequest before the actual route.

23rd September, 2017

madala left a reply on Https Routes Not Working • 11 months ago

@arabsight I have tried this one but is not working....

madala started a new conversation Https Routes Not Working • 11 months ago

Hi, I have enabled the ssl cerficate for my site after that I can able to see only login page when I tried to login it says requested url was not found on this server . When disable ssl certificate everything working fine.

Can any one please help me with this...

22nd September, 2017

madala started a new conversation Not Found The Requested URL /login Was Not Found On This Server. Apache/2.4.10 (Debian) Server At Cms1.dclhealth.com Port 443 • 11 months ago

my .htaccess looks like this

Options -MultiViews

RewriteEngine On

# Redirect Trailing Slashes If Not A Folder...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/$ /$1 [L,R=301]

# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]

# Handle Authorization Header
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

sites-enables looks like

<Directory "/var/www/html/dclhealth/public"> AllowOverride All ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined

can any one help me with this.....

30th August, 2017

madala started a new conversation Auto Generated Emails • 1 year ago

i want to generate automate email 30days before the date of deadline. do i need to use jobs in laravel to generate? can any one have an idea to achieve this.

25th July, 2017

madala started a new conversation The Requested URL /index.php Was Not Found On This Server. • 1 year ago

IN CRUD OPERATIONS when i click on edit record it say The requested URL /index.php was not found on my server. but its working on working on my local homestead meachine.

8th July, 2017

madala started a new conversation Call To A Member Function GetClientOriginalName() On Null • 1 year ago

here is my code

public function saveagencydocument(Request $request){

    $file = $request->file('document');

    $agency_documents = new Attachment;

    $agency_documents->bfy=$request->input('year');

    $agency_documents->program_cd=$request->input('program_code');

    $agency_documents->attachment_desc = $request->input('attachment_desc');

    $agency_documents->attachment_name=$file->getClientOriginalName();fileOriginalName;

    $agency_documents->attachment_type=$file->getClientOriginalExtension();

    $agency_documents->attachment_size=$file->getSize();

    $destinationPath = 'uploads';

    $file->move($destinationPath,$file->getClientOriginalName());

    $agency_documents->attachment_content = file_get_contents("uploads/".$file->getClientOriginalName());

    $agency_documents->updated_by=auth()->user()->firstname;

    $agency_documents->created_by=auth()->user()->firstname;

    $agency_documents->save();

    $documents=Attachment::where("bfy","=",$request->input('year'))
        ->where("program_cd","=",$request->input('program_code'))->get();

    return view("contracts.documents",['documents'=>$documents]);
}

when i tried to save the the document it gives me error

Call to a member function getClientOriginalName() on null but the files is not empty

can any one help me with this?

19th May, 2017

madala started a new conversation Query Exception • 1 year ago

table 1

css_users user_id username firstname lastname

table 2

user responsibilities

user_responsibility_id      
    user_id                  
    responsibility_id   

i wrote this method in my user model

public function UserResponsibilities(){

  return $this->hasMany('App\UserResponsibility');

}

in my controller

public function UserResponsibilities(){

  $userresp=User::with('UserResponsibilities')->get();

  dd($userresp);

}

when i call this method it returns an error

SQLSTATE[42S22]: Column not found: 1054 Unknown column 'css_user_responsibilities.user_user_id' in 'where clause' (SQL: select * from css_user_responsibilities where css_user_responsibilities.user_user_id in (1002, 1003, 1004, 1005, 1008, 1009, 1018, 1019, 1023, 1024, 1025, 1027, 1028, 1030, 1033, 1034, 1035, 1036, 1037, 1038, 1039, 1040))

here it returns unknown column name user_user_id i didn't use column any where but why i'm getting this. can any one guide me where i'm wrong.

12th May, 2017

madala started a new conversation File Upload Path • 1 year ago

Hi,

when i tried to upload file it is uploaded to the directory which is configured in php.ini. how to configure in laravel to upload to public directory.

27th April, 2017

madala started a new conversation Active State Is Not Working • 1 year ago

here is code

  • Home
  •         <li class="{{ Request::is('/employee') ? 'active' : ''}}"><a href="{{ url('/employee') }}"><i class="fa fa-home"></i> Employee</a></li>
    

    21st April, 2017

    madala started a new conversation Which Is Best Eloquent Or Querybuilder • 1 year ago

    hi,

    Please suggest me which is best eloquent or query builder for complex and large projects.

    13th April, 2017

    madala started a new conversation Token MisMatchException • 1 year ago

    hi, i have maintaining three application in same server and for all three applications i use same users table when i login and logout in all three applications it says Token Mismatch Exception. can any one help me how to overcome this issue.

    thanks

    12th April, 2017

    madala started a new conversation Cannot Access Protected Property $currentPage • 1 year ago

    I'm trying access $currentPage and $perPage but it shows can access protected property and also i include the namespace for lenghthaware .

    6th April, 2017

    madala started a new conversation RuntimeException In Encrypter.php Line 43: The Only Supported Ciphers Are AES-128-CBC And AES-256-CBC With The Correct Key Lengths. • 1 year ago

    i clone the project from bitbucket and run composer update and i'm getting below error.

    RuntimeException in Encrypter.php line 43: The only supported ciphers are AES-128-CBC and AES-256-CBC with the correct key lengths.

    can you guys help me with this.

    3rd April, 2017

    madala started a new conversation Pagination Not Working • 1 year ago

    search query

    public function getAgencyContractsList($n, $searchKey)

    {
    
    
        /** @var TYPE_NAME $query */
        $query = DB::table('wdacs_inv_agcy_contract');
        if ($searchKey != '') {
            $query = $query->whereRaw("(wdacs_inv_agcy_contract.bfy LIKE '%$searchKey%' OR
            wdacs_inv_agcy_contract.ecaps_unit_cd LIKE '%$searchKey%' OR
             wdacs_inv_agcy_contract.grant_cd LIKE '%$searchKey%' OR
             wdacs_inv_agcy_contract.program_cd LIKE '%$searchKey%' OR
             wdacs_inv_agcy_contract.contract_type LIKE '%$searchKey%' OR 
             wdacs_inv_agcy_contract.funding_source LIKE '%$searchKey%' OR
             wdacs_inv_agcy_contract.agency_nm LIKE '%$searchKey%' OR
             wdacs_inv_agcy_contract.agency_cd LIKE '%$searchKey%' OR
             wdacs_inv_agcy_contract.caljobs_agcy_nm LIKE '%$searchKey%' OR
             wdacs_inv_agcy_contract.report_name LIKE '%$searchKey%' OR
             wdacs_inv_agcy_contract.geo_region LIKE '%$searchKey%' OR
             wdacs_inv_agcy_contract.sup_dist LIKE '%$searchKey%' OR
             wdacs_inv_agcy_contract.doc_num LIKE '%$searchKey%' OR
             wdacs_inv_agcy_contract.doc_type_cd LIKE '%$searchKey%' OR
             wdacs_inv_agcy_contract.doc_creation_dt LIKE '%$searchKey%' OR
             wdacs_inv_agcy_contract.doc_submit_dt LIKE '%$searchKey%' OR
             wdacs_inv_agcy_contract.ttl_budget_am LIKE '%$searchKey%' OR
             wdacs_inv_agcy_contract.ttl_approved_am LIKE '%$searchKey%' OR
             wdacs_inv_agcy_contract.ttl_pending_am LIKE '%$searchKey%' OR
             wdacs_inv_agcy_contract.srvc_start_dt LIKE '%$searchKey%' OR
             wdacs_inv_agcy_contract.srvc_end_dt LIKE '%$searchKey%' OR
             wdacs_inv_agcy_contract.cur_status LIKE '%$searchKey%' OR
             wdacs_inv_agcy_contract.po_num LIKE '%$searchKey%' OR
             wdacs_inv_agcy_contract.close_dt LIKE '%$searchKey%' )");
    
        }
    
    
    
        return $query->paginate($n);
    
    
    }
    

    controller method

    public function agencyContractLists()

    {
    
        $pageRow = \Request::get('pageRow');
        $search = \Request::get('search');
        $pageRow = ($pageRow) ? $pageRow :20;
        $agencyContractLists = $this->contractRepository->getAgencyContractsList($pageRow,$search);
    
        $resultArr = array_merge(array('agencyContractLists'=>$agencyContractLists),
            array('pageRowsArr'=> array(1,5,10,20,30,40,50)),array('pageRow'=>$pageRow),array('search'=>$search));
    
       // dd($resultArr);
        return view('agencyContracts.agencyContractLists',compact('resultArr'));
    
    
    }
    

    i use this to show pagination links

    {!! $agencyContractLists->links() !!}

    my issue is total 30 records when select to display rows 1 the pagination shows 30 pages(links)

    when i click the second page it should display one row in that page but it displays all rows.

    can you guys help me with this.

    30th March, 2017

    21st February, 2017

    madala left a reply on SQLSTATE[42S22]: Column Not Found: 1054 Unknown Column 'wdacs_inv_agcy_contract.funding_source' In 'field List' (SQL: Select Distinct `wdacs_inv_agcy_contract`.`funding_source` From `wdacs_inv_agcy_contract`) • 1 year ago

    @Snapey i'm sorry here is the code

    public function getFundingSource()

    {

     $query = DB::table('wdacs_inv_agcy_contract')
    
              ->select(\DB::RAW('DISTINCT wdacs_inv_agcy_contract.funding_source'));
    
     return $query->get();
    

    }

    madala started a new conversation SQLSTATE[42S22]: Column Not Found: 1054 Unknown Column 'wdacs_inv_agcy_contract.funding_source' In 'field List' (SQL: Select Distinct `wdacs_inv_agcy_contract`.`funding_source` From `wdacs_inv_agcy_contract`) • 1 year ago

    i'm getting the below error i.e

    SQLSTATE[42S22]: Column not found: 1054 Unknown column

    'wdacs_inv_agcy_contract.funding_source' in 'field list' (SQL: select distinct

    wdacs_inv_agcy_contract.funding_source from wdacs_inv_agcy_contract)

    my code in model is

    public function getProgramName()

    {

     $query = DB::table('wdacs_inv_agcy_contract')
    
              ->select(\DB::RAW('DISTINCT wdacs_inv_agcy_contract.program_nm'));
    
     return $query->get();
    

    }

    14th February, 2017

    madala started a new conversation Inserting Multiple Records Ata Atime • 1 year ago

    i want to insert multiple records in to database through form . let's say i have user table and i have only one column in the table i.e is username. instead of inserting each username, i want insert 20 usernames at a time. can this possible? can any one help me with this.

    8th February, 2017

    madala started a new conversation Stored Procedure • 1 year ago

    i was trying to insert data into database using stored procedure

    my stored procedure looks like this.

    DELIMITER //

    CREATE PROCEDURE insertData(

    IN name varchar(45),

    IN description varchar(50)

    )

    BEGIN

    INSERT INTO demo_table (name,description) values (name,description) ;

    END //

    DELIMITER;

    and store function looks lijke this

    public function update(Request $request, $id)

    {
    
        
        $name=$request->program_name;
    
        $decript=$request->program_description;
    
        $program =DB::insert("call insertData($name,$decript)");
    
        
        return redirect()->route('program.index');
    
    
    }
    

    i'm getting this error

    ueryException in Connection.php line 770: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'php frame work)' at line 1 (SQL: call insertData(symfony,a php frame work))

    3rd February, 2017

    madala started a new conversation Error Exception Undefined Variable Userinfo • 1 year ago

    public function index()

    {
           
           $search = \Request::get('search');
    
           $pageRow = \Request::get('pageRow');
    
           $pageRow = ($pageRow) ? $pageRow : config('app.nbrPages.pageCnt');
    
    
           $userInfo = $this->model->getAllUsers($pageRow,$search);
    
    
           $currentPage = $userInfo->currentPage;
    
           $pageLimit = $userInfo->perPage;
    
           $showingStartCnt = ($pageLimit * ($currentPage-1))+1; 
    
           $showingTotalLimit = $userInfo->total;
    
           $showingEndLimit = $showingStartCnt+$pageLimit-1;
    
           $showingEndLimit = ($showingEndLimit > $showingTotalLimit) ? 
    

    $showingTotalLimit : $showingEndLimit;

           $resultArr = array_merge(array('userInfo'=>$userInfo), array('pageRow' => $pageRow), array('search' => $search), array('pageRowsArr' => array(1,5,10,20,30,40,50)),array('currentPage' => $currentPage,'pageLimit' => $pageLimit, 'showingTotalLimit' => $showingTotalLimit,'showingStartCnt' => $showingStartCnt,'showingEndLimit' => $showingEndLimit));
       
    
            
    
        return view('users/index',compact('resultArr'));
    
    }
    
                <thead>
    
                  <tr>
    
                    <th>First Name</th>
    
                    <th>Last Name</th>
    
                    <th>Email</th>
    
                    <th>Username</th>
    
                    <th>Created Date</th>
    
                    <th align="center">Edit</th>
    
                  </tr>
                </thead>
    
                <tbody>
    
                  @foreach ($userInfo as $user)
    
                    <tr>
    
                      <td>{{$user['firstname']}}</td>
    
                      <td>{{$user['lastname']}}</td>
    
                      <td>{{$user['email']}}</td>
    
                      <td>{{$user['username']}}</td>
    
                      <td>{{$user['created_at']}}</td>
    
                      <td class="edit" align="center">
    

    @endforeach

    madala started a new conversation No Block-level Parent Found. Not Good. • 1 year ago

    i'm using laravel-dompdf and i was not able to generate pdf it raising the error No block-level parent found. Not good. can you guys help me with this

    and my code in the controller

    public function show($request_info_id)

    {
    
        $employeeData = $this->model->getRequestedRITEmployeeDetails($request_info_id);
    
        $pdf =PDF::loadView('employee.pdf',compact('employeeData'));
        return $pdf->stream();
    
    
    }
    

    31st January, 2017

    madala started a new conversation Migration Error • 1 year ago

    first I have create migrations for user table and run php artisan migrate and then I create roles table and try to create php artisan migrate and it shows the following error

    [Illuminate\Database\QueryException] SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'users' alre ady exists (SQL: create table users (id int unsigned not null auto_incr ement primary key, name varchar(255) not null, email varchar(255) not n ull, password varchar(255) not null, remember_token varchar(100) null, created_at timestamp null, updated_at timestamp null) default character set utf8mb4 collate utf8mb4_unicode_ci)

    [PDOException] SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'users' alre ady exists

    can you any body help me

    24th January, 2017

    madala left a reply on CSS Is Not Loading In One Blade Page Only • 1 year ago

    hi @Snapey i tested using network tool when i go to particular page it is not loading app.css stylesheet.

    madala started a new conversation CSS Is Not Loading In One Blade Page Only • 1 year ago

    can any tell why this happens css is loading to particular file in same folder while others are loading why this happens.

    23rd January, 2017

    madala started a new conversation Ldap Authentication • 1 year ago

    i have performed ldap authentication by going through this link

    https://github.com/krenor/ldap-auth/blob/master/README.md and i got the error saying

    ldap_search(): Search: Operations error

    17th January, 2017

    madala left a reply on Cannot Access Protected Property Illuminate\Pagination\LengthAwarePaginator::$currentPage • 1 year ago

    @craigpaul hi, can you tell me what exactly i have to do as i was new to this frame work. please...

    16th January, 2017

    madala started a new conversation Cannot Access Protected Property Illuminate\Pagination\LengthAwarePaginator::$currentPage • 1 year ago

    controller.php

    public function index() { $search = \Request::get('search'); $pageRow = \Request::get('pageRow'); $pageRow = ($pageRow) ? $pageRow : config('app.nbrPages.pageCnt');

      //$createdRits = $this->model->getSubmittedRits('supervisor',$pageRow,$search);
    
      $allEmpPeInfo = $this->model->getEmployePeInfo($pageRow,$search);
    
      $currentPage = $allEmpPeInfo->currentPage;
     $pageLimit = $allEmpPeInfo->perPage;
     $showingStartCnt = ($pageLimit * ($currentPage-1))+1; 
     $showingTotalLimit =$allEmpPeInfo->total;
     $showingEndLimit = $showingStartCnt+$pageLimit-1;
     $showingEndLimit = ($showingEndLimit > $showingTotalLimit) ? $showingTotalLimit : $showingEndLimit;
    
    
    
     $resultArr = array_merge(array('allEmpPeInfo' => $allEmpPeInfo), array('pageRow' => $pageRow), array('search' => $search) , array('pageRowsArr' => array(1,5,10,20,30,40,50)),array('currentPage' => $currentPage,'pageLimit' => $pageLimit, 'showingTotalLimit' => $showingTotalLimit,'showingStartCnt' => $showingStartCnt,'showingEndLimit' => $showingEndLimit));
    
      
    
        return view('performanceevaluation/index',compact('resultArr'));
    
    }
    

    model.php

    public function getEmployePeInfo($pageRows=2,$searchkey='') {

    $getEmpInfo = $this->cssritDb->table('css_emp_pe_info')
      ->select('css_emp_pe_info.employee_number','css_emp_pe_info.emp_first_name','css_emp_pe_info.emp_last_name','css_emp_pe_info.pay_title','css_emp_pe_info.branch_org_mem_nm','css_emp_pe_info.div_org_mem_nm','css_emp_pe_info.current_pe_start_date','css_emp_pe_info.current_pe_end_date','css_emp_pe_info.next_pe_start_date','css_emp_pe_info.next_pe_end_date','css_emp_pe_info.pe_type','css_emp_pe_info.pe_rating');
    
     
    
    // return $getEmpInfo->get();
    
    
    
    
    
    
    
    
    
    if($searchkey)
        {
    
    
     $getEmpInfo = $getEmpInfo->where("(css_emp_pe_info.employee_number LIKE '%$searchkey%' OR css_emp_pe_info.emp_first_name LIKE '%$searchkey%' OR css_emp_pe_info.emp_last_name LIKE '%$searchkey%' OR css_emp_pe_info.pay_title LIKE '%$searchkey%' OR css_emp_pe_info.branch_org_mem_nm LIKE '%$searchkey%' OR css_emp_pe_info.div_org_mem_nm LIKE '%$searchkey%')");
            //$query = $query->where('css_rit_request_info.request_info_id','LIKE','%'.$searchkey.'%');
            //$query = $query->orwhere('css_rit_request_info.employee_id','LIKE','%'.$searchkey.'%');
            //$query = $query->orwhere('css_rit_request_info.employee_first_nm','LIKE','%'.$searchkey.'%');
            //$query = $query->orwhere('css_rit_request_info.employee_last_nm','LIKE','%'.$searchkey.'%');
            //$query = $query->orwhere('css_rit_req_wrk_sites_info.cur_status','LIKE','%'.$searchkey.'%');
        }
        
    
    
        return $getEmpInfo->paginate($pageRows);
    

    }

    view.php

    @if($resultArr['pageRow']) @endif Go   
                    <label>Row</label>
                      @if($resultArr['search'])
                      <input type="hidden" class="form-control" name='search' value= '{{ $resultArr['search'] }}'>
                      @endif
                    <select class="form-control" name="pageRow" id='pageRow'>
                      @for($j=0;$j<count($resultArr['pageRowsArr']);$j++)
                          <option value={{ $resultArr['pageRowsArr'][$j] }} {{ $resultArr['pageRowsArr'][$j] == $resultArr['pageRow'] ? 'selected' : '' }}>{{ $resultArr['pageRowsArr'][$j] }}</option>
                      @endfor
                    </select>
                  
                  </div>
                  <!-- <button type="submit" class="btn btn-sm btn-primary">Actions</button> -->
                </form>
                </td>
                </tr>
                </table>              
              </div>
             <!--  SEARCH END -->
    

    11th January, 2017

    madala started a new conversation Table Values Sorting When The Page Refresh • 1 year ago

    i have retriew the values from the database of the particular user and display the values in table format when ever the page refresh the values in the table view are sorting. i don't have any why this happen. can any body help me with this?

    9th January, 2017

    madala started a new conversation How To Clear The Application Cache ,seesions, Cookies And Views • 1 year ago

    can any one help how to clear the application cache ,seesions, cookies and views?

    5th January, 2017

    madala left a reply on File Upload • 1 year ago

    @jlrdw we store images in laravel public directory and we just save name of the file in database.

    madala left a reply on File Upload • 1 year ago

    @lrdw i don't want to store the link, i want to store only the exact pdf file.

    madala left a reply on File Upload • 1 year ago

    @tykus_ikus

    we need to store the documents like pdf,text directly in to the database.

    madala started a new conversation File Upload • 1 year ago

    Can we insert the documents directly in to the database using laravel without storing the documents in server if possible can you provide any reference.

    madala left a reply on Active Directory Authentication • 1 year ago

    @ehtasham how to configure ldap i mean where should we provide the host and all.

    20th December, 2016

    madala started a new conversation Cannot Submit Form • 1 year ago

    madala started a new conversation Cannot Submit The Form • 1 year ago

        <input type="submit" class="btn btn-primary" value="Submit">
    

    public function store(Request $request)

    {
    
        //
    
        $Pevaluation = new Pevaluation;
    
        $Pevaluation->employee_number = $request->username;
    
    
        $Pevaluation->save();
    
        return redirect()->route('pevaluation.create');
    
    
    }
    

    Route::resource('/pevaluation', 'pevaluationController', [ 'only' => ['index','update','destroy','create','edit','store'] ]);

    when i try to submit the form nothing happens and when try to sunmit the form with empty field it performs the validation but when i fill the form and sunmit it happens nothing

    19th December, 2016

    madala started a new conversation When I Submit The Form The Data Should Submit To One Page And It Should Redirect To Another Page • 1 year ago

    public function store(EmployeeCreateRequest $request) { $this->model->hrRitStore($request->all());

        return redirect('hr')->with('ok', trans('hr.created'));
    }
    

    Route::resource('employee', 'EmployeeController', [ 'only' => ['index','update','destroy','store'] ]);

    Route::get('/hr/view/{request_info_id}', '[email protected]'); Route::get('/createHrRit', '[email protected]'); Route::resource('hr', 'HrController', [ 'only' => ['index','update','destroy','store'] ]);

    17th December, 2016

    madala started a new conversation QueryException • 1 year ago

    SQLSTATE[42S02]: Base table or view not found: 1146 Table 'cssprod.users' doesn't

    exist (SQL: select count(*) as aggregate from users where email = [email protected])

    authentication working fine but when i trying to create the user it shows above error.

    my user table name is css_users and i declared protected $table = 'css_users'; and the authentication works fine but user createtion is not working.

    16th December, 2016

    madala left a reply on Route::has • 1 year ago

    @craigpaul thankyou so much

    Edit Your Profile
    Update

    Want to change your profile photo? We pull from gravatar.com.