firemaps

firemaps

Member Since 2 Years Ago

Experience Points 36,570
Experience Level 8

3,430 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 339
Lessons
Completed
Best Reply Awards 0
Best Reply
Awards
  • start-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-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-token Created with Sketch.

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • lifer-token Created with Sketch.

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • lara-evanghelist 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.

15 Jun
1 month ago

firemaps left a reply on Connecting To MySQL AWS, Security Parameters?

@LAMBOONI - Hey, yeah I figured it out. I have 2 servers running on AWS. The one I created myself via EC2 I need a .pem file to access that I got when creating the server and I needed to whitelist dedicated forge IP's in the AWS EC2 Security Group however the server created with forge automated most of this as far as I can remember.

Using Sequel Pro and the forge-provisioned server, the following params work for me

MySqlHost: ip

Username: forge

Password: forge-database-password

SSH Host: ip

SSH User: forge

With the server I created myself I needed to change

SSH User: ubuntu

SSH Key: ~/.ssh/pem/my-aws-key.pem

SSH Port : 22

Does this help ?

26 Apr
2 months ago

firemaps left a reply on Storing Emojis In The Database

Much easier solution, in PHP write

utf8_encode($text);

and when you need it

$data = utf8_decode($data);

easy

24 Nov
7 months ago

firemaps started a new conversation How Can I Group Multiple Columns Together Into An Object On Database Call?

Let's say I am fetching users

Each user has 10 columns associated with it

How can I group 5 columns together into an object on each user so I can more easily map over them with javascript?

I could do

foreach ($users as $user)
{
   $user['new_object']['col_1'] = $user->col_1;
   $user->col_1->forget(); // sudo code
   $user['new_object']['col_2'] = $user->col_2l;
   // etc 
}

But surely there is a way to group columns into an object on Laravel?

For example, something like

$users = User::where('verified', 1)
             ->group('new_object', ['col_1', 'col_2', 'col_3']),
             ->get();

Or is there a way for me to update my User model to do this? Thanks!

09 May
1 year ago

firemaps started a new conversation 68 Vulnerabilities Found - 20 Low | 33 Moderate | 15 High

Hi, I upgraded to run npm audit and it returned some vulnerabilities

110 low | 35 moderate | 19 high

I have been trying to fix these with the given commands and have reduced the numbers to

20 low | 33 moderate | 15 high

But there is still a lot of work to do and I am not sure how to proceed.

Some other prompts to fix incl

# Run `npm install [email protected]` to resolve 9 vulnerabilities
SEMVER WARNING: Recommended action is a potentially breaking change

# Run `npm install [email protected]` to resolve 4 vulnerabilities
SEMVER WARNING: Recommended action is a potentially breaking change

npm update node-pre-gyp --depth 6 // doesn't do anything

What can I do??

Most of these vulnerabilities are to do with hoek, webpack, deep-extend and gulp, which laravel-mix are dependent on

eg

┌───────────────┬──────────────────────────────────────────────────────────────┐
│ high          │ Regular Expression Denial of Service                         │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package       │ tough-cookie                                                 │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ laravel-mix                                                  │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path          │ laravel-mix > webpack-dev-server > chokidar > fsevents >     │
│               │ node-pre-gyp > request > tough-cookie                        │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info     │ https://nodesecurity.io/advisories/525                       │
└───────────────┴──────────────────────────────────────────────────────────────┘

┌───────────────┬──────────────────────────────────────────────────────────────┐
│ high          │ Regular Expression Denial of Service                         │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package       │ sshpk                                                        │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ webpack                                                      │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path          │ webpack > watchpack > chokidar > fsevents > node-pre-gyp >   │
│               │ request > http-signature > sshpk                             │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info     │ https://nodesecurity.io/advisories/606                       │
└───────────────┴──────────────────────────────────────────────────────────────┘

┌───────────────┬──────────────────────────────────────────────────────────────┐
│ high          │ Regular Expression Denial of Service                         │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package       │ sshpk                                                        │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ laravel-mix                                                  │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path          │ laravel-mix > webpack-dev-server > chokidar > fsevents >     │
│               │ node-pre-gyp > request > http-signature > sshpk              │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info     │ https://nodesecurity.io/advisories/606                       │
└───────────────┴──────────────────────────────────────────────────────────────┘

┌───────────────┬──────────────────────────────────────────────────────────────┐
│ high          │ Regular Expression Denial of Service                         │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package       │ minimatch                                                    │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ gulp [dev]                                                   │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path          │ gulp > vinyl-fs > glob-watcher > gaze > globule > minimatch  │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info     │ https://nodesecurity.io/advisories/118                       │
└───────────────┴──────────────────────────────────────────────────────────────┘

12 Jan
1 year ago

firemaps left a reply on Group Forge Changed To Www-data, Can't Fix

$ ps aux | grep php-fpm

root     27573  0.0  4.7 477796 48592 ?        Ss    2017   4:47 php-fpm: master process (/etc/php/7.1/fpm/php-fpm.conf)
www-data 29602  0.1  3.4 480988 35268 ?        S    15:08   0:22 php-fpm: pool www
www-data 30271  0.2  3.4 483316 35444 ?        S    17:08   0:29 php-fpm: pool www
www-data 30272  0.1  3.4 480996 34664 ?        S    17:08   0:20 php-fpm: pool www
forge    31399  0.0  0.0  12948   936 pts/0    S+   20:52   0:00 grep --color=auto php-fpm
$ ps aux | grep nginx

root      9804  0.0  0.7 149316  7432 ?        Ss   Jan07   0:00 nginx: master process /usr/sbin/nginx -g daemon on; master_process on;
forge     9819  0.0  0.6 149224  7072 ?        S    Jan07   2:10 nginx: worker process
forge    31402  0.0  0.0  12948  1012 pts/0    S+   20:52   0:00 grep --color=auto nginx

How do I determine which ownership and permissions are necessary? On another server of mine the only difference of the default implementation is forge forge instead of forge www-data.

Not sure how I can fix this without introducing another bug (invalid crsf token error)

firemaps started a new conversation Group Forge Changed To Www-data, Can't Fix

Hi,

Somehow, either due to an update or a cron job, the forge group has been changed to www-data in several locations (app, artisan, config, database, resources, routes, storage, vendor and more).

Everything seems to work fine, except for writing errors to storage logs.

777 on storage fixes this, but I'm not going to run that in production.

If I change www-data on storage back to forge, I get csrf token error when I try to login.

What can I do to get things back to normal??

Thanks

28 Nov
1 year ago

firemaps left a reply on Failed To Load Resource: The Server Responded With A Status Of 500 (HTTP/2.0 500)

Another one of my problems, probably related to this, is I have a permissions issue. I ran composer update in production and something got messed up somewhere.

This is the only way I have gotten things to work (until now)

drwxrwx--- 15 forge www-data 4096 Nov  2 11:42 mysite.com
[email protected]:~$ cd mysite.com/
[email protected]:~/mysite.com$ ls -l
total 440
drwxrwxr-x 10 forge www-data   4096 Nov  2 12:33 app
-rw-rw-r--  1 forge www-data   1646 Sep 10 11:19 artisan
drwxrwxr-x  3 forge www-data   4096 Nov  2 12:33 bootstrap
-rw-rw-r--  1 forge www-data   1910 Sep 10 11:19 composer.json
-rw-rw-r--  1 forge forge    208335 Sep 10 13:37 composer.lock
drwxrwx---  2 forge www-data   4096 Sep 10 11:19 config
drwxrwx---  5 forge www-data   4096 Sep 10 11:19 database
-rw-rw-r--  1 forge forge      2188 Nov  2 11:42 package.json
-rw-rw-r--  1 forge www-data   1055 Sep 10 11:19 phpunit.xml
drwxrwx---  7 forge www-data   4096 Sep 17 16:15 public
-rw-rw-r--  1 forge www-data   2906 Sep 10 11:19 readme.md
drwxrwx---  5 forge www-data   4096 Sep 10 11:19 resources
drwxrwx---  2 forge www-data   4096 Oct 16 17:30 routes
-rw-rw-r--  1 forge www-data      0 Sep 10 11:19 routes.js
drwxrwx---  5 forge www-data   4096 Sep 10 11:19 semantic
-rw-rw-r--  1 forge www-data   1158 Sep 10 11:19 semantic.json
-rw-rw-r--  1 forge www-data    563 Sep 10 11:19 server.php
-rw-rw-r--  1 forge www-data    753 Sep 10 11:19 socket.js
drwxrwxr-x  5 forge www-data   4096 Apr 11  2017 storage
drwxrwx---  4 forge www-data   4096 Sep 10 11:19 tests
drwxrwx--- 55 forge www-data   4096 Nov 28 12:50 vendor
-rw-rw-r--  1 forge forge      1281 Sep 15 10:13 webpack.mix.js
-rw-rw-r--  1 forge www-data 151956 Sep 10 11:19 yarn.lock
[email protected]:~/mysite.com$ 

I think I remember running $ chown -R forge:forge /path but it may have been reset back to this.

Please help!

firemaps started a new conversation Failed To Load Resource: The Server Responded With A Status Of 500 (HTTP/2.0 500)

On my site I am trying to upload images and extract information from the exif, including GPS tag etc.

On laptop, there is no problem. However on mobile, with the same images, I am getting "Failed to load resource: the server responded with a status of 500 (HTTP/2.0 500)"

How can I debug this? Or is there something else I can install?

This suggests https://www.digitalocean.com/community/questions/getting-500-internal-server-error $ apt-get install php5-curl

I have a feeling its a permissions issue...? Anyone?

05 Oct
1 year ago

firemaps left a reply on Users Password Is Not Matching In Production

The thing is, I am also using the mutator to allow the user to change their password.

What line on ResetPasswords trait should I edit out?

04 Oct
1 year ago

firemaps left a reply on Users Password Is Not Matching In Production

Yes exactly that's where I think the problem is, double b-crypting.

How can I edit out the code in ResetsPassword.php? If I edit ResetsPassword.php locally, it does not change when I push to production, because it is in the vendor folder which is listed in gitignore.

The Auth\ResetPasswordController uses the ResetPasswords trait. I've edited out the trait and importing its code and dependencies manually, but what should I edit?

Line 36

public function reset(Request $request) {

...
        $response = $this->broker()->reset(
            $this->credentials($request), function ($user, $password) {
                $this->resetPassword($user, $password); // THIS?
            }
        );
...
}

// line 101 Or this?

    protected function resetPassword($user, $password)
    {
        $user->forceFill([
            'password' => bcrypt($password),
            'remember_token' => Str::random(60),
        ])->save();

        $this->guard()->login($user);
    }

firemaps left a reply on Users Password Is Not Matching In Production

Bumping this

I think it might be due to the reset option provided by ResetsPassword.php

On Laracasts, Jeff taught us to include a mutator for automatic hashing in User.php. When a user signs up or resets their password in my settings option, I use this on User.php

/** * A Mutator * Automatic hashing */ public function setPasswordAttribute($password) { $this->attributes['password'] = bcrypt($password); }

But when a user forgots their login details, on ResetsPassword.php

/**
 * Reset the given user's password.
 *
 * @param  \Illuminate\Contracts\Auth\CanResetPassword  $user
 * @param  string  $password
 * @return void
 */
protected function resetPassword($user, $password)
{
    $user->forceFill([
        'password' => bcrypt($password),
        'remember_token' => Str::random(60),
    ])->save();

    $this->guard()->login($user);
}

so maybe it's being changed twice.

How can I overcome resetPassword in production? If I modify the file locally, it does not change when pushed to production.

28 Sep
1 year ago

firemaps left a reply on Github Auto Deploy Issue

@adammench how does one raise their github access?

26 Sep
1 year ago

firemaps left a reply on Forge Deployment Failing On >php Artisan Optimize

I've just linked my GitHub to a shared private repo on Forge, getting the same error.

08 Sep
1 year ago

firemaps started a new conversation Users Passwords Are Not Matching In Production

Hope someone can offer some direction here.

I have 3 different users in production who cannot login. All 3 are confident their passwords are correct, they are verified etc., but cannot meet the same credentials. 2 of these users have told me they can only log in when they reset their password, and then it only works once.

I am using this package to enforce rules https://github.com/schuppo/PasswordStrengthPackage

'password' => 'required|confirmed|min:6|case_diff|numbers|letters|symbols',

To encrypt passwords, I removed the default cold and I am using a Mutator for automatic hashing, which is code I got from Laracasts. This has the advantage of controlling a Users change password function, which is available on the custom settings page I have created.

// User.php public function setPasswordAttribute($password) { $this->attributes['password'] = bcrypt($password); }

// LoginController \Hash::check($request->password, $user->password);

Most of my users have no problem .... how can I debug this? Any advice?

Thanks!!

06 Sep
1 year ago

firemaps left a reply on Errors After Composer Update In Production

How I fixed this (With the guidance of Ben Johnson on gitter, a true hero)

ssh

Check if forge is set as the user $ ps -aux | grep "php"

if you get www-data and not forge, you might have the same problem as me

$ sudo chown -R forge:www-data /home/forge/mysite.com

$sudo chmod -R 770 /home/forge/mysite.com

Everything works as expected for me again

Thanks to Ben!!! Ben for president!!

firemaps started a new conversation Errors After Composer Update In Production

Lesson learnt, don't run composer update in production.

I ran composer update in production and encountered some errors.

I was not able to log into my site. Getting error "UnexpectedValueException The stream or file "/home/forge/mysite.com/storage/logs/laravel.log" could not be opened: failed to open stream: Permission denied"

I was able to enable log in with ssh sudo chmod 777 -R storage

the storage directory now has a green background in terminal when I ssh.

However, now I cannot upload images with dropzone, a core feature of my site.

Getting error, which was previously working FileException Unable to write in the "uploads/1/photos" directory in File.php (line 113) at File->getTargetFile('uploads/1/photos', 'IMG_3660.jpg')

when I $ ls -l inside /public/uploads, I see 2 different sets of permissions.

// user 1 = drwxr-xr-x 3 forge forge 4096 Apr 26 00:11 1 // user 103 = drwxrwxr-x 2 forge forge 4096 Apr 26 00:11 103

What has caused this mismatch? How can I fix??

Really need some help or direction here please :-(

firemaps left a reply on VerifyCsrfToken - Composer Update In Production

Good advice, investigating now. Will post answer as follows

01 Sep
1 year ago

firemaps started a new conversation VerifyCsrfToken - Composer Update In Production

Hey guys,

I foolishly ran composer update in production and now I can't login.

I have tried

  • deleted browsers cookies and application data
  • php artisan clear:cache
  • composer dump-autoload
  • Deleted composer.lock on both sides, updated from homestead and git push to server
  • php artisan clear-compiled
  • Restarted Nginx, Server

I am running out of ideas now. Can someone please tell me what I can do to fix this??

Thanks

15 Aug
1 year ago

firemaps started a new conversation SSH Problems, Permission Denied, Host Key Verification Failed.

Hey guys,

I have had an inactive project on digital ocean for a while. I recently made a whole bunch of changes and now I'm trying to get the latest version of the site into production.

I can push the changes locally from Gitlab no problem. Everything is there. I can ssh with [email protected] too, and the phpseclib-generated-key from the Forge error message is there under [email protected]:~/.ssh$ cat authorized_keys

On Gitlab, my local ssh key is there and the [email protected] is there.

I was able to deploy updates before no problem, but I have since upgraded the project from 5.3 to 5.4.

Now when Forge tries to deploy I get

Host key verification failed. fatal: Could not read from remote repository.

Please make sure you have the correct access rights and the repository exists.

Should I uninstall the repository and start again? Ideally I would like to keep my database.

Hope someone can help,

Thanks

21 Jul
1 year ago

firemaps started a new conversation Accidentally Deleted Virtual Box .vmdk File. How Do I Get Homestead Running Again?

hey guys,

This morning my 120gb macbook air was really filling up so I was prompted to remove some files. I had been playing around with Kali so decided to remove that to continue working on my Laravel apps. Unfortunately in a morning haze I deleted the wrong file :D

Thankfully all my projects are saved locally. Everything should be okay, right?

When I try to vagrant up I get error VERR_FILE_NOT_FOUND opening image file '/Users/user/VirtualBox VMs/homestead-7/box-disk1.vmdk' (VERR_FILE_NOT_FOUND) - the one I stupidly deleted.

So inside the Virtual Box GUI -> homestead-7 -> storage -> Controller SATA controller. Should I remove the reference to the deleted file and create a new one?

Can anyone help me please? Need to get back to work!

14 Apr
2 years ago

firemaps left a reply on How To Trigger Auto Deploy From Gitlab With Forge?

Yes I am looking, but I can't find it that's why I am asking for help

I have another server on digital ocean and it auto deploy worked out of the box, so I'm not sure if it's a forge issue or a gitlab issue or AWS

firemaps started a new conversation How To Trigger Auto Deploy From Gitlab With Forge?

Hi guys,

I am running a AWS server on Forge

There is a url that I need to put somewhere on gitlab to trigger auto deploy, but where do I put it?

Docs on forge could really be updated for us noobs :-)

"It's simple. When you commit fresh code, or when your continous integration service finishes testing your application, instruct the service to make a GET or POST request to the following URL. Making a request to this URL will trigger your Forge deployment script:"

Sounds great, but where does it go??

11 Apr
2 years ago

firemaps started a new conversation Failed To Load Resource: The Server Responded With A Status Of 500 ()

Just recently deploying my first site on AWS with Forge.

Connected to mysql pro and created some data in a table, get request working fine

However when I try to create a new user (vue, axios) I get "Failed to load resource: the server responded with a status of 500 ()"

In my forge .env file, if I change DB_HOST from "127.0.0.1" to the IP of my server, it won't deploy.

How can I configure my env to make a post request?

Cheers

firemaps left a reply on Connecting To MySQL AWS, Security Parameters?

Using .pem and login as ubuntu worked as matt had pointed out in the article.

firemaps started a new conversation Connecting To MySQL AWS, Security Parameters?

Hi guys,

I am just after provisioning my first aws instance via forge and excited to get started

However, I'm having trouble connecting to mysql (pro, workbench)

I have been following this tutorial https://mattstauffer.co/blog/laravel-forge-hosting-on-aws which is great, but it stops short of configuring IPs and improving security.

Do I need to whitelist certain IPs from forge on my AWS security group?

Also, I'm not sure... do I need to use the .pem publickey that was generated or do I use the traditional id_rsa?

Current error = "key_load_public: invalid format"

Hope someone can help me

Cheers

14 Mar
2 years ago

firemaps started a new conversation Check Auth In Vue / Vue-router

I am trying to convert my Laravel App into an SPA

How can I limit certain routes to authenticated users?

I see the Auth::user() facade extends a javascript file, so is there an easy way to test for this in Vue as there is in PHP?

Cheers

13 Mar
2 years ago

firemaps left a reply on Vue Router In Laravel - Cant Go Directly To A URL

That answer is a great quick fix. Would love an explanation about how it works and how it can be customized for other urls

08 Mar
2 years ago

firemaps started a new conversation Testing Stripe Webhooks With Ngrok And Homestead

How can I configure ngrok to tunnel myapp.dev on homestead to generate Stripe webhook responses?

I think I am on the right direction

$ ngrok http -host-header=rewrite 192.168.10.10:80

but when I click on one of the links on http://localhost:4040/inspect/http

or when I send a webhook request I get a response similar to not running vagrant provision:

Fatal error: Uncaught Error: Class 'Illuminate\Foundation\Application' not found in /home/vagrant/Code/app/bootstrap/app.php on line 14 Error: Class 'Illuminate\Foundation\Application' not found in /home/vagrant/Code/app/bootstrap/app.php on line 14

26 Feb
2 years ago

firemaps started a new conversation Login With Custom Modal Vue Component + Axios

I can get a 200 status response and show '/home' view in the consoles preview section

but how can I trigger redirect in axios following 200 response?

Currently the custom modal view does not close but when I refresh the page I am logged in.

   methods: {
        login() {
            axios.post('/login', this.$data)
                 .then(response => console.log(response));
                 // .catch(error => this.errors.record(error.response.data));
        }
24 Feb
2 years ago

firemaps left a reply on How Can I Reference Vue Components Throughout My Laravel App?

Had to get the hang of webpack :-)

23 Feb
2 years ago

firemaps left a reply on How Can I Reference Vue Components Throughout My Laravel App?

In my resources/assets/js folder there is bootstrap.js which has

// line 20 window.Vue = require('vue');

I am still not sure. How can I reference a component in my app that I build inside vue loader?

firemaps started a new conversation How Can I Reference Vue Components Throughout My Laravel App?

I am following the vue 2 series here. Fantastic resource.

I have no problem building up components via npm run dev that is enabled with hot reloading. Very cool

But I don't know yet, how can I reference the .vue components I create with loader into the rest of my application? My vue loader instance is inside my laravel project

Cheers

19 Feb
2 years ago

firemaps left a reply on Handling Passwords With Vue And Axios

Thanks @bobbybouwmann I jumped the gun on this one!

firemaps started a new conversation Handling Passwords With Vue And Axios

I am trying to update my registration form to include Vue

<form @submit.prevent="register">
    <input placeholder="Enter your name" v-model="name" />
    <input placeholder="Enter your email" v-model="email" />
    <input placeholder="Enter your password" v-model="password" />
    <input placeholder="Confirm pw" v-model="confirmpassword" />
</form>

// vue

new Vue({

    data: {

            name: '',
            username: '',
            email: '',
            password: '',
            confirmpassword: '',
            g-recaptcha: ''

    },

    methods: {

            register() {
                    axios.post('/register', this.$data);
            }
    }
});

Response: 500

Swift_TransportException in AbstractSmtpTransport.php line 383: Expected response code 250 but got code "530", with message "530 5.7.1 Authentication required"

How do I get around this and use Vue for secure data entry such as passwords?

firemaps started a new conversation Error Using Vue In Project

Hi guys,

I am confused about how I can implement Vue throughout my project. Is 1 root instance enough for a project? If so, should I declare a under and reference Vue throughout?

Problem here is if I @yield('content') above the tag, I get an error.

<body>
<div id="wrapper">    
    <nav>
    </nav>
    @yield('content') // this creates a problem
</div>
    <script src="https://unpkg.com/vue/dist/vue.js"></script>
    <script src="/js/myvueapp.js"></script> // works fine on another page but I am moving Vue to have a global scope
</body>

// Error following @yield : Templates should only be responsible for mapping the state to the UI. Avoid placing tags with side-effects in your templates, such as , as they will not be parsed.

I would like to use Vue loader but I'm not sure how I can integrate it into my project. Do I create a new instance of vue loader inside my Laravel app? How can I reference Vue loader templates throughout my project?

10 Feb
2 years ago

firemaps started a new conversation Cannot Connect To MySQL

Same problem here https://laracasts.com/discuss/channels/general-discussion/cannot-connect-to-mysql-workbench

but on Mac following OS upgrade to Sierra which seems to have cleared ssh keys

Generated a new set of keys and I can now log in to forge via terminal but I am getting the same error

Error = Could not connect to the SSH Tunnel Authentication error. Please check that your username and password are correct and try again. Details (Original exception message): Bad authentication type, the server is not accepting this type of authentication. Allowed ones are: [u'publickey']

How can I fix this?

Thanks

07 Feb
2 years ago

firemaps left a reply on Homestead Not Mapping Properly

Just encountered this problem

I think it was because I created a new project as vagrant was running ?

What solved it for me was turn off vagrant run vagrant provision turn on vagrant With 5.4 project, remove .example from .env $ php artisan key:generate $ composer dump-autoload

viola!

06 Feb
2 years ago

firemaps left a reply on Laravel Mix Webpack Error

Hi @KodeCept , none of these solutions have worked for me. Do you remember your working solution?

I am following the Vue 2 series

{
  "private": true,
  "scripts": {
    "webpack": "cross-env NODE_ENV=development webpack --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"
  },
  "devDependencies": {
    "axios": "^0.15.3",
    "babel-core": "^6.22.1",
    "babel-loader": "^6.2.10",
    "babel-preset-es2015": "^6.22.0",
    "bootstrap-sass": "^3.3.7",
    "jquery": "^3.1.0",
    "laravel-mix": "^0.6.3",
    "lodash": "^4.16.2",
    "vue": "^2.1.10"
  }
}
  • I have installed $ npm install cross-env
  • Tried 5.4 code listed above by @mdecooman
  • Ran $ brew upgrade node, but I get node not installed...but if I run node -v; I get node not installed

Can anyone help? Been stuck on this for a while

09 Jan
2 years ago

firemaps left a reply on Debugging Multipart-form Post Requests From IOS To Live Project

Update:

Trying to hit dropzone inside form tags, not working either

Current error = _kCFStreamErrorDomainKey=1, NSErrorPeerAddressKey

firemaps started a new conversation Debugging Multipart-form Post Requests From IOS To Live Project

I am trying to post an image from iOS to a live project with Alamofire 4 and Swift 3

Other post requests eg login work fine

However although I can get http 200 and see a large data object, I am unable to see any error messages when I try to return $request; for example.

// routes 

Route::post('/store', [
    'uses' => 'iOSController',
    'as'     => 'apiv1.store'
]);
// iOSController

public function store(Request $request) {

      return $request;

}

In swift :


// var image = UIImage() is set and ready for upload. Have UIImage, imagePath, NSData, etc.

// button pressed
        let URL = try! URLRequest(url: "https://website.com/apiv1/store", method: .post)
        
        Alamofire.upload(multipartFormData: { multipartFormData in
            
            multipartFormData.append(UIImagePNGRepresentation(self.image!)!, withName: "testing", fileName: "test.png", mimeType: "image/png")
            
        }, with: URL, encodingCompletion: {
            encodingResult in
            switch encodingResult {
            case .success(let upload, _, _):
                upload.responseData { response in
                    debugPrint("SUCCESS RESPONSE: \(response)")
                    print(response.response!)
                    print(response.data)
                    print(response.metrics)

                    // this gets http 200
                    // I can see there is a large response.data object 
                    // the laravel debugging page is normally included here but with multipart upload it is not included
                   
                }
            case .failure(let encodingError):
                print("ERROR RESPONSE: \(encodingError)")
            }
        })

Anyone know how I can upload image from iOS -> Laravel, move the image to a specific folder and create a row in db? Works fine for me on web-app.

Cheers

03 Jan
2 years ago

firemaps left a reply on Migration Problem: There Is No Column With Name 'city_id' On Table 'photos'

I can get 'nothing to migrate', then I incl this new migration but i get an error

[Doctrine\DBAL\Schema\SchemaException] There is no column with name 'city_id' on table 'photos'.

Yes- I am trying to add this col

firemaps started a new conversation Migration Problem: There Is No Column With Name 'city_id' On Table 'photos'

Hi guys, I was able to run this fine on Homestead but when migrating to a live Forge web-app it is giving me an error.

I am trying to add 'city_id' to table photos but when I migrate:

[Doctrine\DBAL\Schema\SchemaException] There is no column with name 'city_id' on table 'photos'.

I can run a rollback and it takes away the most recent migrations out incl some new tables

When I migrate, I can add the tables back, but the new col I am trying to add to the photos table do not get included and the error gets thrown :@

The migration:

03 Dec
2 years ago

firemaps left a reply on Dynamically Create Tables With Columns

When data is added in a new location, I want a new table for it.

What I am thinking of doing is building a set of locations in cache with Redis. If there is a new country added, it will create a new Country table

 if(\Redis::sadd('countries', $country)) {
         event(new NewCountryAdded($country));
  }
class EventServiceProvider extends ServiceProvider
{
    protected $listen = [
        'App\Events\NewCountryAdded' => [
            'App\Listeners\CreateNewCountryTable'
       ],
  ];
class CreateNewCountryTable
{
    /**
     * Create the event listener.
     *
     * @return void
     */
    public function __construct()
    {
        // ?? 
    }

    /**
     * Handle the event.
     *
     * @param  NewCountryAdded  $event
     * @return void
     */
    public function handle(NewCountryAdded $event)
    {
        // schema: create new table ($country)
    }
}

firemaps started a new conversation Dynamically Create Tables With Columns

How can I dynamically create a database table through a controller with custom columns?

What I want is something like

 Artisan::call('make:migration', [
      // $table->string('new_column');
 ]);

Any tips? Thanks

15 Nov
2 years ago

firemaps left a reply on Laracasts Refresh

Looks great ! Btw top nav is blank ;)