mardi 12 juillet 2022

multithreading Laravel [closed]

Hey Guys, I need help with an assignment.

It is necessary to implement a service that provides a REST API for hashing:

Create a task;

Getting the status of task completion;

Stop task execution;

Create a task group;

Obtaining the status of the execution of a group of tasks;

Stopping the execution of a group of tasks;

List of all tasks;

group tasks are executed in the priority queue

There is an idea to use Rabbitmq



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/1fy35MA
via IFTTT

lundi 11 juillet 2022

Login with Linkedin shows error "The Application is disabled" Laravel

I'm integrating LinkedIn with socialite in laravel

I got this error when logging in with LinkedIn "The application is disabled". Can you help identify the issue if ever I missed something? Thanks alot

  "laravel/framework": "5.7.*",
  "laravel/socialite": "^4.4",

The application is disabled - LinkedIn The application is disabled - LinkedIn



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/bWg2RZn
via IFTTT

Splitting methods between controllers

I currently have a controller that is beginning to grow out of control. I'm now going to split it into separate controllers to make it easier to manage and maintain. This is legacy code and therefore, unfortunately, is running laravel 5.2. Upgrading laravel and php version is not an option at the current stage.

Is the following approach ok? Or is there a better way of doing this?

Current Approach

class StoreDistributionData extends Controller
{
    public function method1()
    {
        // code
    }

    public function method2()
    {
        $array = [];
        // lots of logic building above array

        $this->method3($array);
    }

    public function method3($array)
    {
        // code relating to above array
    }

    public function method4($array)
    {
        foreach($array as $k => $v) {
            // more logic
        }
        // more logic using various methods
    }

    // more methods and code
}

Revised Approach

class FormatDistributionData extends Controller
{
    public function method1()
    {
        // code
    }

    public function method2()
    {
        $array = [];
        // lots of logic building above array

        app(StoreDistributionData::class)->splitData($array);
    }
}

class StoreDistributionData extends Controller
{
    public function splitData($array)
    {
        // code relating to above array processed/stored using internal methods
    }

    // more methods
}


from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/GufQhYk
via IFTTT

vendredi 8 juillet 2022

Too few arguments to function App\Http\Controllers\ProduitController::show()

I wants to show users list into my dashboard pannel but it shows me this problem :

Too few arguments to function App\Http\Controllers\ProduitController::show(), 0 passed in C:\wamp64\www\Ecommerce\vendor\laravel\framework\src\Illuminate\Routing\Controller.php on line 54 and exactly 1 expected

Controller File :

public function show($id)
{   
    $produit = Produit::find($id);
    return view('produits', compact('produit'));
}

blade file :

@foreach($produits as $produit)
    <div class="product__item__pic set-bg" data-setbg="">
        <ul class="product__item__pic__hover">
            <li><a href="#"><i class="fa fa-heart"></i></a></li>
            <li><a href="#"><i class="fa fa-retweet"></i></a></li>
            <li><a href="#"><i class="fa fa-shopping-cart"></i></a></li>
        </ul>
    </div>
    <div class="product__item__text">
        <h6><a href="#"></a></h6>
        <h5> Mad</h5>
    </div>
@endforeach 

Route :

Route::get('/produits','ProduitController@show');


from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/tMu9cgj
via IFTTT

Failed to install npm for laravel 5.6

npm ERR! gyp ERR! cwd C:\Users\abc\Desktop\Project\council\node_modules\node-sass npm ERR! gyp ERR! node -v v16.16.0 npm ERR! gyp ERR! node-gyp -v v3.8.0 npm ERR! gyp ERR! not ok npm ERR! Build failed with error code: 1

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\abc\AppData\Local\npm-cache_logs\2022-07-08T11_43_43_669Z-debug-0.log



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/62s8WvV
via IFTTT

jeudi 7 juillet 2022

Install mpdf v8.0.4 for php 7.4 Version

I am running on PHP v 7.4 after an upgrade from the 7.1 version I am having issues on install mpdf v8.0.4 since its compatible with php 7.4 version

The error facing after ruuning composer update

 mpdf/mpdf[v7.0.0-beta1, ..., v7.0.0-beta2] require php ^5.6 || ~7.0.0 || ~7.1.0 -> your php version (7.4.19) does not satisfy that requirement.

running these two commands turns unsuccessfully

composer require mpdf/mpdf v8.0.4
composer require mpdf/mpdf dev-php7-support 


from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/KqTLVwe
via IFTTT

Error 520 Web server is returning an unknown error AWS (Laravel)

I have AWS EC2 Instance and installed Laravel in that but i getting this error when multiple time hits URL.

We have also solution for that when we remove cookie problem is resolved but are not go with this solution. Is there any solution for that



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/PMCeEDO
via IFTTT