gcwilliams

Member Since 5 Years Ago

Experience Points
56,940
Total
Experience

3,060 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
529
Lessons
Completed
Best Reply Awards
26
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 12
56,940 XP
Feb
12
2 weeks ago
Activity icon

Replied to How To Disable User Registration In Laravel 8 With JetStream?

It should have stubbed out the routes in the "routes/auth.php" file when you did "php artisan breeze:install" command. Just comment out or delete the registration routes.

Nov
19
3 months ago
Activity icon

Awarded Best Reply on Issues With Cabinet.laravel.com/latest.zip

Upgrade your laravel installer to version 4.

Activity icon

Replied to Issues With Cabinet.laravel.com/latest.zip

Upgrade your laravel installer to version 4.

Nov
11
3 months ago
Activity icon

Replied to How To Create Tailwind Utilities In Laravel

And this is my webpack.mix.js file that works with the @tailwind syntax:

const mix = require('laravel-mix');
const webpackConfig = require('./webpack.config');

require('laravel-mix-purgecss');

/*
 |--------------------------------------------------------------------------
 | Mix Asset Management
 |--------------------------------------------------------------------------
 |
 | Mix provides a clean, fluent API for defining some Webpack build steps
 | for your Laravel application. By default, we are compiling the Sass
 | file for the application as well as bundling up all the JS files.
 |
 */

mix
  .js('resources/js/app.js', 'public/js')
  .copyDirectory('resources/img', 'public/img')
  .postCss('resources/css/app.css', 'public/css')
  .options({
    postCss: [require('tailwindcss')],
  })
  .purgeCss({
    globs: [
      path.join(__dirname, 'node_modules/flatpickr/**/*.js'),
      path.join(__dirname, 'node_modules/v-tooltip/**/*.js'),
      path.join(__dirname, 'node_modules/vue-js-modal/**/*.js'),
      path.join(__dirname, 'node_modules/vue-multiselect/**/*.js'),
      path.join(__dirname, 'node_modules/vue-select/**/*.js'),
      path.join(__dirname, 'node_modules/vue-toasted/**/*.js'),
    ],
  })
  .webpackConfig(webpackConfig)
  .version()
  .sourceMaps();

Activity icon

Replied to How To Create Tailwind Utilities In Laravel

I wonder if it has to do with using

@import 'tailwindcss/components';

instead of

@tailwind components;

Try using the @tailwind syntax in your tailwind calls instead.

Activity icon

Replied to How To Create Tailwind Utilities In Laravel

How are you doing your tailwind includes and your compiling? Here is my app.css and it works fine between components and utilities:

@tailwind base;

@import '../fonts/inter.css';

/* Base Custom Styles */
/*a {*/
/*  @apply font-bold text-blue-500;*/
/*}*/

/*a:hover {*/
/*  @apply text-blue-800;*/
/*}*/

@tailwind components;

/* 3rd Party Styles */
@import '~flatpickr/dist/flatpickr.css';
@import '~vue-js-modal/dist/styles.css';
@import '~vue-multiselect/dist/vue-multiselect.min.css';

/* Custom Components */
@import 'components/buttons.css';
@import 'components/flatpickr.css';
@import 'components/forms.css';
@import 'components/modals.css';
@import 'components/nprogress.css';
@import 'components/roles.css';
@import 'components/select.css';
@import 'components/toasts.css';
@import 'components/tooltips.css';

@tailwind utilities;

/* Custom Extra Styles */
@import 'components/animations.css';
@import 'components/loader.css';
@import 'components/vcloak.css';

Oct
22
4 months ago
Activity icon

Replied to Running A Factory

$customer = Customers::factory()->make();

or

$customer = Customers::factory()->create();

Also, the test should be in a test file, not the model. If you want to use the factory itself, it is like this:

$customer = CustomerFactory::new()->create();
Oct
18
4 months ago
Activity icon

Awarded Best Reply on Alpine JS Support For IE11 And Legacy Browsers

Try:

import 'alpinejs/dist/alpine-ie11';

Obviously that won't do the whole module/nomodule stuff that way (at least I don't think it will), but that should import the script.

Activity icon

Replied to Alpine JS Support For IE11 And Legacy Browsers

Try:

import 'alpinejs/dist/alpine-ie11';

Obviously that won't do the whole module/nomodule stuff that way (at least I don't think it will), but that should import the script.

Oct
08
4 months ago
Activity icon

Replied to Laravel Factory Design Question

@t0berius I assume is_seller is a field on the user table. If so you should be able to just set it within the create:

$user = User::factory()->level()->create(['is_seller' => true]);

Since the level state is using the afterCreating hook, it wouldn't run that until after creating the user with the is_seller field set to true.

Activity icon

Replied to Laravel Factory Design Question

I would try something like this article:

https://stefanzweifel.io/posts/2020/09/17/nested-states-in-laravel-8-database-factories/

So basically use a state and the "afterCreating" call. Within the afterCreating call, instead of calling another factory, just do a lookup of the UserLevel. So something like:

namespace Database\Factories;

use App\Models\User;
use Illuminate\Database\Eloquent\Factories\Factory;
use Illuminate\Support\Str;

class UserFactory extends Factory
{
    protected $model = User::class;

    public function definition()
    {
        return [
            'name' => $this->faker->name,
            'email' => $this->faker->unique()->safeEmail,
            'email_verified_at' => now(),
            'password' => 'yIXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // password
            'remember_token' => Str::random(10),
        ];
    }

    public function level()
    {
        return $this
            ->afterCreating(function (User $user) {
		// Select User Level or whatever you want
		$userLevel = App\Models\UserLevel::find(1);
                $user->userLevel()->save($userLevel);
            });
    }
}

Just an idea, but I think something like that will work.

Oct
04
4 months ago
Activity icon

Replied to Spark: When Is The Next Version Due For Release?

I don't know when it will be released, but Taylor talked about it at the last Laracon online conference and it sounds like a major rewrite. So I'd not be surprised if the "series" is incremented to the next major release.

Sep
14
5 months ago
Activity icon

Replied to Factory For Model With Custom Namespace In Laravel 8

By the way you can also just call ProductFactory::new() instead of using the trait on the model itself.

Sep
08
5 months ago
Activity icon

Replied to How To Validate That End Date Is Greater Than Start Date

What date picker library are you using? Most have ways to disable dates. Pikaday and flatpickr are two popular ones. I know with flatpickr you can disable dates, I’m sure Pikaday does too. But would need to know what you’re using.

Activity icon

Replied to How To Validate That End Date Is Greater Than Start Date

You should be validating it within the backend and not counting on javascript to validate the data. It is pretty easy with the validation "after".

https://laravel.com/docs/7.x/validation#rule-after