MwSpaceLLC

MwSpaceLLC

Member Since 1 Week Ago

Perugia

CTO/CEO at MwSpace LLC

Experience Points 970
Experience Level 1

4,030 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 0
Lessons
Completed
Best Reply Awards 1
Best Reply
Awards
  • Start Your Engines Achievement

    Start Your Engines

    Earned once you have completed your first Laracasts lesson.

  • First Thousand Achievement

    First Thousand

    Earned once you have earned your first 1000 experience points.

  • One Year Member Achievement

    One Year Member

    Earned when you have been with Laracasts for 1 year.

  • Two Year Member Achievement

    Two Year Member

    Earned when you have been with Laracasts for 2 years.

  • Three Year Member Achievement

    Three Year Member

    Earned when you have been with Laracasts for 3 years.

  • Four Year Member Achievement

    Four Year Member

    Earned when you have been with Laracasts for 4 years.

  • Five Year Member Achievement

    Five Year Member

    Earned when you have been with Laracasts for 5 years.

  • School In Session Achievement

    School In Session

    Earned when at least one Laracasts series has been fully completed.

  • Welcome To The Community Achievement

    Welcome To The Community

    Earned after your first post on the Laracasts forum.

  • Full Time Learner Achievement

    Full Time Learner

    Earned once 100 Laracasts lessons have been completed.

  • Pay It Forward Achievement

    Pay It Forward

    Earned once you receive your first "Best Reply" award on the Laracasts forum.

  • Subscriber Achievement

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • Lifer Achievement

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • Laracasts Evangelist Achievement

    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 Achievement

    Chatty Cathy

    Earned once you have achieved 500 forum replies.

  • Laracasts Veteran Achievement

    Laracasts Veteran

    Earned once your experience points passes 100,000.

  • Ten Thousand Strong Achievement

    Ten Thousand Strong

    Earned once your experience points hits 10,000.

  • Laracasts Master Achievement

    Laracasts Master

    Earned once 1000 Laracasts lessons have been completed.

  • Laracasts Tutor Achievement

    Laracasts Tutor

    Earned once your "Best Reply" award count is 100 or more.

  • Laracasts Sensei Achievement

    Laracasts Sensei

    Earned once your experience points passes 1 million.

  • Top 50 Achievement

    Top 50

    Earned once your experience points ranks in the top 50 of all Laracasts users.

20 Feb
2 days ago

MwSpaceLLC left a reply on 'orWhere' Not Work Eloquent Model Relationship

@TYKUS - Thank you friend Sorry for disturbing you is this information that I missed

MwSpaceLLC left a reply on 'orWhere' Not Work Eloquent Model Relationship

@SERGIU17 - Thanks for the reply Yes,

    $finder = Auth::user()->client()
        ->where('business_name', 'LIKE', '%' . $query . '%')
        ->orWhere('vat_number', 'LIKE', '%' . $query . '%')
        ->orWhere('fiscal_code', 'LIKE', '%' . $query . '%');

    dd($finder->toSql());1

RESULT:

"select * from `clients` where `clients`.`user_id` = ? and `clients`.`user_id` is not null and `business_name` LIKE ? or `vat_number` LIKE ? or `fiscal_code` LIKE ? ◀"

MwSpaceLLC left a reply on 'orWhere' Not Work Eloquent Model Relationship

@BOZHKOS - Thanks for the reply Yes, but the search is done via user_id relationship, I'm not looking for any columns in the client model.

if orWhere is removed, the query shows users only what belongs to that USER_ID

MwSpaceLLC started a new conversation 'orWhere' Not Work Eloquent Model Relationship

  • Laravel Version: 5.7.25
  • PHP Version: 7.2.14
  • Database Driver & Version: MySQL 2ª gen. 5.7

We are working to do a search in Ajax. something goes wrong in the relationship between the models. when a user searches for his customers he should see his. but with the orWhere function it seems that laravel forgets the relationship.

and they want to tell me not to open support on github? if this is not a bug. so what is it?

CODE:

    $finder = Auth::user()->client()
        ->where('business_name', 'LIKE', '%' . $query . '%')
        ->orWhere('vat_number', 'LIKE', '%' . $query . '%')
        ->orWhere('fiscal_code', 'LIKE', '%' . $query . '%');

    var_dump(Auth::id());
    dd($finder->get());

this code returns the same result for two types of different users:

int(971501)

Collection {#1019 ▼
  #items: array:2 [▼
    0 => Client {#1022 ▼
      #connection: "mysql"
      #table: "clients"
      #primaryKey: "id"
      #keyType: "int"
      +incrementing: true
      #with: []
      #withCount: []
      #perPage: 15
      +exists: true
      +wasRecentlyCreated: false
      #attributes: array:24 [▼
        "id" => 895527
        "user_id" => 971500
        "company_id" => 776888
        "type" => "3"
        "target_code" => "WSOPGP"
        "business_name" => "SHAREASY SRLS"
        "vat_number" => "IT03627940541"
        "fiscal_code" => "IT03627940541"
        "phone" => "+390755056170"
        "mobile" => "+39"
        "fax" => null
        "email" => "[email protected]"
        "pec" => "[email protected]"
        "location" => "Via Camillo Bozza, Chiugiana, PG, Italia"
        "cap" => "06073"
        "common" => "Corciano"
        "province" => "PG"
        "nation" => "IT"
        "note" => null
        "site" => null
        "profile_picture" => "/assets/img/brand/company.png"
        "cover_image" => null
        "created_at" => "2019-02-18 17:53:07"
        "updated_at" => "2019-02-18 17:53:07"
      ]
      #original: array:24 [▶]
      #changes: []
      #casts: []
      #dates: []
      #dateFormat: null
      #appends: []
      #dispatchesEvents: []
      #observables: []
      #relations: []
      #touches: []
      +timestamps: true
      #hidden: []
      #visible: []
      #fillable: []
      #guarded: array:1 [▶]
    }
    1 => Client {#1023 ▶}
  ]
}

as you see inserted is not the same even if we are sure to write report via ID authentication

15 Feb
1 week ago

MwSpaceLLC left a reply on No Scheduled Commands Are Ready To Run | Empty

Unfortunately still today nothing that works properly.

No scheduled commands are ready to run

This is our Crohn we have only moved www-data user for not having problems reading log permissions:

`` `

          • cd /var/www/my.folder.com/ && php artisan schedule: run >> crontab.www-data
          • cd /var/www/my.folder.com/ && php artisan sdi: queue >> crontab.www-data `` `

Only the direct command is executed.

We have already successfully added the user to the same www-data group, with the same permissions. if anyone knows how to properly add users to www-data on debian removing all the problems of reading / writing saei happy.

this is because if I run the artisan command with a user other than www-data, if it generates an error log, then laravel can not read it.

Greetings from @mwspacellc

11 Feb
1 week ago

MwSpaceLLC left a reply on @yield Is Not Working

I do not know why it does not work for you. but in my projects for the pieces of code I use a simple include

because for the components you do not simply use:

@Include ('header')

and in the header.blade.php file, put:

`` `

                                                 

Clean Blog              A Blog Theme by Start Bootstrap                                    `` `

MwSpaceLLC left a reply on Please Help Me Pick A Front End!

Whether you choose to work on ReactJS or VueJS, both the frameworks have a little difference between them and the final decision is highly based on the requirements of your project.

If you want to integrate JavaScript framework into your existing application then Vue.js is the best choice and if you want to create new mobile apps using JavaScript, then ReactJS is the best option to choose.

MwSpaceLLC left a reply on No Scheduled Commands Are Ready To Run | Empty

@ORION - Thank you for your reply, but the problem is that the CRON laravel queue is not processed. The command works perfectly if, for example, we call it with: php artisan elena: help * * * * * cd /var/www/myfolder.com/ && php artisan elena: help >> crontab.laravel or we insert in the schedule function (Schedule $ schedule) only: Artisan :: call ('elena: elp')

therefore: Any scheduled (not just elena) command is not executed.

MwSpaceLLC left a reply on No Scheduled Commands Are Ready To Run | Empty

@SNAPEY - ps: I'm Italian and sometimes I write with google to speed up.

We have tried:

first without withoutOverlapping ()

then with withoutOverlapping ()

In no case has it ever worked. Also removed the cache.

consider that now the cron is always connected. and there is no trace of operation. only No scheduled commands are ready to run.

We contacted Laravel. but obviously it does not support us.

for now the cron is scheduled directly, but we do not like this because the app is multidomain and we would like to manage everything with laravel.

MwSpaceLLC left a reply on No Scheduled Commands Are Ready To Run | Empty

@SNAPEY - no.. never...

thanks for the info but nothing. yesterday we had read a cache of commands and we had already tried to delete it =(

10 Feb
1 week ago

MwSpaceLLC left a reply on Form Data Showing Name And Email Required/NULL In Laravel 5.7

@SAGORISLAM - just check that your frontend does not have VALIDATE in js.

this happens when you use a template taken online. You do not know if there is a validate connected.

so to understand where is the problem you have to remove all js links to that form leaving only css / html and action on php.

MwSpaceLLC left a reply on No Scheduled Commands Are Ready To Run | Empty

Unfortunately. already tried

MwSpaceLLC left a reply on Returning False And A Value From Function?

I did not understand what kind of data you're cycling and what kind of date you want to receive. it comes to me:

public function hasEnoughStockLeftToBuy($cartItems){
        foreach($cartItems as $item){
            $quantity = $item->quantity;
            $discount = Discount::getBySlug($cart->slug);
            $stockLeft = $discount->stock_left;

            $data = new stdClass;
            $data->id = $item->id;

            if($quantity < $stockLeft){
                $data->result = false;
                //any way to return false along with item id?
            }
        }
        $data->result = true;

        return $data;
    }

    $hasStock = $this->hasEnoughStockLeftToBuy( $cartItems ) ;

    if($hasStock->result){
        //charge customer and empty cart
        ($hasStock->id??'')
    }

MwSpaceLLC left a reply on No Scheduled Commands Are Ready To Run | Empty

@SNAPEY - ok sorry, but an old project of mine did not work. I thought it was that =(

MwSpaceLLC left a reply on No Scheduled Commands Are Ready To Run | Empty

@SNAPEY - no friend, on this there are already stumbled a year ago =)

MwSpaceLLC left a reply on No Scheduled Commands Are Ready To Run | Empty

@SNAPEY - I did not understand =(

I tried everything, also like this:

protected function schedule(Schedule $schedule)
{
    dd($schedule->command('4tyb89tv4yb89vt4yb89')->everyMinute());
}

MwSpaceLLC left a reply on No Scheduled Commands Are Ready To Run | Empty

@ORION - Ho provato 5 minuti... 10, 30, 1 ora, 1 giorno , ->cron('*****'). etc

=)

MwSpaceLLC left a reply on No Scheduled Commands Are Ready To Run | Empty

@SNAPEY - I have already tried, the object is loaded correctly. Now I do not have the result but it's really long. If you want the place later

MwSpaceLLC left a reply on [ELOQUENT] Ordering Users By Last Name On 'name' Column

U have tried this ??

DB::statement( 'SELECT * FROM users ORDER BY name' )->get();

MwSpaceLLC left a reply on No Scheduled Commands Are Ready To Run | Empty

@ORION - yes ... today we have tried everything but the problem is not the class,

we do not understand what the problem is because the same result brings it back even if we try to put the following:

protected function schedule(Schedule $schedule)
{
    $schedule->command('4tyb89tv4yb89vt4yb89')->everyMinute();
}

obviously it should tell us that there is no command, instead it keeps coming back:

###No scheduled commands are ready to run.

the class commented Artisan:: correctly loads the command while the Schedule class with the command, exec, call, etc function is not a sign of life. always returns the same thing

MwSpaceLLC left a reply on No Scheduled Commands Are Ready To Run | Empty

@ORION - I thank you for the answer but I have already tried all the configurations possible.... the result is still the same unfortunately

I have tried all laravel command method =(

MwSpaceLLC left a reply on No Scheduled Commands Are Ready To Run | Empty

@ORION - All user can run the command and the time exec is 3/4 second in test.

In logs laravel not put any info in run.

Only same title.

I have added another command in crontab -e and work fine if I call them directly.

MwSpaceLLC left a reply on Form Data Showing Name And Email Required/NULL In Laravel 5.7

no... if now work your problem is frontend

try to restore all and remove all control in js frontend

MwSpaceLLC left a reply on How Do I Get Last Inserted Data Only

i tried :

    dd(DB::table('users')->latest()->first());

for me work, u result with dd ??

MwSpaceLLC left a reply on Form Data Showing Name And Email Required/NULL In Laravel 5.7

  1. try only to rename the name field with something different if it works you have a problem with the frontend:

  1. try to clear cache login in ssh & : php artisan cache:clear php artisan view:clear

  2. open console (F12) go to Application > Clear storage > Clear Site Data

  3. try another browsere

MwSpaceLLC left a reply on Redirect View After Download Pdf

@DOUGLASAKULA - I was about to answer the same thing =)

MwSpaceLLC left a reply on Form Data Showing Name And Email Required/NULL In Laravel 5.7

try php artisan view:clear e replace name of value with other & try to dd to see if data exist

or set manual value="" in input e dd data

MwSpaceLLC left a reply on How Do I Get Last Inserted Data Only

can you explain it better? you do not understand much What data you would like to get

MwSpaceLLC left a reply on Form Data Showing Name And Email Required/NULL In Laravel 5.7

if you do not have any problems on the client side, you must see the data because if you see the others you must also see the names and emails.

usually on a JavaScript frontend that does some strange case Try removing the input IDs

MwSpaceLLC left a reply on Form Data Showing Name And Email Required/NULL In Laravel 5.7

so your problem is that you do not see that data? Try removing ids

MwSpaceLLC left a reply on Form Data Showing Name And Email Required/NULL In Laravel 5.7

  1. Try to replace the class with this, if it works you've got a mistake to import the class.

public function sendMessage(Symfony\Component\HttpFoundation\Request $request) { }

  1. What if you do a dd what do you see?

dd($request->all())

MwSpaceLLC started a new conversation No Scheduled Commands Are Ready To Run | Empty

Hi guys Sorry for the trouble, ?‍? I write to know if anyone has met this problem. I'm using laravel 5.7 and I'm trying to create a cron but what happens?

?️‍♀️ The scheduled command does nothing, while if I remove the comment on "Artisan :: call" here the command is executed.

?Code in Kernel: * * @param \Illuminate\Console\Scheduling\Schedule $schedule * @return void */ protected function schedule(Schedule $schedule) { // Artisan::call('elena:help');

    $schedule->command('elena:help')->everyMinute();
}

?Crontab:

          • cd /var/www/myfolder.com/ && php artisan schedule:run >> crontab.laravel

?Artisan Command List : elena elena:help Extract strategic information on conversation client

?‍♂️php artisan up ? : Yes

It's been two days since I can not find a solution I'm going crazy. I thank any person give me a hand ?