Full Stack web developer at Freelancer

Member Since 1 Year Ago

Cairo , Egypt

Experience Points
16,280
Total
Experience

3,720 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
144
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 4
16,280 XP
Dec
28
3 weeks ago
Activity icon

Replied to Infinity Categories Level Nested With Bootstrap ?

@imrodrigoalves true , but the problem with me in blade i can't do it :D include inside include

Dec
24
4 weeks ago
Activity icon

Started a new Conversation Infinity Categories Level Nested With Bootstrap ?

Hello am making a blogging system and I want to make unlimited infinity categories I did a category with parent id like this

        Schema::create('categories', function (Blueprint $table) {
            $table->id();
            $table->string('name');
            $table->unsignedInteger('parent_id')->nullable();
            $table->timestamps();
        });

and I have subcategory() method on Category Model

    public function subcategory(){

        return $this->hasMany('App\Category', 'parent_id');

    }

Question is How to make nested level dropdown with bootstrap like this image : https://prnt.sc/w96i1n

Nov
18
2 months ago
Activity icon

Awarded Best Reply on Yajrabox Datatables Many To Many Relationship | Clause Is Ambiguous

Problem fixed after hours of searching ♥

the problem was with there's a duplicated ID called at the same time so I specified each column's name with 'table.column' but there's another problem appears which is data duplicated in a table and to fix this I use custom filterColumn like this

->filterColumn('lawyers.id',function ($query,$keyword){
    $query->whereHas('lawyers',function ($q) use ($keyword){
        $q->where('user_id',$keyword);
    });
})
Activity icon

Replied to Yajrabox Datatables Many To Many Relationship | Clause Is Ambiguous

Problem fixed after hours of searching ♥

the problem was with there's a duplicated ID called at the same time so I specified each column's name with 'table.column' but there's another problem appears which is data duplicated in a table and to fix this I use custom filterColumn like this

->filterColumn('lawyers.id',function ($query,$keyword){
    $query->whereHas('lawyers',function ($q) use ($keyword){
        $q->where('user_id',$keyword);
    });
})
Activity icon

Replied to Yajrabox Datatables Many To Many Relationship | Clause Is Ambiguous

this is a query

$data = Cases::with(['user','lawyers','categories','litigations'])->select(['cases.*']);

and this is the datatable column setting

->addColumn('case_type', function ($data) {
    return $data->categories->map(function($categorie) {
        return '<span class="badge badge-primary">'.$categorie->name.'</span>';
    })->implode('<br>');
})

and this is the Fatatable JS

columns: [
    { data: 'case_type', name: 'categories.id' },
],
Activity icon

Started a new Conversation Yajrabox Datatables Many To Many Relationship | Clause Is Ambiguous

hello am using yajrabox datatables but am facing problem with many to many relationship sections it always shows me

column 'id' in order clause is ambiguous

anyone faced this problem before and fix it?

Nov
17
2 months ago
Activity icon

Started a new Conversation When I Load New Dom El Via Clone

Hello when I load new dom el with clone method in Jquery, I can't target them because the dom is new

Nov
14
2 months ago
Activity icon

Replied to Append Custom Data To Model Output

Am Using This syntax on my controller

        $appointments = Appointment::select(['title','start'])->get();
        return $appointments;
Activity icon

Started a new Conversation Append Custom Data To Model Output

Hello i made an api thats return this data

[
  {
    "title": "Title",
    "start": "2020-11-15 05:38:40"
  },
  {
    "title": "Title",
    "start": "2020-11-15 07:38:40"
  },
  {
    "title": "Title",
    "start": "2020-11-15 08:38:40"
  },
  {
    "title": "Title",
    "start": "2020-11-14 10:38:40"
  }
]

i'd like to add custom data value to each row like

"url": https//example.com/show/(id)

id here depend on every row

Oct
22
3 months ago
Activity icon

Replied to Laravel | Check Output Before Render It To Browser

@automica it's their sites not public to all they gonna put the code via admin panel

Activity icon

Replied to Laravel | Check Output Before Render It To Browser

@apexleo thanks for your reply but as I mentioned I need to do this process with PHP before it renders to the browser

Activity icon

Replied to Laravel | Check Output Before Render It To Browser

@automica I allow to users to put script and CSS codes, so to not duplicate any tag just remove duplicated and keep only first one so the page will load faster even is the user add as many same with same src URL

Activity icon

Started a new Conversation Laravel | Check Output Before Render It To Browser

Hello, I'd like to check the duplicate regiex html output for example

<HTML>
	<head>
		<title>Title</title>
		<script src="jquery.js"></script>
		<script src="jquery.js"></script>
	</head>
	<body>

	</body>
</html>

as you can see there are two scripts with the same jquery so I'd like to filter output and remove duplicate from an array of search item I set, any idea! I will use laravel

Oct
14
3 months ago
Activity icon

Replied to Mistakes With Sensitive Operations?

@tykus it's doesn't work with Model eloquent ?

Activity icon

Replied to Mistakes With Sensitive Operations?

@tykus True it's db operations and thanks for this hint <3

Activity icon

Started a new Conversation Mistakes With Sensitive Operations?

Hello, imagine if I made some operations with try and catch, and if one of the operations failed will stop all other operations, how then undo all operations that finished if any mistake happens because of it?

I found this resource maybe some one need it: https://fideloper.com/laravel-database-transactions

Oct
11
3 months ago
Activity icon

Started a new Conversation Laravel Carbon Advanced Questions

Hello I have Task, is I have cycle start on Tuesday if I apply to this cycle before like Sunday so am in the cycle for 3 days from Sunday to Tuesday

question is how to calculate days if I have a start date and end date is next Tuesday

Oct
02
3 months ago
Activity icon

Replied to Login And Register URL

@laracoft Thanks :)

Activity icon

Replied to Login And Register URL

@wd best thing is to group them with prefix like just change the word 'secret'

Route::prefix('secret')->group(function () {
	Auth::route()
});

so you can enter to URL like

https://example.com/secret/login
Sep
28
3 months ago
Activity icon

Replied to Small But Big Problem :(

you save my day dude <3

Activity icon

Started a new Conversation Small But Big Problem :(

there's "V" letter execute in whole application and made problem when executing any page or request

Look here when executing artisan command: https://prnt.sc/upg6nf here with the empty page: https://prnt.sc/upg7aw

Aug
30
4 months ago
Activity icon

Replied to How To Make Pagination Without Parameter On URL ( Pretty URL Pagination )

@snapey good answer, but I also a pretty URL without any parameter or anything just with quiz slug

Activity icon

Replied to How To Make Pagination Without Parameter On URL ( Pretty URL Pagination )

@silencebringer Hello, quizzes are dynamic so if I can't make method for every question

Activity icon

Replied to How To Make Pagination Without Parameter On URL ( Pretty URL Pagination )

@jlrdw if yes i found this package to make Json API

https://github.com/spatie/laravel-json-api-paginate
Activity icon

Replied to How To Make Pagination Without Parameter On URL ( Pretty URL Pagination )

@jlrdw So I have to use Ajax pagination and pass page number with hidden input via it ? right

Aug
29
4 months ago
Activity icon

Replied to How To Make Pagination Without Parameter On URL ( Pretty URL Pagination )

@silencebringer yeah, I just gave you an example, not real code it big one :D btw if I did next/prev I will get URL with ?page=x number so the user can play with this number and escape next/prev

Activity icon

Replied to How To Make Pagination Without Parameter On URL ( Pretty URL Pagination )

Hello @silencebringer ,

this is what I was thinking for but the question is how :D for example

    public function index()
    {
        $users = User::Paginate(10);
        return view('welcome',compact('users'));
    }

and In View

<div class="container">
    <ol>
        @foreach ($users as $user)
            <li>{{ $user->name }}</li>
        @endforeach
    </ol>
</div>
{{$users->links()}}
Activity icon

Started a new Conversation How To Make Pagination Without Parameter On URL ( Pretty URL Pagination )

Hello I have quiz script so the user should answer every question and click on Next To See Next question I made this with pagination But the problem is the user can jump to other questions without answer it just by change

?page=X

The parameter on URL, so I need a way to hide this Parameter I search but I didn't found any answer :)