connor11528

connor11528

Member Since 2 Years Ago

Alameda, CA

Software Engineer at Stitch Labs

Experience Points 17,440
Experience Level 4

2,560 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 164
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 May
1 week ago

connor11528 left a reply on Laravel (Valet) Problem With Mysql Connection

To get around the lack of my.cnf.d you need to create the directory:

$ mkdir /usr/local/etc/my.cnf.d
06 May
2 weeks ago

connor11528 left a reply on CURL Error 28: Operation Timed Out After 2000 Milliseconds With 0 Bytes Received During Registration In Laravel 5.4

I am getting the same error when trying to login with Google. Did you ever fix this or find a solution? @divo

21 Feb
3 months ago

connor11528 left a reply on 419 Error When Submitting Form In Production - Sorry, Your Session Has Expired. Please Refresh And Try Again

Alright got rid of the 419. I needed to clear the cache with php artisan cache:clear

Flash messages are still not showing up but that could be a different error. Thank you SO MUCH for your help @r

connor11528 left a reply on 419 Error When Submitting Form In Production - Sorry, Your Session Has Expired. Please Refresh And Try Again

@ROERJO - Okay I ran the deploy with the new app key generation (with force), deleted sessions from database and file system and cleared the cookies in the chrome browser.

Still getting the 419.

When I check the cookie data in chrome (chrome://settings/siteData) it shows I'm creating an XSRF-TOKEN and a cookie with name employbl (comes from SESSION_COOKIE env variable)

I'm thinking that I shouldn't be creating that XSRF-TOKEN in the browser

connor11528 left a reply on 419 Error When Submitting Form In Production - Sorry, Your Session Has Expired. Please Refresh And Try Again

@ROERJO - This is super helpful. not sure why this is happening but comparing these two values seems definitely to be on to the issue root cause. So you inspect the hidden input field and that value should be present on the form submit request in network tab?

connor11528 left a reply on 419 Error When Submitting Form In Production - Sorry, Your Session Has Expired. Please Refresh And Try Again

@TYKUS - I do have create session and create cache migrations. The "sessions" table is being created and in my config/sessions.php I have 'table' => 'sessions',. Session records are populating in the sessions table in production

connor11528 left a reply on 419 Error When Submitting Form In Production - Sorry, Your Session Has Expired. Please Refresh And Try Again

@ROERJO - Yes I switched to "database" for session permissions. My .env file looks like:

BROADCAST_DRIVER=log
CACHE_DRIVER=database
SESSION_DRIVER=database
SESSION_DOMAIN=null
SESSION_COOKIE=employbl
QUEUE_DRIVER=sync

and in config/session.php I have 'driver' => env('SESSION_DRIVER', 'database'),.

Confirmed that the session table is being created and populated with records on my production database.

Just in case I SSH'd into my forge server and checked file permissions, it looked like:

[email protected]:~/employbl.com$ ls
CNAME      composer.json  nova               resources   vendor
README.md  composer.lock  package-lock.json  routes      webpack.mix.js
app        config         package.json       server.php  yarn.lock
artisan    database       phpunit.xml        storage
bootstrap  laradock       public             tests
[email protected]:~/employbl.com$ ls -l
total 1248
-rw-rw-r--  1 forge forge     17 Jul 12  2018 CNAME
-rw-rw-r--  1 forge forge   2468 Feb 20 00:58 README.md
drwxrwxr-x 10 forge forge   4096 Feb 21 17:58 app
-rw-rw-r--  1 forge forge   1686 Jul 12  2018 artisan
drwxrwxr-x  3 forge forge   4096 Jul 12  2018 bootstrap
-rw-rw-r--  1 forge forge   2137 Feb 21 02:22 composer.json
-rw-rw-r--  1 forge forge 238627 Feb 21 02:22 composer.lock
drwxrwxr-x  2 forge forge   4096 Feb 21 17:58 config
drwxrwxr-x  7 forge forge   4096 Feb 19 23:02 database
drwxrwxr-x  2 forge forge   4096 Oct 19 23:37 laradock
drwxrwxr-x  9 forge forge   4096 Oct 29 22:41 nova
-rw-rw-r--  1 forge forge 729852 Feb  3 05:57 package-lock.json
-rw-rw-r--  1 forge forge   1457 Feb  3 05:57 package.json
-rw-rw-r--  1 forge forge   1142 Dec 27 05:01 phpunit.xml
drwxrwxr-x  8 forge forge   4096 Feb 21 18:52 public
drwxrwxr-x  5 forge forge   4096 Jul 12  2018 resources
drwxrwxr-x  2 forge forge   4096 Feb 21 18:47 routes
-rw-rw-r--  1 forge forge    563 Jul 12  2018 server.php
drwxrwxr-x  6 forge forge   4096 Jul 12  2018 storage
drwxrwxr-x  4 forge forge   4096 Dec 27 05:01 tests
drwxrwxr-x 42 forge forge   4096 Feb 21 18:52 vendor
-rw-rw-r--  1 forge forge    570 Jul 15  2018 webpack.mix.js
-rw-rw-r--  1 forge forge 218035 Jul 12  2018 yarn.lock

connor11528 left a reply on 419 Error When Submitting Form In Production - Sorry, Your Session Has Expired. Please Refresh And Try Again

@ROERJO - Okay so set the permissions for storage/framework/sessions? I might need to SSH into the machine for that. I originally had sessions being stored as "file" and switched them to be stored in "database"

connor11528 left a reply on 419 Error When Submitting Form In Production - Sorry, Your Session Has Expired. Please Refresh And Try Again

@MIDWESTDEV - Including a video here. The link is live at: https://employbl.com/candidates (I've customized the 419 error template for lolz)

It looks like there is no session data but there is cookie data being stored: http://recordit.co/BqBK7naeI3

connor11528 left a reply on 419 Error When Submitting Form In Production - Sorry, Your Session Has Expired. Please Refresh And Try Again

@ROERJO - Hmm, like this?

    protected $middlewareGroups = [
        'web' => [
            \App\Http\Middleware\EncryptCookies::class,
            \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
            \Illuminate\Session\Middleware\StartSession::class,
            \Illuminate\Session\Middleware\AuthenticateSession::class,
            \Illuminate\View\Middleware\ShareErrorsFromSession::class,
            // \App\Http\Middleware\VerifyCsrfToken::class,
            \Illuminate\Routing\Middleware\SubstituteBindings::class,
            \Spatie\ResponseCache\Middlewares\CacheResponse::class,
        ],

Something to think about, but i'm kinda sketched out about getting hacked

connor11528 left a reply on 419 Error When Submitting Form In Production - Sorry, Your Session Has Expired. Please Refresh And Try Again

@MIDWESTDEV - Yes I do I have <meta name="csrf-token" content="{{ csrf_token() }}"> in the <head> of the application

connor11528 started a new conversation 419 Error When Submitting Form In Production - Sorry, Your Session Has Expired. Please Refresh And Try Again

I've got a Laravel 5.7 app that is working locally. For instance, when running locally I'll get flash messages about failed validation and it shows fine in the blade view:

I do have the @csrf helper in my blade form.

When I deploy and submit the form on production I get a 419 error: "Sorry, your session has expired. Please refresh and try again". Redirects are not working for social login with google or linkedin in production, though they're working locally.

I am using Laravel Forge for production and database tables for session and cache. So my .env file for production is:

BROADCAST_DRIVER=log
CACHE_DRIVER=database
SESSION_DRIVER=database
QUEUE_DRIVER=sync

Then my deployment script for Laravel Forge is:

cd /home/forge/employbl.com
git reset --hard origin/master
git pull origin master
composer install --no-ansi --no-dev --no-interaction --no-progress --no-scripts --optimize-autoloader
echo "" | sudo -S service php7.2-fpm reload
rm -rf node_modules
composer dump-autoload
php artisan config:clear
php artisan view:clear
php artisan responsecache:clear
php artisan config:cache
php artisan migrate --force
php artisan sitemap:generate 

How can I clear the sessions so I don't get the 419 "your session has expired" and the form works on the production server?

16 Feb
3 months ago

connor11528 started a new conversation Laravel Nova - Table 'action_events' Already Exists

Hi there, I am trying to run my migrations with Laravel Nova installed. I got everything running and deployed to production, but locally my migrations broke. I have tried php artisan migrate:reset, but afterwards I am getting an error that the "action_events" table already exists:

$ php artisan migrate
Migrating: 2014_10_12_000000_create_users_table
Migrated:  2014_10_12_000000_create_users_table
Migrating: 2014_10_12_100000_create_password_resets_table
Migrated:  2014_10_12_100000_create_password_resets_table
Migrating: 2017_11_16_212051_create_companies_table
Migrated:  2017_11_16_212051_create_companies_table
Migrating: 2018_01_01_000000_create_action_events_table

In Connection.php line 664:

  SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'action_events' already exists (SQL: create table `action_ev
  ents` (`id` bigint unsigned not null auto_increment primary key, `batch_id` char(36) not null, `user_id` int unsigned not n
  ull, `name` varchar(191) not null, `actionable_type` varchar(191) not null, `actionable_id` int unsigned not null, `target_
  type` varchar(191) not null, `target_id` int unsigned not null, `model_type` varchar(191) not null, `model_id` int unsigned
   null, `fields` text not null, `status` varchar(25) not null default 'running', `exception` text not null, `created_at` tim
  estamp null, `updated_at` timestamp null) default character set utf8mb4 collate 'utf8mb4_unicode_ci')


In PDOStatement.php line 119:

  SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'action_events' already exists


In PDOStatement.php line 117:

  SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'action_events' already exists

This kind of makes sense because it said it created the "action_events" table. I have two create_actions_events migrations, one in, vendor/laravel/nova/database/migrations and one in nova/database/migrations.

My question is, why are the migrations running twice and how do I get it to stop? What's the best practice here for working with Nova and database migrations?

connor11528 left a reply on Keep Getting TokenMismatchException VerifyCsrfToken.php On Line 46

For me solving the issue running my Laravel tests locally:

php artisan cache:clear
composer dump-autoload
php artisan config:clear
php artisan cache:clear // (just for good luck)
20 Jan
4 months ago

connor11528 left a reply on Laravel/PHPUnit Testing - TokenMismatchException

@BMLARSON - Nice! Fixed the issue... after I wiped out my whole local database

05 Jan
4 months ago

connor11528 left a reply on How To Submit A Vue Component In Laravel Blade?

@SHAWNRONG - Unfortunately you kind of need to do one or the other. Blade is rendered on the server side with PHP so you can't pop in Vue randomly

connor11528 left a reply on How To Submit A Vue Component In Laravel Blade?

I had the same question. This Medium article was really helpful. You can use axios to submit the form instead of HTML form element

https://medium.com/@mscherrenberg/laravel-5-6-vue-js-simple-form-submission-using-components-92b6d5fd4434

29 Oct
6 months ago

connor11528 left a reply on How To Add A Nova User In Production Using Laravel Forge?

Yes I did. It turns out the command is: ssh [email protected] where the XXX.XX.XXX.XXX is your server's IP address

Got it from here: https://mattstauffer.com/blog/getting-your-first-site-up-and-running-in-laravel-forge/ under "Other common tasks"

connor11528 started a new conversation How To Add A Nova User In Production Using Laravel Forge?

I have my site https://employbl.com/ deployed on Laravel Forge and recently installed Laravel Nova. Everything works great locally but I'm unable to login to the Nova dashboard in production. I'd like to run php artisan nova:user to create a production user. I've added my SSH keys to the Forge server.

How do I log into my Forge server and run the command to create a user?

connor11528 left a reply on Laravel 5 SSH Into Forge With Public SSH Key - Permission Denied (publickey).

What is the command to log into a Forge server after you've added your ssh key?

21 Sep
8 months ago

connor11528 left a reply on Communications Between Components

@keevitaja I wrote a tutorial about how to communicate between Vue.js components here: https://blog.jscrambler.com/communicating-between-vue-2-components-and-google-maps/

It's common for people to use Vuex for building complex applications but is not required by any means. In the above tutorial I go through building an application that communicates across three different components and the Google Maps API. The way that we manage to communicate across Vue.js components is to emit events and respond to those events. There is a global event bus that listens for and responds to events in order to update data across components. I hope that you find it helpful

30 Jul
9 months ago

connor11528 left a reply on Writing Blog Posts In Markdown Language And Where To Save Posts

Parsedown is another popular option for converting markdown to html using PHP: https://github.com/parsedown/laravel

20 Jul
10 months ago

connor11528 left a reply on How To Clear The Users Browser Cache So That The Newest Vue Deploy Loads?

@tykus was right. Mix() instead of asset fixed the issue! Thank you

19 Jul
10 months ago

connor11528 started a new conversation How To Clear The Users Browser Cache So That The Newest Vue Deploy Loads?

I deployed my app to Laravel Forge. It looks great in an incognito window but in a normal Chrome window the app is broken. I know clearing my browser cache will work but I cannot tell that to every single returning user. How can I make sure that returning users see the latest version of my app?

I have the version method in my webpack.mix.js:

mix.js('resources/assets/js/app.js', 'public/js').version();
mix.sass('resources/assets/sass/app.scss', 'public/css').version();

In my layouts.blade.php I load in my Javascript like so:

<script src="{{ asset('js/app.js') }}"></script>

How can I make sure my returning users see the latest Vue.js?

07 Jul
10 months ago

connor11528 left a reply on Authenticating Users To Allow Edit/update Their Own Profile

@APPLE199 with the above code, can users edit someone else's profile assuming they're logged in?

04 Apr
1 year ago

connor11528 left a reply on Call To Undefined Method ViewTransactionListTest::visit()

Dusk requires a lot of changes to your tests that is different from the code Adam writes in the course. To get tests working in a similar manner using >= Laravel 5.5 you can use:

composer require laravel/browser-kit-testing --dev

Full setup instructions here (it's not too bad): https://github.com/laravel/browser-kit-testing

I have the tests running in functional dir using Laravel 5.6!

connor11528 left a reply on Visit() And See() And All That Not Working

Dusk requires a lot of changes to your tests that is different from the code Adam writes in the course. To get tests working in a similar manner using >= Laravel 5.5 you can use:

composer require laravel/browser-kit-testing --dev

Full setup instructions here (it's not too bad): https://github.com/laravel/browser-kit-testing

I have the tests running in functional dir using Laravel 5.6!

12 Mar
1 year ago

connor11528 left a reply on Class 'Memcached' Not Found

Thanks @danrichards I had to run the tests inside of my vagrant environment

04 Nov
1 year ago

connor11528 left a reply on Temporary URL Or URLs With A Limited Lifetime

In Laravel 5.5 you can use the Storage class and ->temporaryUrl(). This works for storing files on S3

https://laravel.com/docs/5.5/filesystem#file-urls

$url = Storage::temporaryUrl(
    'file1.jpg', Carbon::now()->addMinutes(5)
);

connor11528 left a reply on How To Upload File Private Mode And Retrive By Generated Url With Expired Time In Aws S3 In Laravel 5.3 Or 5.4

I believe this same functionality is baked into Laravel 5.5 through the temporaryUrl method

$url = Storage::temporaryUrl(
    'file1.jpg', Carbon::now()->addMinutes(5)
);

Docs: https://laravel.com/docs/5.5/filesystem#file-urls

09 Oct
1 year ago

connor11528 left a reply on Laravel 5 Omnipay With Rest API

Did you figure out an answer to this problem? I too would like to build a payment API with omnipay

09 Aug
1 year ago

connor11528 left a reply on How To Upgrade To Laravel 5.3?

So what if we have a massive laravel application? We're supposed to do "laravel new" and copy every single file into a new project. What about version control? It's suprising to me the solution is brand new project!

The alternative I gues would be to update composer.json and see what breaks

07 Aug
1 year ago

connor11528 left a reply on Laravel & Amazon AWS Deployment

+1 for tutorials on deployment to AWS. There are a lot of services out there to choose from: ElasticBeanstalk, CodeDeploy, CloudFormation etc

Looking forward to learning more! Thank you

10 Jul
1 year ago

connor11528 started a new conversation Images Not Rendering For Forge Deploy But Works Locally

I am having an issue rendering images when I deploy my Laravel 5.4 app using Forge.

I put my images in storage/app/public and then ran php artisan storage:link. I ran this locally and everything renders correctly.

I included the storage:link command in my Deploy Script for Forge. I reference the image in blade template like:

When I deploy my site using Forge I get a 404 error for rendering the images. The error says failed to load resource. Does anyone know why the images are rendering locally but the file path breaks when I deploy? Thank you!

connor11528 left a reply on Images Not Saving To Storage/app On Digital Ocean

When I try this I get an error on my forge deployment:

ln: failed to create symbolic link 'public/storage/public': File exists

However my images still don't render. How do I fix this?

Thank you

05 Jul
1 year ago

connor11528 left a reply on [L5] One Time Payment Cashier

For one time charges I would not use Cashier.

Build the client side form with Stripe JS library: https://stripe.com/docs/elements

This allows us to get a token that we can send to our server (Laravel)

Once you send the token to server follow these steps in PHP for processing the charge: https://stripe.com/docs/charges

Cashier is meant to be for subscriptions, which are more complex

29 Jan
2 years ago

connor11528 left a reply on How Do I Use Data From Vue.js Child Component Within Parent Component?

Okay cool! Thank you @KodeCept

I am using vue 1.0 so do need the .sync for this one. Shout out to @GuillaumeLeclerc for the vue-google-maps component: https://github.com/GuillaumeLeclerc/vue-google-maps

Final solution:

Blade template:

@extends('layouts.app')

@section('content')

    <div class='col-md-6 col-md-offset-3'>
        <h1>Add New Candidate</h1>

        <hr>

        <candidates-form endpoint='/candidates/create' buttontext='Add Candidate'></candidates-form>
            
    </div>
@stopassola 

Parent Laravel component:

<template>
<div>
    {{endpoint}}

    
    <div class='form-group'>
        <label>Name:</label>
        <input type='text' class='form-control' v-model='name'>
    </div>

    <div class='form-group'>
        <location-input :location="locationData"></location-input>
    </div>

    <button class='btn btn-primary'>{{buttontext}}</button>

    <pre>{{ locationData | json }}</pre>

</div>

</template>

<script>

export default {

    data() {
        return {
            locationData: {
                place: {
                    name: ''
                },
                types: [],
                restrictions: {'country': 'usa'}
            }
        }
    },

    props: ['endpoint', 'buttontext'],


    ready() {
    }
}
</script>

Child Laravel component:

<template>
    <place-input
            :place.sync="location.place"
            :types.sync="location.types"
            :component-restrictions.sync="location.restrictions"
            class='form-control'
            label='Location: '
            name='location'
    ></place-input>
</template>

<script>
    import { PlaceInput, Map } from 'vue-google-maps'

    export default {

        props: ['location'],

        components: {
            PlaceInput
        },
        ready() {
        }
    }
</script>
<style>
    label { display: block; }
</style>

Aaaaand the overall app.js file (this is within a Laravel 5.3 app btw)

import { load } from 'vue-google-maps'

load({
  key: '<API_KEY>',
  v: '3.24',             // Google Maps API version
  libraries: 'places',   // for places input
});

Vue.component('locationInput', require('./components/LocationInput.vue'));
Vue.component('candidatesForm', require('./components/CandidatesForm.vue'));
Vue.component('company-list', require('./components/CompanyList.vue'));

const app = new Vue({
    el: 'body',
    data: store
});

This article also helped simplify things for me also. I was overthinking it!

17 Jan
2 years ago

connor11528 left a reply on How Do I Use Data From Vue.js Child Component Within Parent Component?

Okay cool. Do you have any code that illustrates this concept? Thank you!

12 Jan
2 years ago

connor11528 started a new conversation How Do I Use Data From Vue.js Child Component Within Parent Component?

I have a form component where I use a child component. I want to use data from the child component within the parent.

My component in html:

<candidates-form endpoint='/candidates/create' buttontext='Add Candidate'></candidates-form>

Then here is the Vue instance:

CandidatesForm.vue

    <div class='form-group'>
        <label>Name:</label>
        <input type='text' class='form-control' v-model='name'>
    </div>
    <div class='form-group'>
        <location-input></location-input>
    </div>

    <button class='btn btn-primary'>{{buttontext}}</button>
</div>
</template>
<script>
    export default {
        data() {
            return {}
        },

        props: ['endpoint', 'buttontext'],

        ready() {}
    }
</script>

I utilize the locationInput component in there and it renders to the screen nicely. That component implements Google Maps typeahead functionality for the input field and looks like this:

LocationInput.vue

    <place-input
            :place.sync="placeInput.place"
            :types.sync="placeInput.types"
            :component-restrictions.sync="placeInput.restrictions"
            class='form-control'
            label='Location: '
            name='location'
    ></place-input>

    <pre>{{ placeInput.place | json }}</pre>

</template>

<script>
    import { PlaceInput, Map } from 'vue-google-maps'

    export default {

        data() {
            return {
                placeInput: {
                    place: {
                        name: ''
                    },
                    types: [],
                    restrictions: {'country': 'usa'}
                }
            }
        },
        props: ['location'],

        components: {
            PlaceInput
        },
        ready() {
        }
    }
</script>
<style>
    label { display: block; }
</style>

I want to submit the name value and information from placeInput.place to the server.

I register both components in my main app file like so:

Vue.component('locationInput', require('./components/LocationInput.vue'));
Vue.component('candidatesForm', require('./components/CandidatesForm.vue'));

const app = new Vue({
    el: 'body'
});

How do I pass the placeInput.place data from location-input component to candidates-form component?

I want to send the placeInput.place and name data from the candidates-form component to the server, most likely using vue-resource.

10 Jan
2 years ago

connor11528 left a reply on How Do You Use RedirectIfAuthenticated Middleware?

Awesome thank you! Out of curiosity, how do you invoke it when using a controller?

If my code was set up like:

Route::get('/home', '[email protected]');

and the controller looked like:

public function index()
    {
        return view('home');
    }
08 Jan
2 years ago

connor11528 started a new conversation How Do You Use RedirectIfAuthenticated Middleware?

In the Ogres are like Middleware video Jeffrey mentions the RedirectIfAuthenticated to redirect logged in users from landing pages or login pages. How do I utilize this RedirectIfAuthenticated middleware in my routes or controllers?

For example, I have:

routes.php

Route::get('/', function index ()
    {
        return view('landing');
    });

I only want users to go to the landing page if they are not logged in. If they are logged in, go to /home. How do I protect this route from logged in users using middleware?

Thank you

07 Jan
2 years ago

connor11528 left a reply on Error Saying View Does Not Exist When It Does

For me it was much easier to change my path to @extends('layouts.app') instead of @extends('app')

28 Dec
2 years ago

connor11528 left a reply on How Do I Query By Geolocation In Laravel 5?

Thanks squad! I just finished the frontend for allowing users to select location using Google Maps typeahead API. Post is here: https://medium.com/@connorleech/build-google-maps-typeahead-functionality-with-vue-js-and-laravel-5-3-b75986c77df1#.j717fbnuu

@leber would the more simplistic query be:

DB::select('WHERE lat < $lat + (10 * 0.018) ')

I am going to have the more full featured one but if run into performance issues this is an awesome backup plan. Thank you

27 Dec
2 years ago

connor11528 started a new conversation How To Store Locations With Laravel And Eloquent?

I would like to add a location to an Eloquent model and query by location. What is the best practice for storing a Users location?

Thank you!