ahmeddabak

Certified laravel developer at LASE PeCo Systemtechnik GmbH

Member Since 4 Years Ago

Wesel

Experience Points
204,670
Total
Experience

330 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
1371
Lessons
Completed
Best Reply Awards
107
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 41
204,670 XP
Dec
14
1 month ago
Activity icon

Replied to Render()

It is a user-defined method, without the source code no one will be able to tell what it does.

Activity icon

Replied to Let's Encrypt With Nginx : Challenge Failed For Domain

Change the well-known section of the config to:

location ~ /.well-known {
    allow all;
}

Then you should use the following command, it will take care of nginx for you.

sudo certbot --nginx -d example.com -d www.example.com

For more info read this digitalocean answer.

Nov
18
2 months ago
Activity icon

Awarded Best Reply on Help Converting CURL Request Into Guzzle Request

You are not sending the headers with the get request.


$client = new Client();

$response = $client->get("https://xxxxxxx.xx.auth0.com/api/v2/users/{$userId}" ,[
    'headers' => [
        "Authorization" => "Bearer {$temp_token}",
	"Cache-Control" => "no-cache",
	"Accept" => "application/json",
    ]
]);

echo $response->getBody()->getContents();
Nov
16
2 months ago
Activity icon

Awarded Best Reply on Create An Apache Virtualhost For REST Laravel API

This should work, notice the ServerNameand the ServerAlias

//example.com.conf
<VirtualHost *:80>
       
         ServerName example.local
         ServerAlias www.example.local
         DocumentRoot /var/www/example/public

         <Directory "/var/www/example/public">
                  AllowOverride All
                  Require all granted
         </Directory>
    
        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
//api.example.com.conf
<VirtualHost *:80>
 
         ServerName api.example.local
         ServerAlias www.api.example.local
         DocumentRoot /var/www/api

         <Directory "/var/www/api">
                  AllowOverride All
                  Require all granted
         </Directory>
    
        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
Activity icon

Awarded Best Reply on Why I Have To Use ".default" When Require Some Vue Component To Work?

When using ES6 imports export default Sidebar, the exported module is of the format {"default" : Sidebar}.

The import statement import * from Sidebar handles this assignment for you, however, you have to do the require("./components/Sidebar").default conversion yourself.

If you want to avoid that, use module.exports instead of export default.

Activity icon

Replied to How To Best Handel 1500 Requests A Second

Many thanks for your time and advice, we will start testing with laravel vapor starting tomorrow.

Activity icon

Replied to How To Best Handel 1500 Requests A Second

You are right, any other suggestions on how to handle all these requests in the code

Activity icon

Replied to How To Best Handel 1500 Requests A Second

So if we wanted to manage the server our self, your suggestion would be Amazon aws lambada.

Activity icon

Started a new Conversation How To Best Handel 1500 Requests A Second

In our company, we developed our own cloud web application to gather data from sensors in real-time.

We have the following components:

Laravel 8, PHP 7.4, MySQL 8, Redis 5 used for the queues with horizon, laravel-websockets from beyondcode used to update displays in real-time

Currently, the whole application is hosted on a single droplet on digitalocean, which was not a problem till now, as we currently only receive 16 requests a second from about 40 sensors.

The problem is we need to add another 1000 sensors in December, and we estimate about 1500 requests a second.

We started optimizing our cloud for this high traffic, by hitting the database only when it is really necessary, and using caching when possible, we have also moved all the logic to handle the request from a sensor to a job so that we can queue it and return as soon as possible.

But I wanted to ask the experts here what would they suggest to do, first we want to switch to better infrastructure, like digital ocean kubernetes , or the new app platform, or even something else like amazon aws.

So many options and zero experience with high traffic, what would you suggest.

Nov
14
2 months ago
Activity icon

Replied to Why I Have To Use ".default" When Require Some Vue Component To Work?

When using ES6 imports export default Sidebar, the exported module is of the format {"default" : Sidebar}.

The import statement import * from Sidebar handles this assignment for you, however, you have to do the require("./components/Sidebar").default conversion yourself.

If you want to avoid that, use module.exports instead of export default.

Activity icon

Replied to Create An Apache Virtualhost For REST Laravel API

This should work, notice the ServerNameand the ServerAlias

//example.com.conf
<VirtualHost *:80>
       
         ServerName example.local
         ServerAlias www.example.local
         DocumentRoot /var/www/example/public

         <Directory "/var/www/example/public">
                  AllowOverride All
                  Require all granted
         </Directory>
    
        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
//api.example.com.conf
<VirtualHost *:80>
 
         ServerName api.example.local
         ServerAlias www.api.example.local
         DocumentRoot /var/www/api

         <Directory "/var/www/api">
                  AllowOverride All
                  Require all granted
         </Directory>
    
        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
Activity icon

Replied to PHPStorm Marking Closure As An Error

Try resetting the cache of Phpstorm from the menu:

File Menu -> Invalidate Caches / Restart -> Invalidate and Restart
Oct
10
3 months ago
Activity icon

Awarded Best Reply on Laravel Validation Problem

  $request = [
            ['age' => 25,],
            ['age' => 15, 'father' => "John Doe"],
            ['age' => 40,],
        ];

        for ($i = 0; $i < count($request); $i++) {
            $validator->sometimes("items.{$i}.father", 'required|min:5', function($data) {
                //logic here for $request[$i]['age']
            });
        }