jhutto

Member Since 2 Years Ago

Experience Points
8,530
Total
Experience

1,470 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
62
Lessons
Completed
Best Reply Awards
0
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 2
8,530 XP
Dec
10
1 month ago
Activity icon

Started a new Conversation 404 Not Found - Laravel 7 Auth With Vue - Ubuntu

I'm testing setting up Laravel 7 with Authentication on Ubuntu 20.04 - I've install LAMP and everything is working.

Installed Laravel 7 ...


composer create-project laravel/laravel laravel7
composer require laravel/ui
php artisan ui vue --auth

npm install
npm run dev

Laravel home loads but keep getting 404 Not found on register and login.

Any help would be appreciated.

Dec
04
1 month ago
Activity icon

Started a new Conversation Installing Laravel Vue.js On Digitalocean Ubuntu 20.04

I've built an app using laravel vue.js with components. Everything works locally.

I ran npm production and uploaded the app to bitbucket.

I created a server on digital ocean - ubuntu 20.04 - But it doesn't see vue.js??? Any help would be appreciated.

Here's my install process.. Basically, creating LAMP server.

apt-get update

sudo apt install php php-cli php-fpm php-json php-common php-mysql php-zip php-gd php-mbstring php-curl php-xml php-pear php-bcmath

sudo nano /var/www/html/test.php

Shows PHP Version 7.4.3 installed

sudo apt install mysql-server

curl -sS https://getcomposer.org/installer | php sudo mv composer.phar /usr/local/bin/composer sudo chmod +x /usr/local/bin/composer composer

sudo apt update sudo apt install phpmyadmin select apache2 Yes to Configure database enter password and confirm

sudo cp /etc/phpmyadmin/apache.conf /etc/apache2/conf-enabled/phpmyadmin.conf

sudo systemctl restart apache2

ServerIP/phpmyadmin - works.

mysql -u root -p

CREATE USER 'xxx'@'localhost' IDENTIFIED BY 'password';

GRANT ALL PRIVILEGES ON * . * TO 'jimmy'@'localhost';

FLUSH PRIVILEGES; exit

sudo apt update && sudo apt install unzip

cd /var/www/html

cloned the laravel app down

cd /var/www/html/app name composer update

cp .env.example .env

php artisan key:generate

nano .env

changed these items APP_NAME=appname APP_ENV=production APP_DEBUG=false APP_URL=http://DOMAIN_NAME_OR_IP_ADDRESS

DB_CONNECTION=mysql DB_HOST=127.0.0.1 DB_PORT=3306 DB_DATABASE=l7 DB_USERNAME=user DB_PASSWORD=password

created a database in phpmyadmin

php artisan migrate this worked

sudo chown -R www-data.www-data /var/www/html/name of app/storage sudo chown -R www-data.www-data /var/www/html/name of app/bootstrap/cache

cd /etc/apache2/sites-available

sudo nano nameofapp.conf

<VirtualHost *:80> ServerName thedomain.com ServerAdmin [email protected] DocumentRoot /var/www/html/nameofapp/public

<Directory /var/www/html/nameofapp> AllowOverride All ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined

sudo a2dissite 000-default.conf

sudo a2ensite 000-default.conf

sudo systemctl restart apache2

Try the Ipaddress in browser and laravel loads but the vue.js components don't run and vue.js is not detected on browser.

I ran npm production on the app before loading to server. I've run npm install and npm production on the server. Nothing is working...

What am I missing ??? Anyone ??? I have not found one article, that goes through the process of moving a laravel vue.js project to production on a server.

Dec
01
1 month ago
Activity icon

Replied to Vue.js Not Detected In Production

Yes... I ran npm run production on my local and then pushed to bitbucket. I confirmed that the app.js is in the resources folder on the server.

Here's the link.. http://159.65.75.54/

Activity icon

Started a new Conversation Vue.js Not Detected In Production

I'm working on several apps with Laravel 7 and Vue.js. Now I need to move to production. I have setup a droplet at digital ocean....I wanted to test the process, so I create a simple Laravel 7 app with auth using vue. But it's not working on the droplet.

I setup laravel 7 added auth... composer require laravel/ui php artisan ui vue --auth npm install && npm run dev

register and login run fine.. Then I ran npm production (based on a few things I read)

Uploaded the app to bitbucket.

Setup digitalocean droplet with ubuntu 20.04.. installed mysql, phpmyadmin, php 7.4, apache2.. All of these were tested and work.

cloned the bitbucket repository down to /var/www/html composer update.. it ran fine... php artisan migrate - This worked and checked the database in phpmyadmin

set permissions sudo chown -R www-data.www-data /var/www/html/l7/storage sudo chown -R www-data.www-data /var/www/html/l7/bootstrap/cache

Then tried to access the app.. at IP Address. Laravel main page comes up, but when I try to register or login,... Page not found. And checked Chrome dev tools... Vue.js not detected.

Based on what I've read.. Running the npm run production, creates the js files needed. But it still not working... Also, I did run npm install on the server but that didn't work either.

What am I missing ???? I have done a ton of searches but nobody talks about installing Laravel and Vue.js on a ubuntu server......

Nov
30
1 month ago
Activity icon

Replied to Install Laravel Vue.js On Ubuntu

Well. That's kind of what I'm asking. In the recent past, I've installed a laravel app on ubuntu on digital ocean. Simply installed LAMP server and cloned Laravel 7 to the server, ran composer update, set the .env file and it worked.

Now I'm trying to install a Laravel 7 that uses Vue.js. When I do the same process...Installing a LAMP server.. Cloning a Laravel 7 with Vue.js Auth... ran composer update, set the .env file, npm install, and npm run production.. The home page comes up but the Auth pages don't work and none of my vue.js components work....

I've done a ton of searches on how to deploy laravel vue.js but there's nothing that specific about the installation.

Most are just about installing laravel. Laravel isn't the problem. It's Vue.js... What are the installation instructions for installing the vue.ls with laravel in production??????

That's what I'm asking for help with..... Please just give me a direction..... Thanks.

Nov
24
1 month ago
Activity icon

Started a new Conversation Install Laravel Vue.js On Ubuntu

I have built an laravel SPA with vue.js that I'm trying to deploy on digitalocean ubuntu 20.04 Lots of information about deploying laravel but not laravel vue.js apps.

Can anyone give me a link with this information?????

I setup the server on digital ocean and cloned my app. Everything is working.. apache, mysql, phpmyadmin, php... but keep getting .. This page isn’t working.

any ideas.. ???? Thanks

Nov
05
2 months ago
Activity icon

Started a new Conversation Hide Vue.js Router Link If User Is Admin In Vue.js Component

I'm trying to hide a router-link from everyone but a admin in vue.js component. How to create the same login as blade in vue.js for....

{{ !Auth::guest() && Auth::user()->role == 1}}

<div v-if=" {{ !Auth::guest() && Auth::user()->role == 1}}">
         <div>
                  <router-link :to="{name: 'messageoutbound'}" class="btn btn-primary btn-md">Get 	 
                                                              Outbound</router-link>
         </div>
</div>
Oct
29
2 months ago
Activity icon

Started a new Conversation Nested If Else Statements

I'm creating a texting app for my company - using twilio (great api) but keywords has presented a complicated issue. There are a bunch and I'll have an api route that is called from Twilio when someone texts the number we have setup. The only thing I could come up with is a very long nested if else. Which seems wrong. Even though most of the time the keywords would be sent by themselves, I'm trying to catch them in sentences too. Any ideas as to how to process all the keywords that makes more sense.

if(preg_match('(stop|stopall|unsubscribe|cancel|end|quit)', $messagelower) === 1) { 
            $HasCode = "Stop";
                // Code to set Stop Column to 1 in Contact 

            } else {

                if(preg_match('(start|yes|unstop)', $messagelower) === 1) { 
                    $HasCode = "Start";
                    // Code to set Stop Column to 0
                    // code to send them a list of options to recieve again
                    return response()->json($HasCode);

                } else {

                    if(preg_match('(help|info)', $messagelower) === 1) { 
                        $HasCode = "Help";
                        
                        //Code to send text with contact infor..
                        return response()->json($HasCode);

                    } else {

                        if(preg_match('(milehi)', $messagelower) === 1) { 
                            $HasCode = "Company Name";
                            return response()->json($HasCode);
                            // change code to get name of list.   
                            // code to add contact to list
                        } else {

                                   if(preg_match('(staff)', $messagelower) === 1) { 
                                    $HasCode = "Staff";
                                    return response()->json($HasCode);
                                       //code to add concact to staff
                                   } else {
                                        
                                        return response()->json("Has no code");
                                        //send reply that we have recieve message and will respond.

                                   }
                            }


                        }


                    }

                }

        ```
Oct
23
2 months ago
Activity icon

Started a new Conversation Redirect After Notification Sent

I'm working on a project where the admin will be in control of access. The user will not see the "forgot password" on the login screen. I have setup a users table vue component with a button click that calls a vue axios function to a controller with the email address. The controller processes the reset password and then send the reset notification that the user clicks to reset the password. (This is working correctly)

The issue is that when it sends the notification, it doesn't come back to the controller for me to do anything else and doesn't send back any errors or status of the email sent.

I would like to be able to confirm the status of the email and alert that it's been sent or error.

Vue Function

  sendReset(email){
                this.axios
                .get(`/api/sendreset/${email}`)
                .then(response => {
                           alert("Email Sent") 
                        })
                        .catch(function (resp) {
                            alert("Error in sending");
                        });
            }
public function sendreset(Request $request)
    {

         
        $email = $request->email;

        $validatedData = $request->validate([
            'email' => 'reguired',
            
        ]);

        //Get User
        $user = User::where('email', '=', $email)->first();
                
        //Check if the user exists
        if (is_null($user))  {
              return redirect()->back()->withErrors(['email' => trans('User does not exist')]);
         }

        //Set Token 
        $token = Str::random(60);

        //Delete any previous reset 
        DB::table('password_resets')->where('email', $email)->delete();
         
        //Insert Token into database
        DB::table('password_resets')->insert([
             'email' => $email,
             'token' => \Hash::make($token), //change 60 to any length you want
             'created_at' => \Carbon\Carbon::now()
         ]);

        
        //Get the token just created above
        $tokenData = DB::table('password_resets')->where('email', $request->email)->first();

        //Setup link      
        $link = config('app.url') . '/password/reset/' . $token . '?email=' . urlencode($user->email);

        //Send Notification
        $user->notify(new pwreset($link));
        
        return response()->json('The email successfully sent');
        
        
    }

api route

Route::get('sendreset/{email}', '[email protected]')->name('pwreset');

pwreset Notification

<?php

namespace App\Notifications;

use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Notifications\Messages\MailMessage;
use Illuminate\Notifications\Notification;

class pwreset extends Notification
{
    use Queueable;

    protected $link;

    /**
     * Create a new notification instance.
     *
     * @return void
     */
    public function __construct($link)
    {
        //
        $this->link = $link;
    }

    /**
     * Get the notification's delivery channels.
     *
     * @param  mixed  $notifiable
     * @return array
     */
    public function via($notifiable)
    {
        return ['mail'];
    }

    /**
     * Get the mail representation of the notification.
     *
     * @param  mixed  $notifiable
     * @return \Illuminate\Notifications\Messages\MailMessage
     */
    public function toMail($notifiable)
    {
        

        return (new MailMessage)
                    ->greeting('Hi from Mile Hi Church SMS Program')
                    ->subject('Password Reset')
                    ->line('Your password has been reset.  Click the Button below.')
                    ->action('Click Here to Reset Password', $this->link)
                    ->line('This password reset link will expire in 60 minutes.')
                    ->line('')
                    ->line('If you did not request a password reset, please contact your administrator!')
                    ->salutation('Administrator');
    }

    /**
     * Get the array representation of the notification.
     *
     * @param  mixed  $notifiable
     * @return array
     */
    public function toArray($notifiable)
    {
        return [
            //
        ];
    }
}

Any help would be appreciated....