Mubeenali

Mubeenali

Member Since 2 Years Ago

Experience Points
3,700
Total
Experience

1,300 experience to go until the next level!

In case you were wondering, you earn Laracasts experience when you:

  • Complete a lesson — 100pts
  • Create a forum thread — 50pts
  • Reply to a thread — 10pts
  • Leave a reply that is liked — 50pts
  • Receive a "Best Reply" award — 500pts
Lessons Completed
21
Lessons
Completed
Best Reply Awards
0
Best Reply
Awards
  • start your engines Created with Sketch.

    Start Your Engines

    Earned once you have completed your first Laracasts lesson.

  • first-thousand Created with Sketch.

    First Thousand

    Earned once you have earned your first 1000 experience points.

  • 1-year Created with Sketch.

    One Year Member

    Earned when you have been with Laracasts for 1 year.

  • 2-years Created with Sketch.

    Two Year Member

    Earned when you have been with Laracasts for 2 years.

  • 3-years Created with Sketch.

    Three Year Member

    Earned when you have been with Laracasts for 3 years.

  • 4-years Created with Sketch.

    Four Year Member

    Earned when you have been with Laracasts for 4 years.

  • 5-years Created with Sketch.

    Five Year Member

    Earned when you have been with Laracasts for 5 years.

  • school-in-session Created with Sketch.

    School In Session

    Earned when at least one Laracasts series has been fully completed.

  • welcome-newcomer Created with Sketch.

    Welcome To The Community

    Earned after your first post on the Laracasts forum.

  • full-time-student Created with Sketch.

    Full Time Learner

    Earned once 100 Laracasts lessons have been completed.

  • pay-it-forward Created with Sketch.

    Pay It Forward

    Earned once you receive your first "Best Reply" award on the Laracasts forum.

  • subscriber Created with Sketch.

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • lifer Created with Sketch.

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • evangelist Created with Sketch.

    Laracasts Evangelist

    Earned if you share a link to Laracasts on social media. Please email [email protected] with your username and post URL to be awarded this badge.

  • chatty-cathy Created with Sketch.

    Chatty Cathy

    Earned once you have achieved 500 forum replies.

  • lara-veteran Created with Sketch.

    Laracasts Veteran

    Earned once your experience points passes 100,000.

  • 10k-strong Created with Sketch.

    Ten Thousand Strong

    Earned once your experience points hits 10,000.

  • lara-master Created with Sketch.

    Laracasts Master

    Earned once 1000 Laracasts lessons have been completed.

  • laracasts-tutor Created with Sketch.

    Laracasts Tutor

    Earned once your "Best Reply" award count is 100 or more.

  • laracasts-sensei Created with Sketch.

    Laracasts Sensei

    Earned once your experience points passes 1 million.

  • top-50 Created with Sketch.

    Top 50

    Earned once your experience points ranks in the top 50 of all Laracasts users.

Level 1
3,700 XP
Mar
01
4 weeks ago
Activity icon

Started a new Conversation Yajra DataTables Loading Data Time Exceeded From 1 Minut PHP Fatal Error.

I have 15000 records in my users table. I want to use datatable i have followed the data table forum speed faq. But none of them is going to wok for me . Can you please suggest me to decrease the loads time for the effiency of the system .? I am using the datatable latest version 9.8.0. Below is my Client Side Code:

<script>
    $(function() {
        
        var GridView =  $('#users_table').DataTable({
            bprocessing: true,
            bserverSide: true,
            ajax: '{{ route('users.lists') }}',
            deferRender: true,
            columns: [
                { data: 'id', name: 'id' },
                { data: 'name', name: 'name' },
                { data: 'email', name: 'email' },
                { data: 'action', name: 'action'},
                
            ]
        });

        $('#users_table').show();
        GridView.columns.adjust().draw();
    });
    </script>

My Controller Code :

 public function usersLists()
    {
        $users = User::orderBy('id','desc')->get();


        return Datatables::of($users)
                                   ->addColumn('action',function(User $user){
                                     return  `<div class="btn-group btn-group-xs">
                                              <a data-toggle="tooltip" title="" class="btn btn-default" data-original-title="Off"><i class="fa fa-power-off"></i></a>
                                              <a data-toggle="tooltip" title="" class="btn btn-default" data-original-title="Edit"><i class="fa fa-edit"></i></a>
                                             `;
                                   })
                                   ->make(true);
    }

Jan
01
2 months ago
Activity icon

Started a new Conversation Detect User Current City And State Laravel Solution?

i have a button called current Location.I want to know the exact city and state name of the user current location.i have tried geo plugin php but it is not giving me exact city and name .Please suggest me a solution for this.

Note: i don't want to use the google maps api for that purpose.
Dec
23
3 months ago
Activity icon

Replied to The Connection Was Reset Laravel Setasign/fpdi

can you understand it ?

Activity icon

Replied to The Connection Was Reset Laravel Setasign/fpdi

To add same header for every page of pdf file i created a custom class and extends that class to main FDI class..After it in my controller method i made an object of this class.after this the old code is not working ..may be it is store in cache .i tried to clear my cache again and again.but nothing works for me.

Activity icon

Replied to The Connection Was Reset Laravel Setasign/fpdi

i just created a custom class to add the same header for this template.But after i removed that class.And now it is saying the This site can’t be reachedThe connection was reset.

Activity icon

Replied to The Connection Was Reset Laravel Setasign/fpdi

The code mentioned above is the old code.that was working fine.i have specified that the problem is $pdf->Output() ..need help

Activity icon

Replied to The Connection Was Reset Laravel Setasign/fpdi

helo i am trying to edit an existing pdf file via setasign package.All works fine before.but after a little change in code it is not working.Now it is my old code tat was working fine.Please tell me how to problem at page

This site can’t be reachedThe connection was reset.

Activity icon

Started a new Conversation The Connection Was Reset Laravel Setasign/fpdi

i installed the setasign to edit pdf file.All works fine.It works as it was supposed to be work.But i change a code but i went on my old code and it is not working now saying the connection was reset.if i dd anything before the $pdf->Output() it returns the value.The problem is with pdf-Output().Please help me to solve it .My previously working code in my method is:

  $pdf = new Fpdi();
        
        // add a page
        $pdf->AddPage();
        

        // set the source file
        $countPage = $pdf->setSourceFile(__DIR__."\quotation.pdf");
         
        // import page 1
        $tplIdx = $pdf->importPage(1,PdfReader\PageBoundaries::MEDIA_BOX);
        // use the imported page and place it at position 10,10 with a width of 210 mm A4
       //$pdf->useTemplate($tplIdx,10, 10, 100);
        //return $tplIdx;
        //$tempateSize = $pdf->getTemplateSize($tplIdx);
       // return $tempateSize;
       $pdf->useTemplate($tplIdx,0, 0,210,297); 
       
      // $pdf->useImportedPage($tplIdx,0, 0,210,297);
      
        
        // now write some text above the imported page
        $pdf->SetFont('Helvetica');
        $pdf->SetTextColor(0, 0, 0);
        $pdf->SetFontSize(15);
        $pdf->SetXY(10,30);
       // $pdf->Write(10,'Name:');  //first argument moves from top 
        
        $pdf->Text(10,40,"Company Name:");  //2nd argument moves from top to bottom
        $pdf->Text(50,40,"Mubeen Company");    // first argument moves from let to right 

        $pdf->Text(10,50,"Mobile:");
        $pdf->Text(50,50,"923029837061");

        $pdf->Text(10,60,"Contact Person:");
        $pdf->Text(50,60,"Mubeen Khan");
        
        $pdf->Text(10,70,'Quotation');
        $pdf->setFont('Arial','B',12);
       // $pdf->Cell(0,80);
        //  move from  left to right
         $pdf->setY(75);
         // first argument width 

         $pdf->cell(15);  // move the cell from left to right
         /**
            * cell 
            * first argument  ====> width 
            * second argument ====> height
            * thir argument   ====> Column name
            * 4th argument    ====> 0 means borderless 1 means with border
            * 5th argument    ====> column text in center or in left or in right align 
            */ 

        $pdf->Cell(80,10,'Prouct Name',1,0,'C');   // first argument width 
     
        $pdf->Cell(30,10,'Original Price',1,0,'C');   // first argument width 
        $pdf->Cell(30,10,'Offered Price',1,0,'C');   // first argument width  
        
        $pdf->Ln();

        for($i=0;$i <= 100 ;$i++)
        {
              
            $pdf->cell(15);  // move the cell from left to right

            $pdf->Cell(80,10,"Some Product naem will go here Some",1,0,'L');   // first argument width 
     
            $pdf->Cell(30,10,"200",1,0,'L');   // first argument width 
            $pdf->Cell(30,10,"300",1,0,'L');   // first argument width  
        
            $pdf->Ln();


        }

        echo $pdf->Output();
        die();

Now it is not working.Please help me to solve this.

Dec
18
3 months ago
Activity icon

Started a new Conversation Existing Pdf Is Not Editing In Setasign/fpdi.?

I installed setasign fpdi in my laravel application.But it is not editing existing file on runtime.Below is my controller code.

  // initiate FPDI
       
     //and inside the method
      $pdf = new Fpdi();
      // add a page
      $pdf->AddPage();
     // set the source file
      $pdf->setSourceFile(asset("assets/quotation/quotation.pdf"));
     // import page 1
      $tplIdx = $pdf->importPage(1);
     // use the imported page and place it at position 10,10 with a width of 100 mm
      $pdf->useTemplate($tplIdx, 10, 10, 100);

        // now write some text above the imported page
        $pdf->SetFont('Helvetica');
        $pdf->SetTextColor(255, 0, 0);
        $pdf->SetXY(30, 30);
        $pdf->Write(0, 'This is just a simple text');


    //  $pdf->addPage();
    //  $pdf->useImportedPage($pageId, 10, 10, 90);


        return response($pdf->Output())
            ->header('Content-Type', 'application/pdf');

The problem is my page loads untils i see the message Maximum execution time of 60 seconds exceeded.Please help me .what's going on?

Dec
17
3 months ago
Activity icon

Replied to Existing Pdf Is Not Editing In Setasign/fpdi.

zlib is installed please help me to solve it.

Activity icon

Started a new Conversation Existing Pdf Is Not Editing In Setasign/fpdi.

i installed setasign/fpdi in my laravel application. but it is not editing the exiting file.nor importing. below is my method code":

  // initiate FPDI
       
     //and inside the method
      $pdf = new Fpdi();
      // add a page
      $pdf->AddPage();
     // set the source file
      $pdf->setSourceFile(asset("assets/quotation/quotation.pdf"));
     // import page 1
      $tplIdx = $pdf->importPage(1);
     // use the imported page and place it at position 10,10 with a width of 100 mm
      $pdf->useTemplate($tplIdx, 10, 10, 100);

        // now write some text above the imported page
        $pdf->SetFont('Helvetica');
        $pdf->SetTextColor(255, 0, 0);
        $pdf->SetXY(30, 30);
        $pdf->Write(0, 'This is just a simple text');


    //  $pdf->addPage();
    //  $pdf->useImportedPage($pageId, 10, 10, 90);


        return response($pdf->Output())
            ->header('Content-Type', 'application/pdf');

Activity icon

Replied to How To Configure Setasign/fpdi-fpdf In Config/app.php ?

thanks @sinnbeck actually i am trying to edit an existing file on run time.Below is my code but i could not.The page maximum load time exceeds but it don not return any output to me.


     //and inside the method
      $pdf = new Fpdi();
 // add a page
      $pdf->AddPage();
     // set the source file
      $pdf->setSourceFile(asset("assets/quotation/quotation.pdf"));
     // import page 1
      $tplIdx = $pdf->importPage(1);
     // use the imported page and place it at position 10,10 with a width of 100 mm
      $pdf->useTemplate($tplIdx, 10, 10, 100);

        // now write some text above the imported page
        $pdf->SetFont('Helvetica');
        $pdf->SetTextColor(255, 0, 0);
        $pdf->SetXY(30, 30);
        $pdf->Write(0, 'This is just a simple text');


    //  $pdf->addPage();
    //  $pdf->useImportedPage($pageId, 10, 10, 90);


        return response($pdf->Output())
            ->header('Content-Type', 'application/pdf');

Activity icon

Replied to How To Configure Setasign/fpdi-fpdf In Config/app.php ?

after your code it is giving me something like that

%PDF-1.3 3 0 obj <> endobj 4 0 obj <> stream x�3R��2�35W(�� endstream endobj 1 0 obj <> endobj 2 0 obj << /ProcSet [/PDF /Text /ImageB /ImageC /ImageI] /Font << >> /XObject << >> >> endobj 5 0 obj << /Producer (FPDF 1.82) /CreationDate (D:20191217150726) >> endobj 6 0 obj << /Type /Catalog /Pages 1 0 R >> endobj xref 0 7 0000000000 65535 f 0000000175 00000 n 0000000262 00000 n 0000000009 00000 n 0000000087 00000 n 0000000356 00000 n 0000000432 00000 n trailer << /Size 7 /Root 6 0 R /Info 5 0 R >> startxref 481 %%EOF

How to set content type application/pdf via this package ?

Activity icon

Replied to How To Configure Setasign/fpdi-fpdf In Config/app.php ?

it's not working.i tried please help me.

Activity icon

Started a new Conversation How To Configure Setasign/fpdi-fpdf In Config/app.php ?

I have installed this package composer require setasign/fpdi-fpdf in my laravel application.but i am unable to use this package in controller.My Question is pretty simple what to do in config/app.php so that i can use it in my controller .?Please help me.