TarikAli

TarikAli

Member Since 3 Years Ago

Experience Points
1,360
Total
Experience

3,640 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
2
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,360 XP
May
22
1 week ago
Activity icon

Started a new Conversation Which Is The Best Format To Store Data In Session

Hello , i have a lot of query results some from elequent and others from DB::Table . i want to store the results in sessions , but also when i retrive that data it's useful to filter it with collection helpers. so i store the data as it is from elequent or from DB:: without convert to json or array . do i have to format this data to json or array and decode it again and convert to collection to use collection helpers . is it wrong to store the data as it s without convert it. Thanks

May
12
3 weeks ago
Activity icon

Started a new Conversation Share Logic Between Api And Front

Hello, i have a project front,admin and api . i want to know where to put the logic to be shared between the three parts . i will not use repository . i mean like functions that check or return data and so in api controller return it as json and in others return it with view.

also in api should i use resource .

Thanks

Apr
04
2 months ago
Activity icon

Started a new Conversation Strict Api To Only My App

Hello , i want to prevent laravel api to recive any requests exept from my app , so any one send request to my api it will refuse the request and accept requests just from my app , Thanks

Apr
01
2 months ago
Activity icon

Replied to Pass Ip And User_id In Every Store Model

Thanks @shez1983 . i think trait is a good idea

Activity icon

Replied to Pass Ip And User_id In Every Store Model

Thanks @Snapey . but is there any quick method or attribute in model can do this instead of create observer

Activity icon

Started a new Conversation Pass Ip And User_id In Every Store Model

Hello , in every table i store user_id and ip ; i dont want to pass these data in every store() or update() . is there any way to pass the current user_id , ip to be saved automatically with model in each store and update . thanks

Mar
30
2 months ago
Activity icon

Started a new Conversation Api Angular Laravel Contruction

Hello , i want to ask about api :

i have a project :

front angular api laravel admin panel laravel

How can construct this in a good way ? thanks

Mar
25
2 months ago
Activity icon

Started a new Conversation Auth And Web Middleware (check User Logged In)

Hello , i'm confused between

\Illuminate\Auth\Middleware\Authenticate::class

and

'auth' => \App\Http\Middleware\Authenticate::class

case 1 : in Kernal.php some one add admin middlewareGroup under $middlewareGroups

'web' => [.....],
'admin' => [
      	\Illuminate\Auth\Middleware\Authenticate::class,
		],
'api' => [....],

and in routes :

Route::group([
		'middleware' => ['admin']
], function ($router) {......}

so Admin will execute \Illuminate\Auth\Middleware\Authenticate::class to check if user logged in

case 2 in laravel docs just use auth:

Route::group([
		'middleware' => ['auth']
], function ($router) {......}

what is the difference ? what is the right way to protect admin pages ? or create my own admin Middleware (not group) with auth()->check() and make some stuff like is_user_active and ....

also the web middlewareGroups : in laravel doc. ( the web middleware group is automatically applied to your routes/web.php file by the RouteServiceProvider. ) this means that we don't need to add ['web'] in route::group or we must put it in front routes and admin routes . Thanks

Mar
23
2 months ago
Activity icon

Replied to Database User Grant Privileges

Thanks @tisuchi . it's just an admin panel for website . the user can read ,add ,update ,delete the data .

Activity icon

Started a new Conversation Database User Grant Privileges

Hello, when i create a new Database user from CPANEL and grant Privileges . should i grant all Privileges or select only some Privileges for security ? Thanks

Mar
15
2 months ago
Activity icon

Replied to What Is The Best Way To Share Menu Variable ?

Thanks @rodrigo.pedra for your full explanation , and $request->attributes is new for me .

But for cashe drivers i read some articles talk about the order of cache drivers performance and it was

1 - lowest performance - file

2 - better performance - DB

3 - better performance - memcached

4 - best performance - Redis

i mean DB is Better than file / is this correct ?

Activity icon

Started a new Conversation What Is The Best Way To Share Menu Variable ?

Hello , Please i want to ask about menu in any website . I read 3 ways to do this.

1 - view::share in appServiceProvider Boot function ( or in middleware)

2 - view composer in appServiceProvider Boot function

3 - now in laravel 7 blade component

but also if i want the same menu to be in header and in footer. if i used view composer and passing the tow blades (header , footer) then the query will run Twice and also blade component ( laravel7 ) will run Twice . in this case my be view::share is the better . so what is the best way to share menu in all website components with out performance issue ? Thanks.

Mar
09
2 months ago
Activity icon

Replied to Is Url Path In Model Make A Query ?

$posts = post::where('category_id',1)->get(); n+1 error you mean eager loading ( like getting data with eloquent relations with word (with) )

Activity icon

Replied to Is Url Path In Model Make A Query ?

Thanks a lot SINNBECK

Activity icon

Replied to Is Url Path In Model Make A Query ?

ok thanks Snapey . But you agree with RODRIGO.PEDRA that it will not make a new query ? . it will get the id from the post passed from loop

Activity icon

Replied to Is Url Path In Model Make A Query ?

Thanks RODRIGO.PEDRA

Activity icon

Started a new Conversation Is Url Path In Model Make A Query ?

Hello, in Post model i use this method to get the path of current post

Post Model : public function path () { return url ( 'posts/'.{$this->id} ); }

when i make loop throw posts like

foreach ( $posts as $post) { $post->path }

is $post->path here will make another query to the database or will take the id from current $post of loop of course i'dont want to make another query because i already has it in $post of the loop . Thanks