RIAengine

RIAengine

Member Since 9 Months Ago

Experience Points 4,300
Experience Level 1

700 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 36
Lessons
Completed
Best Reply Awards 0
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.

14 Mar
2 months ago

RIAengine left a reply on Sudo Password After Provisioning New Server Not Working

I had this happen, normally I don't have a problem copy the sudo password from the forge email and pasting, but with a new server I setup, this was the issue.

However I typed the password manually and it worked.

12 Feb
3 months ago

RIAengine left a reply on Spark License With Multiple Developers

Yes I did figure this out, you do this in the composer.json:

Under the requires:

"laravel/spark-aurelius": "7.0.3",

And then add a section to composer.json like this:

"repositories": [
        {
            "type": "vcs",
            "url": "https://x-access-token:<blahblahblah>@github.com/laravel/spark-aurelius.git"
        }
    ],

Where is your access token. I included this composer.json in git and when running composer update it works great.

RIAengine left a reply on Forge Disk Size Defaults To 20 GB .... How To Create Bigger?

Yep thanks. I did it and it was easy.

11 Jan
4 months ago

RIAengine left a reply on Log Mailgun Response To Database - Open/link Tracking And Mail Logging

I created a mailer that extends mailable. Inside there in the build function I am doing this to send mail. I don't use the simple version since you can't do headers that way (that I'm aware of):

            return $this->from($advisor_email)
                ->view('/emails/adv-and-privacy-email')->with('email_body', $email_body)->with('email_signature', $email_signature)->with('docs', $docs)
                ->subject($email_subject)
                ->withSwiftMessage(function ($message) {
                    $advisor_id = $this->userid;
                    $message->getHeaders()
                        ->addTextHeader("X-Mailgun-Variables", json_encode([
                            "type" => "verification",
                            "id"   => "$advisor_id"
                        ]));
                });

From your example above I can see we are talking about the same thing. The 'id' is nothing special, you can specify it as 'id' or you can specify different variables. And yes looks like you have figured out how you can get that variable from the response.

RIAengine left a reply on Log Mailgun Response To Database - Open/link Tracking And Mail Logging

If you are talking about the custom mailgun variables that you can add to the header then I am doing it like this:

                ->withSwiftMessage(function ($message) {
                    $advisor_id = $this->userid;
                    $message->getHeaders()
                        ->addTextHeader("X-Mailgun-Variables", json_encode([
                            "type" => "verification",
                            "id"   => "$advisor_id"
                        ]));
                });

Then you can parse through the response to get those variables. I do that later after storing the raw response in the DB.

If that's not what you are asking perhaps you can clarify more ...

RIAengine left a reply on Log Mailgun Response To Database - Open/link Tracking And Mail Logging

You will needs to create a controller to handle the responses, I setup MailgunController and added 4 functions, such as:

    public function getdeliveries(Request $request)
    {
        $events = json_encode(request()->__get('event-data'));
        $insert = DB::table('email_logs')->insert(
            ['log_type' => 'delivered', 'json' => $events, 'migrated' => FALSE, 'userid' => 0, 'created_at' => Carbon::now()]
        );

        if($insert) {

            return response()->json(['status' => 200]);

        }
        else
        {

            app('log')->debug(request()->all());
            return response()->json(['status' => 404]);

        }

    }

Then in routes/api.php you need to add your routes. Such as:

Route::post('deliveries', '[email protected]');

Then setup your webhooks in https://app.mailgun.com/app/webhooks. Then Mailgun will send the responses for each type of event to the right place.

02 Dec
5 months ago

RIAengine started a new conversation Forge Disk Size Defaults To 20 GB .... How To Create Bigger?

Using AWS, and setting up servers through forge. THere is no setting for disk or volume size, so it defaults to a 20GB disk. apparently too small for me. Forge documentation doesn't seem to have anything about it.

27 Nov
5 months ago

RIAengine left a reply on Queue Runs Same Job Multiple Times

Thanks, I dug deeper and found that the sqs credentials were being denied when it was trying to delete the message after running the job. So anyway, I guess that was the error happening afterwards that kept the job in the queue, and what made it get reworked.

I appreciate the help!

RIAengine left a reply on Queue Runs Same Job Multiple Times

changed --tries=3 to --tries=1 in /etc/supervisor/conf.d/laravel-worker.conf and that seemed to fix it. Odd. It's been like that since I setup supervisor and never had that happen.

RIAengine started a new conversation Queue Runs Same Job Multiple Times

I create one job, a chain of 4 jobs, and refresh the queue to see it multiplying the jobs, sending dozens of emails. any thoughts why this might happen?

26 Nov
5 months ago

RIAengine left a reply on Laravel Horizon On Mac Requires Ext-pcntl

Hmm I have php 7.2 and getting this error. installed using brew install php. should work.

13 Nov
6 months ago

RIAengine left a reply on Missing Origin Validation In Webpack-dev-server

I don't think there is any solution. it's just something disconcerting when you run 'npm install' that doesn't seem to impact anything else yet for me.

10 Nov
6 months ago

RIAengine started a new conversation Missing Origin Validation In Webpack-dev-server

I have this when I run npm install. Anyone have ideas how to fix? This started happening only yesterday I believe. Following the instructions at https://nodesecurity.io/advisories/725 only seems to make it worse.

08 Nov
6 months ago

RIAengine left a reply on .env Variables Returns Null

This was happening to me and php artisan config:clear worked.

23 Oct
7 months ago

RIAengine started a new conversation Spark License With Multiple Developers

I hired a couple developers to help me with my spark app. But they can't install spark locally without installing from the git repo and they can't do that without joining the repo. But they didn't buy spark. I hope I'm making sense. I have one site license but need multiple people to contribute. Anyone knows how this is supposed to work?

I sent spark support an email this morning but nothing from them.

07 Sep
8 months ago

RIAengine left a reply on Running Php Artisan Cache:clear Base Table 'cache' Not Found

ah, yes right, thanks. so do I need to create a table for cache? I followed instrux on laravel, I have a jobs and failed jobs table but not cache.

RIAengine left a reply on Cannot Update Or Install Spark

I had trouble too, did you follow this step and join the github repo?

Installation Via Composer Spark provides a Satis repository which makes it simple to install Spark just like any other Composer package. First, make sure you have purchased a Spark license and joined the Spark GitHub repository.

Go here:

https://spark.laravel.com/settings#/github

And see if the setting says "disconnect from github'. Then you know you joined. Otherwise you have to join.

Sorry not sure this answers or if you already did this.

RIAengine left a reply on Running Php Artisan Cache:clear Base Table 'cache' Not Found

And I should mention I was able to perform migration and other artisan tasks.

RIAengine left a reply on Running Php Artisan Cache:clear Base Table 'cache' Not Found

The verbose output:

php artisan cache:clear -v

Illuminate\Database\QueryException : SQLSTATE[42S02]: Base table or view not found: 1146 Table 'advnouvre2.cache' doesn't exist (SQL: delete from cache)

at /Users/techcyclist/PhpstormProjects/ww2-nouvre/vendor/laravel/framework/src/Illuminate/Database/Connection.php:664 660| // If an exception occurs when attempting to run a query, we'll format the error 661| // message to include the bindings with SQL, which will make this exception a 662| // lot more helpful to the developer instead of just the database's errors. 663| catch (Exception $e) {

664| throw new QueryException( 665| $query, $this->prepareBindings($bindings), $e 666| ); 667| } 668|

Exception trace: 1 PDOException::("SQLSTATE[42S02]: Base table or view not found: 1146 Table 'advnouvre2.cache' doesn't exist") /Users/techcyclist/PhpstormProjects/ww2-nouvre/vendor/laravel/framework/src/Illuminate/Database/Connection.php:479

2 PDO::prepare("delete from cache") /Users/techcyclist/PhpstormProjects/ww2-nouvre/vendor/laravel/framework/src/Illuminate/Database/Connection.php:479

3 Illuminate\Database\Connection::Illuminate\Database{closure}("delete from cache", []) /Users/techcyclist/PhpstormProjects/ww2-nouvre/vendor/laravel/framework/src/Illuminate/Database/Connection.php:657

4 Illuminate\Database\Connection::runQueryCallback("delete from cache", [], Object(Closure)) /Users/techcyclist/PhpstormProjects/ww2-nouvre/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624

5 Illuminate\Database\Connection::run("delete from cache", [], Object(Closure)) /Users/techcyclist/PhpstormProjects/ww2-nouvre/vendor/laravel/framework/src/Illuminate/Database/Connection.php:490

6 Illuminate\Database\Connection::affectingStatement("delete from cache", []) /Users/techcyclist/PhpstormProjects/ww2-nouvre/vendor/laravel/framework/src/Illuminate/Database/Connection.php:435

7 Illuminate\Database\Connection::delete("delete from cache", []) /Users/techcyclist/PhpstormProjects/ww2-nouvre/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php:2587

8 Illuminate\Database\Query\Builder::delete() /Users/techcyclist/PhpstormProjects/ww2-nouvre/vendor/laravel/framework/src/Illuminate/Cache/DatabaseStore.php:224

9 Illuminate\Cache\DatabaseStore::flush() /Users/techcyclist/PhpstormProjects/ww2-nouvre/vendor/laravel/framework/src/Illuminate/Cache/Repository.php:574

10 Illuminate\Cache\Repository::__call("flush", []) /Users/techcyclist/PhpstormProjects/ww2-nouvre/vendor/laravel/framework/src/Illuminate/Cache/Console/ClearCommand.php:67

11 Illuminate\Cache\Console\ClearCommand::handle() /Users/techcyclist/PhpstormProjects/ww2-nouvre/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:29

12 call_user_func_array([]) /Users/techcyclist/PhpstormProjects/ww2-nouvre/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:29

13 Illuminate\Container\BoundMethod::Illuminate\Container{closure}() /Users/techcyclist/PhpstormProjects/ww2-nouvre/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:87

14 Illuminate\Container\BoundMethod::callBoundMethod(Object(Illuminate\Foundation\Application), Object(Closure)) /Users/techcyclist/PhpstormProjects/ww2-nouvre/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:31

15 Illuminate\Container\BoundMethod::call(Object(Illuminate\Foundation\Application), []) /Users/techcyclist/PhpstormProjects/ww2-nouvre/vendor/laravel/framework/src/Illuminate/Container/Container.php:564

16 Illuminate\Container\Container::call() /Users/techcyclist/PhpstormProjects/ww2-nouvre/vendor/laravel/framework/src/Illuminate/Console/Command.php:179

17 Illuminate\Console\Command::execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Illuminate\Console\OutputStyle)) /Users/techcyclist/PhpstormProjects/ww2-nouvre/vendor/symfony/console/Command/Command.php:251

18 Symfony\Component\Console\Command\Command::run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Illuminate\Console\OutputStyle)) /Users/techcyclist/PhpstormProjects/ww2-nouvre/vendor/laravel/framework/src/Illuminate/Console/Command.php:166

19 Illuminate\Console\Command::run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) /Users/techcyclist/PhpstormProjects/ww2-nouvre/vendor/symfony/console/Application.php:886

20 Symfony\Component\Console\Application::doRunCommand(Object(Illuminate\Cache\Console\ClearCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) /Users/techcyclist/PhpstormProjects/ww2-nouvre/vendor/symfony/console/Application.php:262

21 Symfony\Component\Console\Application::doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) /Users/techcyclist/PhpstormProjects/ww2-nouvre/vendor/symfony/console/Application.php:145

22 Symfony\Component\Console\Application::run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) /Users/techcyclist/PhpstormProjects/ww2-nouvre/vendor/laravel/framework/src/Illuminate/Console/Application.php:89

23 Illuminate\Console\Application::run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) /Users/techcyclist/PhpstormProjects/ww2-nouvre/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php:122

24 Illuminate\Foundation\Console\Kernel::handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) /Users/techcyclist/PhpstormProjects/ww2-nouvre/artisan:37

RIAengine started a new conversation Running Php Artisan Cache:clear Base Table 'cache' Not Found

Why is artisan looking for a table called cache? There is no migration for a table called cache.

RIAengine left a reply on Calling Job Class From Controller Not Passing Param

Maybe someday this will help someone else ...Figured it out, it was sort of crafted wrong. I added the emailto in the construct and changed the handle function like this:

<?php

namespace App\Jobs;

use Illuminate\Bus\Queueable;
use Illuminate\Queue\SerializesModels;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use Mail;
use App\Mail\AdvAndPrivacyMailer;

class ProcessMail implements ShouldQueue
{
    use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;

    /**
     * Create a new job instance.
     *
     * @return void
     */
    protected $emailto;

    public function __construct($emailto)
    {

        $this->emailto = $emailto;

    }

    /**
     * Execute the job.
     *
     * @return void
     */
    public function handle()
    {

        Mail::to($this->emailto)->queue(new AdvAndPrivacyMailer());

    }
}

I also modified the function that's in my controller, adding 'Request $request' to the function arguments, and also changed how I'm building the call to my job:

From this:

                    dispatch(new ProcessMail($emailto));

to this:

                    $this->dispatch(new ProcessMail($emailto));

RIAengine left a reply on Calling Job Class From Controller Not Passing Param

So assuming $emailto contains value is this the right way to send it to ProcessMail?

dispatch(new ProcessMail($emailto));

RIAengine left a reply on Calling Job Class From Mail Class Not Passing Param

I'm setting $emailto = $email because I was passing $email before. Should not matter but I was trying it in case it worked.

RIAengine left a reply on Calling Job Class From Mail Class Not Passing Param

And

            $clients_table = Auth::user()->__get('clients_table');

            $user = DB::table($clients_table)->where('email', $email)->value('id');
            if (!($user == NULL))
            {

                $emailto = $email;
                //Mail::to($email)->queue(new AdvAndPrivacyMailer());
                dispatch(new ProcessMail($emailto));

                $message = "email was sent to ".$emailto;
                return view('home')->with('message', $message);

            }

RIAengine left a reply on Calling Job Class From Mail Class Not Passing Param

Sorry, code blocks didn't make it. Here they are again:

RIAengine started a new conversation Calling Job Class From Mail Class Not Passing Param

Somehow I'm getting an error that:

Too few arguments to function App\Jobs\ProcessMail::handle(), 0 passed and exactly 1 expected

But I'm passing the parameter. Code in ProcessMail:

05 Sep
8 months ago

RIAengine left a reply on Module Not Found: Error: Can't Resolve 'fs'

I know it's an old thread, but I got this error because i added a profile section to a Spark application. And I added the pointer in the wrong bootstrap.js file. I had to add it to the one inside resources/assets/js/spark-components, rather than the other in resources/assets/js/components. That fixed it for me.

01 Sep
8 months ago

RIAengine left a reply on Mailgun Webhook Data Object Trying To Convert To Array

Wow this is actually really simple. The object coming from Mailgun is already a json object. So getting data out of it much easier than I thought. I just did this to grab one of my fields:

    $attachment = $request['event-data']['message']['attachments'][0]['filename'];

And once I have that I can properly figure out where to store the data. Anyway, much easier than I thought!

RIAengine left a reply on Mailgun Webhook Data Object Trying To Convert To Array

Yeah thanks for the thought. I'm trying any possible idea I can find. I'll fix problems later if it works.

That didn't work. I found another thread about this same thing, unanswered from 6 or 7 months ago.

RIAengine left a reply on Accessing Mailgun Webhook Post Array

Did you figure this out? I'm struggling with the same thing.

RIAengine started a new conversation Mailgun Webhook Data Object Trying To Convert To Array

Not sure where to put this so chose the first topic ...

I have a webhook where mailgun sends successful deliveries, I can send it into the log successfully. However I need to dig into the object and retrieve some fields so I can send to the database. Having a lot of trouble figuring out how to work with this object ... Mailgun docs not helpful on this. Here is the code I'm using, unless you know of a better way, I'm planning to use the RecursiveIteratorIterator and the array iterator. Anyway, it needs an array to work with. Not sure how else I can get this as an array, while it already appears to be an array from the 'is_array' being TRUE. Very odd. Anyway, it's failing on "new RecursiveArrayIterator(json_encode($content, TRUE)),". BTW I also tried, at the top of the file, "$content = request()->__get('event-data');" which also sure looks like an array, but still could not figure out how to get anything out of it. Sorry this might be a little scatterbrained.

public function getdeliveries(Request $request)
{

    $content = (array)$request;

    if (is_array($content))
    {
        $jsonIterator = new RecursiveIteratorIterator(
            new RecursiveArrayIterator(json_encode($content, TRUE)),
            RecursiveIteratorIterator::SELF_FIRST);

        Log::debug($jsonIterator);
    }

    return response()->json(['status' => 'ok']);

}

RIAengine left a reply on Sweetalert2 Getting It To Work

And like a lot of the code posted a year or more ago, this appears to no longer work, as demonstrated above. The package highlighted above is 2-3 years old, which is problematic usually. And following these steps, I get no alert. In source, @include('Alerts::alert') has outputted .... nothing.

29 Aug
8 months ago

RIAengine left a reply on Any Ideas Why Adblock Chrome Extension Would Block So Many Assets From My Spark Site?

That was in fact my problem. The subdomain was adv2, I changed to ww2 and no problem anymore.

28 Aug
8 months ago

RIAengine left a reply on Any Ideas Why Adblock Chrome Extension Would Block So Many Assets From My Spark Site?

I think the problem is my subdomain contains 'ad'. I'll have to change that.

RIAengine started a new conversation Any Ideas Why Adblock Chrome Extension Would Block So Many Assets From My Spark Site?

It's blocking 6 things including app.js and even the PNG logo. Site is here if you want to see if it happens for you:

https://adv2.nouvre.com