Aronaman

Aronaman

Member Since 7 Months Ago

Experience Points
840
Total
Experience

4,160 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
3
Lessons
Completed
Best Reply Awards
0
Best Reply
Awards
  • start-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-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-token Created with Sketch.

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • lifer-token Created with Sketch.

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • lara-evanghelist 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
840 XP
Oct
18
1 day ago
Activity icon

Replied to Call To A Member Function 'method'() On Null

i try to seed data using faker !

 //pivot table LocalbookConfrencetype 
       factory(App\LocalBook::class,50)->create();
Activity icon

Started a new Conversation Call To A Member Function 'method'() On Null

error


   Symfony\Component\Debug\Exception\FatalThrowableError  : Call to a member function localpayment() on null

  at C:\laragon\www\Getrest\database\seeds\CreateAdminUserSeeder.php:40
    36|         $local_payment=App\LocalPayment::find(1);
    37|         $local_reservation=App\LocalReservation::find(1);
    38|
    39|       $local_payment=factory(App\LocalPayment::class,10)->make();
  > 40|        $local_book->localpayment()->save($local_payment);
    41|
    42|         $refund=factory(App\Refund::class,100)->make();
    43|
    44|        $local_payment->refunds()->saveMany($refund);

  Exception trace:


//** local payment 
       //one to one
        // App\LocalPayment::truncate();
        $local_book=App\LocalBook::find(1);
        $local_payment=App\LocalPayment::find(1);
        $local_reservation=App\LocalReservation::find(1);

      $local_payment=factory(App\LocalPayment::class,10)->make();
       $local_book->localpayment()->save($local_payment); 

        $refund=factory(App\Refund::class,100)->make();
      
       $local_payment->refunds()->saveMany($refund);

       $localhistory=factory(App\LocalHistory::class,100)->make();
      
       $local_payment->localHistories()->saveMany( $localhistory);

      
//1 to many localpayment->bookstatus
        $bookstatus=factory(App\BookStatus::class, 20)->make();
       $local_payment->bookstatus()->saveMany($bookstatus);
//1 to many localpayment->checkandbalance
       $checkbalance=factory(App\CheckandBalance::class,20)->make();
       $local_payment->checkbalance()->saveMany($checkbalance);

//***local reservation 
       $localbook=factory(App\LocalReservation::class,10)->make();
       $local_reservation->localBooks()->saveMany( $localbook);

localBook MODEL


 public function localpayment(){
      
       return  $this->hasOne(LocalPayment::class);


        }
Oct
17
2 days ago
Activity icon

Started a new Conversation HasManythrough Relation Database Seeding

i have 3 table country, org, room. i made hasManythrough relationship.

//country model

public function rooms()
        {
                return $this->hasManyThrough(
                Organization::class,
                Room::class,
                'country_id', // Foreign key on organizations table...
                'organization_id', // Foreign key on rooms table...
                'id', // Local key on countries table...
                'id' // Local key on organization table...
        );
        }

// i create OrganizationTableSeeder

 $room=factory(App\Room::class, 10)->make();
       $country->organization->rooms()->saveMany($room);

       $confrence=factory(App\Confrence::class, 5)->make();
       $country->organization->confrences()->saveMany($confrence);


any help ....:)
Oct
14
5 days ago
Activity icon

Replied to Assign Relationship For Specifi User Role

Ok...I it's working my bad

Activity icon

Replied to Assign Relationship For Specifi User Role

I am using spatial....it's not about authentication. ..it work fine...my question is on the user table there is No 'role' column. All my users include me (admin) are listed ....while I create relationship with localbook table I use user_id inside local books but not all user (a user with local role)....how can I do this....😣

Activity icon

Replied to Assign Relationship For Specifi User Role

Can u show me some code...what you suggest.. I lost

Activity icon

Replied to Assign Relationship For Specifi User Role

What if I did RefundRequest table

$table->integer('user_id')->unsigned()->default (1);

User_id=1 admin user...

Activity icon

Replied to Assign Relationship For Specifi User Role

My question is :-on the refund table I create user_id..and I want id with specific role (admin role). B/c in user_Id (there are different role )...I know it's simple, but I don't got it....ok I remove where from request function and then ...

Activity icon

Replied to Assign Relationship For Specifi User Role

i make user role relationship and refund request approve by "admin" and local book by the "local".

Activity icon

Started a new Conversation Assign Relationship For Specifi User Role

I have refund tables 1 to Many relation with user admin role. I have users table the question is how to assign for specif role in the model

I try this ...

//user model

Public function refund (){ return $this->hasMany(RefundRequest::class)->where ('roles.name', 'Admin') }

Oct
11
1 week ago
Activity icon

Started a new Conversation Sales , Commision, Tax Analysis

Easy way to do calculation of my sales price, commison, tax . Every day, every month.

Should i use reactjs or any recomendation ...I lost

Oct
09
1 week ago
Activity icon

Replied to Eloquent And Tables

I run sum query for each table and how can I sum the 3 daily price from 3 tables... for specific customer_id, date

Activity icon

Replied to Eloquent And Tables

Can you show me with some code please ....I am lost Step by step

Calculation take place every day for all customers

Activity icon

Started a new Conversation Eloquent And Tables

3 tables Cash_payment, local_payment, online_payment.

I have daily total price calculated for each table. .my question is its possible to sum total price of 3 tables.

Each table as no relationship and no common table b/c in case of changing value can cause problem .

I think it's clear :)

Activity icon

Started a new Conversation How To Store Different Tables Using One Create Forms

I have 6 tables and I have organization.blade.php to create form fields for all tables. how to store all tables using one custom forms. ..

I made relationship for all the table can you give me some examples

Activity icon

Replied to My Question

I attach more information how I can acchive using join and group by...

Activity icon

Replied to Report With Laravel

Thanks for reply JLRDW

I don't have any idea about pdo instance..can give some example using join and group by .....

Activity icon

Started a new Conversation Report With Laravel

I have country, org , room, book_status, customer_type, customer, room_type and reservation tables.

Country-->org--> room = hasManytrough relationship

Room--> room_type = 1 to many relationship

Customer_type--> customer--> reservation = hasManythrough relationship

Reservation--> book_status = 1 to many relationship

Customer_id, room_type_id, book_status_id inside reservation table.

For better visualisation

Reservation table

Id , customer_Id, data, room_type_id, no_room, check_in, check_out, discount, price, total_price, commusion, book_status.

Now what I want to archive is without creating any other table how to prepare daily, month report.

Filter by (same date, same org(org_id), book_status="booked") count, sum price= total price and total commision .

The daily report look like this..

No, Date, org_name, org_phone, no_people_reserved, total price, total commision. Every row for single organization and Every day for many org (hotels, ..).

Thanks ARON

Oct
08
1 week ago
Activity icon

Replied to My Question

Thanks for reply

I have country, org , room, book_status, customer_type, customer, room_type and reservation tables.

Country-->org--> room = hasManytrough relationship

Room--> room_type = 1 to many relationship

Customer_type--> customer--> reservation = hasManythrough relationship

Reservation--> book_status = 1 to many relationship

Customer_id, room_type_id, book_status_id inside reservation table.

For better visualisation

Reservation table

Id , customer_Id, data, room_type_id, no_room, check_in, check_out, discount, price, total_price, commusion, book_status.

Now what I want to archive is without creating any other table how to prepare daily, month report.

Filter by (same date, same org(org_id), book_status="booked") count, sum price= total price and total commision .

The daily report look like this..

No, Date, org_name, org_phone, no_people_reserved, total price, total commision. Every row for single organization and Every day for many org (hotels, ..).

Thanks ARON

Activity icon

Started a new Conversation My Question

sales, commission and other report need other database table to store in laravel or just it works with query. daily, Month,...