Omda

Backend Developer at Kashta Lab

Member Since 2 Years Ago

Khartoum

Experience Points
4,370
Total
Experience

630 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
25
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.

  • Community Pillar

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

Level 1
4,370 XP
Apr
07
1 month ago
Activity icon

Started a new Conversation Laravel-dompdf Display All Content In One Page Only

I need to show my contnent in one page, so my problem is break my content into 3 pages and it's not too much to be in three page

$pdf = PDF::loadView('invoices.invoice', compact('vendor','customer_route' ,'payment_details', 'transactions', 'customer', 'transaction_details', 'barcode_invoice'))
    // ->setPaper('a4', 'landscape');
        ->setPaper('a4', 'potrait');

    Mail::send('invoices.invoice', compact('vendor','customer_route' ,'payment_details', 'transactions', 'customer', 'transaction_details', 'barcode_invoice'), function($message) use($data, $pdf) {
        $message->to($data["email"], $data["email"])
            ->subject($data["title"])
            ->attachData($pdf->output(), "invoice.pdf");
    });
    
    return 'email sent';

and config/dompdf.php as it's I am not touched.

so what shall I do?

Jan
23
3 months ago
Activity icon

Started a new Conversation How Could I Access Attribute

if I am using dd($load->product_id) it will get attribute but when I use $load->product_id

this my code


            $get_load_request = LocationTransferStatus::with(['get_location_trnasfer' => function($q){
                    $q->withOut(['transfer_status','route_detail', 'transaction_type'])
                        ->with(['product' => function($query){
                            $query->withOut(['Category', 'Menu', 'Add_ons', 'packing','storage','unit']);
                        }]);
                }])
                ->where('vendor_id', $vendor->restaurant_id)
                ->where('created_by', $request->authId)
                ->get();


                
            $loads = $get_load_request->map(function($locationTransferStatus){
                return $locationTransferStatus->get_location_trnasfer;
            });

                foreach ($loads AS $load) {
                    $befor_product = $load->product_id;
		}

any help?

Jan
05
4 months ago
Activity icon

Replied to How Could I Remove Duplication From Pagination

it worked. thanks for your replies

Activity icon

Started a new Conversation How Could I Change Telescope Assets Path


    /*
    |--------------------------------------------------------------------------
    | Telescope Storage Driver
    |--------------------------------------------------------------------------
    |
    | This configuration options determines the storage driver that will
    | be used to store Telescope's data. In addition, you may set any
    | custom options as needed by the particular driver you choose.
    |
    */

    'driver' => env('TELESCOPE_DRIVER', 'database'),
    "asset_url" => "localhost/admin",
    'storage' => [
        'database' => [
            'connection' => env('DB_CONNECTION', 'mysql'),
            'chunk' => 1000,
        ],
    ],

Activity icon

Replied to How Could I Remove Duplication From Pagination

because build in is not let me pass per_page and I want to send result as JSON instead of view.

Activity icon

Started a new Conversation How Could I Remove Duplication From Pagination

this my helper method for a pagination


if(!function_exists('paginate')){
    /**
     * @param $items
     * @param int $perPage
     * @param null $page
     * @param array $options
     * @return array
     */
    function paginate($items, $perPage = 15, $page = null, $options = []): array
    {
        $page = $page ?: (Paginator::resolveCurrentPage() ?: 1);
        $items = $items instanceof Collection ? $items : Collection::make($items);

        $data = new LengthAwarePaginator($items->forPage($page, $perPage),
            $items->count(), $perPage, $page, $options
        );

        return $data->toArray();
    }
}
$sale_data = DB::table('transactions')
            ->Join('users','users.id','=','transactions.customer_id')
            ->selectRaw('
                SUM(CASE WHEN `transactions`.`transaction_type` = 1 THEN `transactions`.`total_amount` END)  AS sale,
                SUM(CASE WHEN  `transactions`.`transaction_type` = 1 THEN `transactions`.`max_factor_qty` END) AS max_factor_qty,
                SUM(CASE WHEN `transactions`.`transaction_type` = 2 THEN `transactions`.`total_amount` END)  AS sale_return,
                SUM(CASE WHEN `transactions`.`transaction_type` = 2 THEN `transactions`.`max_factor_qty` END)  AS max_factor_qty_return,
                `transactions`.`transaction_type` AS transaction_type,
                `transactions`.`route_id` AS route_id,
                `transactions`.`invoice_no` AS invoice_no,
                `users`.`id` AS customer_id,
                `users`.`code` AS customer_code,
                `users`.`name` AS customer_name
            ')
            ->whereRaw($column.$query)
            ->where('transactions.status', 3)
            ->groupBy('transactions.invoice_no', 'transactions.transaction_type');



$collection_data = paginate($sale_data->get(), $perPage, $page);

return response()->json($collection_data );

any Help?