osama_abdullah

osama_abdullah

Software Engineer at Iraq

Member Since 4 Months Ago

Akre

Experience Points
1,810
Total
Experience

3,190 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
10
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
1,810 XP
Jun
20
2 weeks ago
Activity icon

Started a new Conversation Can I Fetch Products From Amazon And Display It In My Website Throw Api?

do the popular online shopping websites have API so I can put their products on my website with custom styling and dynamically with API and without mentioning their websites when you display their item on your website?

amazon ebay alibaba alixpress

Jun
19
2 weeks ago
Activity icon

Started a new Conversation How To Override Index Query During Runtime And Update The Table Laravel-nova

in my use case, I need more than one text box for searching in more than two fields in the index view at the same time, because there too much data, laravel-nova provide only one out of the box, so if there is a way that I can add search in a card and update the index query in run time it will be great, and if there are any other solutions for this problem I would appreciate it.

Jun
05
1 month ago
Activity icon

Replied to Policies Unit Tests Doesn't Work In Laravel Nova

@bugsysha can't I do, because it's possible with laravel and I used to do that until now

public function test_admin_can_create_users(): void
{
	$admin = factory(User::class)->states('admin')->create();
	$this->assertStatus(201)->assertSee($admin->name);
}

???!!!

Activity icon

Started a new Conversation Policies Unit Tests Doesn't Work In Laravel Nova

when I want to test policies using PHPUnit it does not work as expected it works based on gate method in novaServiceProvider

protected function gate()
{
	Gate::define('viewNova', function () {
		return true;
	});
}

it only hits this method all policies are ignored, it seems that when using API this method override all policies,

however, when using web all policies are working as expected and it doesn't seem to hit this method at all

how to make policies work as expected in PHPUnit testing

Jun
03
1 month ago
Activity icon

Replied to How To Hide Actions In Lenses Laravel-nova

@briankidd

I tried this but it doesn't work either

->canSee(function () { return false;})

do you mean this or there is another way to do it?

Jun
02
1 month ago
Activity icon

Started a new Conversation How To Hide Actions In Lenses Laravel-nova

actions are displayed in the table rows in all lenses pages how to hide them from lenses?

I already tried

public function actions(Request $request)
{
	return [];
}

in the lense but it didn't work only when I remove the lens from original resource page it's hiding

May
16
1 month ago
Activity icon

Started a new Conversation How Can I Disable Actions In Global Search In Laravel Nova

in laravel nova global search i see actions are returning, where they are coming from? and how can i disable them in global search? https://i.stack.imgur.com/ex9Jc.png this is a screenshot of that issue

May
08
1 month ago
Activity icon

Replied to Clear Cache In Centos Nginx

@bobbybouwmann i tried systemctl restart php-fpm it worked as you said thank you a lot i appreciate it it was a big pain

Activity icon

Started a new Conversation Clear Cache In Centos Nginx

i'm using centos to hoste my laravel application, when i upload the project first time it will be cached, and when i change any php files /classes changes doesn't apply, i tried to php artisan cache:clear php artisan route:clear php artisan config:clear php artisan view:clear all this had no effects even restarting nginx the only way is to change the root directory after each single change please help

Apr
30
2 months ago
Activity icon

Started a new Conversation How Can I Hide Actions Page In Laravel Nova

how to control actions table visibility that is built in to nova?

Activity icon

Started a new Conversation When I Test Autherization In Laravel Nova Using Php Unit, My Policies Are Not Getting Hit

i want to write test for authorization but wen i send requests from php unit, it only hits that default gate that is predefined in novaServiceProvider. so who can i make php unit requests hit policies as expected

Apr
21
2 months ago
Activity icon

Replied to How To Use Custom Vue Component In Laravel Nova Template?

@mrvnk can you tel me how to do that plz

Activity icon

Awarded Best Reply on How Can I Have Access To The Protected Methods Of A Class That I Didn't Extend?

I figured out away to do that.

you can extend that class witch has protected methods in it and and make public methods that returns corresponding protected methods in parent class, then instantiate that class and call the method on that instance of that class

Activity icon

Replied to How Can I Have Access To The Protected Methods Of A Class That I Didn't Extend?

I figured out away to do that.

you can extend that class witch has protected methods in it and and make public methods that returns corresponding protected methods in parent class, then instantiate that class and call the method on that instance of that class

Apr
20
2 months ago
Activity icon

Replied to Where Are You All From?

@armani from witch city in kurdistan?

Activity icon

Started a new Conversation How Can I Have Access To The Protected Methods Of A Class That I Didn't Extend?

i'm using a package for state machine in laravel and state machine apply on a model and of course every single model must extend model that's why i can't extend to the class from the package to have access to the protected methods. is there some way with inner classes or any approaches to be able to use those protected methods?

Apr
18
2 months ago
Activity icon

Started a new Conversation HasMany Relationship Causes Redirect To "/" In Detail Page Of Resource

hasMany relationship in nova resource detail page displays a hole table when some resource has may "HasMany" Field it, it causes redirect to home "/" and it says: "access denied for user [email protected]" and i checked out my config/database.php file i found out that the default user there is forge, but it must take the Credentials from .env file as usual, this issue doesn't occure every time i visit detail page only some times, i checked all related methods on each model that returns relation ship but sill having this issue

full detail and screenshots are available in github link below

https://github.com/laravel/nova-issues/issues/2500

Apr
17
2 months ago
Activity icon

Awarded Best Reply on Is There Such Thing Like BelongsToThrow()

i found a mini package that do exactly what we want to

https://github.com/staudenmeir/belongs-to-through

i tested working perfectly

Activity icon

Replied to Is There Such Thing Like BelongsToThrow()

i found a mini package that do exactly what we want to

https://github.com/staudenmeir/belongs-to-through

i tested working perfectly

Activity icon

Replied to Opposite Of HasManyThrough

country must return a relationship instance

Apr
16
2 months ago
Activity icon

Started a new Conversation Calling Factory Automatically Trigger Creating Even Is There Away To Stop That

i'm using laravel nova so i did

protected static function boot() { parent::boot();

	static::creating(function ($city) {
		$city->user_id = auth()->id();
	});
}

when i do php atisan migrate:fresh --seed it fails because auth() is not defined there

so what is the best solution to fix this issue

Activity icon

Replied to Is There Such Thing Like BelongsToThrow()

i already did that it works fine but when i visit parent resource witch have HasMany relationship with this one it shows an error "trying to get property 'customer' of non object " and that means $this is not defined there but when i do dd($this->order); it works as expected and same if i test it in test route only with nova it shows an error but still it displays data

here what i did

$this->belongsTo('Customer', $this->order->customer->name, '/resources/customers/' . $this->order->customer->id),

        $this->belongsTo('Creator', $this->creator->name, '/resources/users/' . $this->creator->id),

        $this->belongsTo('Updater', $this->updater->name, '/resources/users/' . $this->updater->id),

private function belongsTo($colTitle, $name, $url) { return Text::make($colTitle, function () use ($name, $url) { return "$name"; })->asHtml(); }

Activity icon

Started a new Conversation Is There Such Thing Like BelongsToThrow()

i have three models customer, order and transaction

order belongsTo customer. transaction belongsTo order

i want to return a belongTo customer relationship from transaction model but without storing customer_id in transactions table because i'm already storing order_id and in orders table i'm storing customer_id

i did like this in transaction model

public function order()
{
	return $this->belongsTo(Order::class);
} 

public function customer()
{
	return $this->order->customer();
}

when i call Transaction::first()->customer; it works fine but unfortunately it doesn't work with nova i think because its taking it be ajax request, how can i fix this or is there better way to do this

Apr
11
2 months ago
Activity icon

Started a new Conversation How Can I Override Resource Detail Page In Laravel Nova?

example : if i have customer resource i want to override detail page of customer or any other pages with vue or with blade how can i achive that