amireix

Member Since 1 Year Ago

Experience Points
1,580
Total
Experience

3,420 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
8
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
1,580 XP
May
06
4 days ago
Activity icon

Awarded Best Reply on Signed Route Always Failes

the env APP_URL should have been in small letters 'auditingwithtenancy' instead of 'auditingWithTenancy' that fixed it

Activity icon

Replied to Signed Route Always Failes

the env APP_URL should have been in small letters 'auditingwithtenancy' instead of 'auditingWithTenancy' that fixed it

May
05
5 days ago
Activity icon

Replied to Signed Route Always Failes

i reformated my post , what is the problem ?? I want the URL to look this way 'ActivateSubscrpier' while its main usage is activating Tenant, I'm posting the right data here...

Activity icon

Started a new Conversation Signed Route Always Failes

hey all, i'm trying to create a signed route to activate the subscriber but it always fails and returns invalid signature

my code is

Route::get('/ActivateSubscriber/{TenantID}',[OwnerTenantsController::class,'ActivateTenant'])->name('Activate.Tenant')->middleware('signed');

calling and creating signer route :

   $Tenant = Tenant::where('id','foo')->firstOrfail();   
   return $activationURL = URL::signedRoute('Activate.Tenant', ['TenantID' => $Tenant->id]);

the created activationURL is : http://auditingWithTenancy.com/ActivateSubscriber/foo?signature=a266d8772900d32afa47f033cadf9260aa339c22583e70ec20a249a98b64dbfc

but when i try accessing it, always returns 403 , any advice

Apr
22
2 weeks ago
Activity icon

Replied to How To Pass Arguments To Seeder Laravel 7x

class DatabaseSeeder extends Seeder { /** * Seed the application's database. * * @return void */ public function run() { $instance = new UserSeeder('[email protected]'); $instance->run(); } }

Activity icon

Replied to How To Pass Arguments To Seeder Laravel 7x

class UserSeeder extends Seeder { protected $email;

public function __construct($email)
{
    $this->email = $email;
}

/**
 * Run the database seeds.
 *
 * @return void
 */

public function run()
{
    DB::table('users')->insert([
        'name' => Str::random(10),
        'email' => $this->email,
        'password' => Hash::make('password'),
    ]);
}

}

Activity icon

Awarded Best Reply on How To Pass Arguments To Seeder Laravel 7x

i managed to do it in this way

Activity icon

Replied to How To Pass Arguments To Seeder Laravel 7x

i managed to do it in this way

Activity icon

Replied to How To Pass Arguments To Seeder Laravel 7x

still got the same error message

Unable to resolve dependency [Parameter #0 [ $email ]] in class UserSeeder

Activity icon

Started a new Conversation How To Pass Arguments To Seeder Laravel 7x

i want to seed the user table based on the given parameter ($email and hashed password)

$this->call( UserSeeder::class,false,compact('email') );

i tried sending the email this way but it didn't work is there's any way i can pass a parameter to the UserSeeder

Jan
28
3 months ago
Activity icon

Replied to Error While Getting Id Inside My Model

i'm using scope to add subquery and it has been working great with me in many similar but i can't understand why it's not responding to ->whereColumn('account_transaction.parent_id', 'account_transaction.id'); and also can't get the id of the model using $this->attributes['id'] !!!!!!!

Jan
27
3 months ago
Activity icon

Replied to Error While Getting Id Inside My Model

@jlrdw Originally i was trying to add subquery and get the sum of the current year from all branches of each account like so

i have table account_transaction and a pivot model account_transaction that has branches which are stored in same table with foreign key parent_id.... so my code is

public function scopeWithBranchesSum($query){

    $query->addSelect(['AllBranchesCurrentYearSum'=> function($query){
        $query->selectRaw('sum(account_transaction.current_year)')
            ->from('account_transaction')
            ->whereColumn('account_transaction.parent_id', 'account_transaction.id'); // brings no results
    }]);

}

but it always returned null so i tried usinng where parent_id column is equal to the model id like so

public function scopeWithBranchesSum($query){

    $query->addSelect(['AllBranchesCurrentYearSum'=> function($query){
        $query->selectRaw('sum(account_transaction.current_year)')
            ->from('account_transaction')
            ->where('account_transaction.parent_id', $this->id); // id is always null
			or 
            ->where('account_transaction.parent_id', $this->attributes['id']); // returns undefined index
    }]);

}

Activity icon

Started a new Conversation Error While Getting Id Inside My Model

in my scope inside my model i'm trying to access my model id By using $this->id but it always return null when i use $this->attributes['id'] it return undefined index ?? any help ?

Activity icon

Started a new Conversation Get ID Inside My Model

Hey , i'm trying to access my pivot model id inside the Model but it returns null as following

public function scopeWithBranchesSum($query,$TransactionsID = null ){

    $id = $this->id;
    $query->addSelect(['AllBranchesCurrentYearSum'=> function($query) use ($id){

        $query->selectRaw('sum(account_transaction.current_year)')
            ->from('account_transaction')
            ->where('account_transaction.parent_id', $id);

    }]);

}

also when i try using

$this-> attributes['id'] it gives me undefined index

it doesn't work also when i make my model extends Model And not Pivot

Nov
11
5 months ago
Activity icon

Started a new Conversation Print Div With PDF

i want to preview a pdf in my vue component after some headings and then print the whole section (headings+pdf), I'm using vue-pdf to display a stored pdf in my webpage and i'm using vue-html-to-paper to print a certain section of my web page which contains some headings and the pdf, the problem is when i try to print that section the pdf isn't rendered and it's displayed as white pages ,,,, also i tried to preview the pdf in my HTML using but on printing the window closes automatically i think that's because when i use embed it already gives and option to print the previewed pdf , any one have any idea how i can reach my goal