cklester

cklester

Member Since 2 Years Ago

Experience Points 13,950
Experience Level 3

1,050 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 114
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.

13 Oct
1 year ago

cklester left a reply on Preparing To Deploy - Cloudways Vs Forge Vs InmotionHosting

I really appreciate everybody's input on this! Thank you!

12 Apr
2 years ago

cklester left a reply on Passport Doesn't See User?

Anybody with Passport experience have a clue as to what I might be doing wrong here?

06 Apr
2 years ago

cklester started a new conversation Passport Doesn't See User?

I'm just doing some testing with Passport, and I'm hitting the /api/user route, and when I do this:

Route::get('/user', function (Request $request) {
    dd(auth()->user());
    return $request->user();
});

I get 'null' as output, even thought there is a logged-in user. (I've removed the temporary middleware.)

dd($request->user()); also returns 'null'.

What am I doing wrong?

cklester left a reply on Passport Receives Token, Does What?

Please, somebody, help me... Help... hhheeeee...

05 Apr
2 years ago

cklester started a new conversation Passport Receives Token, Does What?

What URL do my clients need to access to get the user data available from an authentication token issued by Passport?

04 Apr
2 years ago

cklester left a reply on How To Include A PHP File In Laravel Controller Source

If I had started building my own weeks ago instead of trying to integrate an existing product, I'd probably be done with it by now.

fml

03 Apr
2 years ago

cklester left a reply on How To Include A PHP File In Laravel Controller Source

@willvincent I've been searching and looking for a good forum to integrate with my site, and I'm still testing a few. Do you have any suggestions?

cklester left a reply on How To Include A PHP File In Laravel Controller Source

Hi, @jlrdw , I did try this path:

require_once '/resources/views/pages/forum_sso_functions.php';

but that returns this error:

FatalErrorException in CommunityController.php line 5:
main(): Failed opening required '/resources/views/pages/forum_sso_functions.php' (include_path='C:\xampp\php\PEAR')

cklester started a new conversation How To Include A PHP File In Laravel Controller Source

I'm trying to integrate this code into a CommunityController.php file, but this line doesn't work for me:

require_once dirname(__FILE__).'/forum_sso_functions.php';

How do I form that require_once call so it works from my controller?

29 Mar
2 years ago

cklester started a new conversation How To Modify ShowResetForm()

I don't have anything in my vendor/ folder being stored in the repo, so I just made a change to Auth\ResetsPasswords.php in the showResetForm() function, and I realize it's not going to be pushed up.

What can I do to modify showResetForm() on the server so it remains, even after further upgrades to the Laravel Auth source? Should I go ahead and add this path/file to the repo, or is there a better way? Where would I put an override showResetForm() function, if that's even possible?

27 Mar
2 years ago

cklester left a reply on Socialite Plugin Not Returning User

I went in and made the changes to the Socialite source myself, but I suspect I should probably use another way. What's the proper way to update this source?

26 Mar
2 years ago

cklester left a reply on Npm Run Dev Ends In Error

npm run dev worked! It censored worked!

I've got "emitted" messages... Wooo hooo!

cklester left a reply on Npm Run Dev Ends In Error

BTW, why wouldn't the "webpack" dependency already be expressed in the package.json file?

cklester left a reply on Npm Run Dev Ends In Error

@Encrypt Thanks for the help. I did those steps and I'm getting a new error:

$ npm install
C:\Users\c.k.lester\Documents\repos\ttgn
+-- [email protected]  extraneous
+-- [email protected]  extraneous
+-- [email protected]
| `-- [email protected]
|   `-- [email protected]
|     `-- [email protected]
+-- [email protected]  extraneous
+-- [email protected]  extraneous
+-- [email protected]
+-- [email protected]
+-- [email protected]
`-- [email protected]

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected]^1.0.0 (node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm ERR! Windows_NT 10.0.14393
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install"
npm ERR! node v6.10.1
npm ERR! npm  v3.10.10
npm ERR! path C:\Users\c.k.lester\Documents\repos\ttgn\node_modules\.staging\ajv-4f47c808
npm ERR! code EPERM
npm ERR! errno -4048
npm ERR! syscall rename

npm ERR! Error: EPERM: operation not permitted, rename 'C:\Users\c.k.lester\Documents\repos\ttgn\node_modules\.staging\ajv-4f47c808' -> 'C:\Users\c.k.lester\Documents\repos\ttgn\node_modules\ajv'
npm ERR!     at destStatted (C:\Program Files\nodejs\node_modules\npm\lib\install\action\finalize.js:25:7)
npm ERR!     at C:\Program Files\nodejs\node_modules\npm\node_modules\graceful-fs\polyfills.js:264:29
npm ERR!     at FSReqWrap.oncomplete (fs.js:123:15)
npm ERR!
npm ERR! Error: EPERM: operation not permitted, rename 'C:\Users\c.k.lester\Documents\repos\ttgn\node_modules\.staging\ajv-4f47c808' -> 'C:\Users\c.k.lester\Documents\repos\ttgn\node_modules\ajv'
npm ERR!     at Error (native)
npm ERR!  Error: EPERM: operation not permitted, rename 'C:\Users\c.k.lester\Documents\repos\ttgn\node_modules\.staging\ajv-4f47c808' -> 'C:\Users\c.k.lester\Documents\repos\ttgn\node_modules\ajv'
npm ERR!     at destStatted (C:\Program Files\nodejs\node_modules\npm\lib\install\action\finalize.js:25:7)
npm ERR!     at C:\Program Files\nodejs\node_modules\npm\node_modules\graceful-fs\polyfills.js:264:29
npm ERR!     at FSReqWrap.oncomplete (fs.js:123:15)
npm ERR!
npm ERR! Error: EPERM: operation not permitted, rename 'C:\Users\c.k.lester\Documents\repos\ttgn\node_modules\.staging\ajv-4f47c808' -> 'C:\Users\c.k.lester\Documents\repos\ttgn\node_modules\ajv'
npm ERR!     at Error (native)
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
25 Mar
2 years ago

cklester left a reply on Npm Run Dev Ends In Error

@Encrypt I don't even show that dependency in the package.json file. ?!!?!

@david001 I got the same error using that package.json file.

$ npm run watch

> node node_modules/cross-env/dist/bin/cross-env.js NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js

fallbackLoader option has been deprecated - replace with "fallback"
loader option has been deprecated - replace with "use"
Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.
 - configuration.output.path: The provided value "public" is not an absolute path!

Should the package.json file include a Webpack dependency reference?

24 Mar
2 years ago

cklester started a new conversation Npm Run Dev Ends In Error

I'm getting an error after running npm run dev. Can somebody help diagnose, please?

fallbackLoader option has been deprecated - replace with "fallback"
loader option has been deprecated - replace with "use"
Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.
 - configuration.output.path: The provided value "public" is not an absolute path!

npm ERR! Windows_NT 10.0.14393
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "dev"
npm ERR! node v6.10.1
npm ERR! npm  v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! @ dev: `node node_modules/cross-env/dist/bin/cross-env.js NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @ dev script 'node node_modules/cross-env/dist/bin/cross-env.js NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the  package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node node_modules/cross-env/dist/bin/cross-env.js NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js

22 Mar
2 years ago

cklester left a reply on Add User To Forge Server

Hi, @jlrdw ! Thanks for the help.

It looks like that thread ended without a resolution. What I'm trying to figure out is, can I add a user to my DO server via Forge, then login via ssh with that user?

I've added the user. But now I can't ssh into the server with that user, despite having attempted to use 1) the current ssh key, and 2) a new ssh key.

Currently, I can ssh into my Forge/DO server with the 'forge' user. I want to add a user. Can that use utilize the same ssh key? Do I need to generate a new one? Can I even add a new user to the Forge/DO server?

I've got a message or two into Forge support, but haven't heard anything, yet.

cklester started a new conversation Add User To Forge Server

I can ssh into my server with "[email protected]," but I've added another user to the system (via "adduser...") and am trying to ssh into the server with THAT user, but it doesn't seem to want to. I've added a separate SSH key to the server, because attempting to login with the new username and forge's SSH key results in "Permission denied (publickey)." This is also the error I get when trying to use the new username with the new SSH key.

So, is it possible to add users to the server? Am I restricted to just using the forge user?

19 Mar
2 years ago

cklester left a reply on Integrating Laravel And MyBB

Just to follow up, I found there are "better" forum packages that are easier to implement with a Laravel site. I've decided to not use MyBB and use something else.

16 Mar
2 years ago

cklester left a reply on 'View [auth\social-login] Not Found' Is A Lie.

Why do I always find the answer right after I post. And I usually don't post without having pulled some hair out.

I had to change this:

@include('auth\social-login')

to

@include('auth.social-login')

I'm developing on Windows. Oopsies!

cklester started a new conversation 'View [auth\social-login] Not Found' Is A Lie.

haha! So, I'm trying to get a Laravel site running on Forge. I think I'm almost there!

I'm getting this error when trying to access the site:

ErrorException in FileViewFinder.php line 137:
View [auth\social-login] not found.

That file exists, as far as I can tell. It's right there. I'm looking at it in the console.

So what should I do to diagnose this issue?

08 Mar
2 years ago

cklester started a new conversation Preparing To Deploy - Cloudways Vs Forge Vs InmotionHosting

I have an InmotionHosting.com account, and I'm hosting several sites on it. I could host my Laravel site there as well, for no additional cost. It's just another domain.

However, I don't have Laravel set up on it, and I'm not really sure I want to deal with that. So, I'm looking around, and I find Forge and Cloudways. They look really nice! The problem is, there are too many options. ha!

I'm sure Forge and Cloudways are probably very very similar. What would make me choose one over the other? Or should I forge ahead on my own InmotionHosting VPS? X)

06 Mar
2 years ago

cklester left a reply on How To Get 'datetime-local' Form Field Into DateTime Database Field

When I do that, in order to change the new variable, I have to do

$r['meet_date'] = $pd;

Is there a way to get it so I assign it like this:

$r->meet_date = $pd;

or is this just how it's going to be? (I don't care either way. I just want to understand how things work.)

Thank you, @PawelMysior !

cklester started a new conversation How To Get 'datetime-local' Form Field Into DateTime Database Field

I've got a field on my HTML form of type 'datetime-local.' It returns datetime values in this way:

"2017-03-15T15:00"

What's the best way to get that 'T' out of there? I've tried using str_replace, like so:

$pd = $request->all()['meet_date'];
$pd = str_replace("T", " ", $pd);
$request->all()['meet_date'] = $pd;

but it does not work. $pd gets the desired value, but the following assignment back to $request doesn't work.

03 Mar
2 years ago

cklester left a reply on Project Going Live, Needs Refactoring Big Time!

I'd rather give you the $200.

cklester left a reply on Project Going Live, Needs Refactoring Big Time!

I've seen that before. Is it worth $200?!

cklester started a new conversation Integrating Laravel And MyBB

I would really like to integrate the logins for my Laravel and MyBB installations. It looks like it could be relatively easy... Here's what I propose:

  1. Have MyBB use bcrypt() instead of its default encryption method. CHECK! Did that.
  2. Modify Laravel's auth package so it uses the 'mybb_user' table instead of the 'users' table. This has got to be as easy as something like
$useTable = 'mybb_users';

...right? :D

  1. My migrations for the user table will have to be precise. MyBB creates its users table upon install, so I'll need to do that first prior to running my migrations for the Laravel install. Does that sound correct?

Anything I missed?!

cklester started a new conversation Project Going Live, Needs Refactoring Big Time!

I've got a project going live within the next 2-3 weeks, probably, and I want to hire a Laravel expert (like @TaylorOtwell ) to do some refactoring, streamlining, enhancements, etc...

What should I expect to pay for a Laravel programmer/expert these days?

What's the best place to find someone? This community surely has a forum where people can be hired... right?!

cklester started a new conversation How To Send Data To Reset Password Page

I've modified the 'views\auth\passwords\reset.blade.php' file to get wrapped into a 'layouts.master' file, but I don't know what Controller is calling the reset page, so I can't pass variables through that 'layouts.master' expects!

Who and how is the reset.blade.php file being called?! I can't find a reference to it!

Thank you! :D

02 Mar
2 years ago

cklester left a reply on Starting With 5.4, Where To Begin Learning?

Hi, @lukewh ! Your series is off to a good start! However, my message is a month old, and I have a functioning Laravel installation with BGG integration and Stripe payment processing. Woo hoo! Laravel makes it so easy. :-)

cklester left a reply on Cashier Handling Webhooks?

Oops. Found the issue... In my routes file (web.php), I had this for the controller:

Route::post('/stripe/webhook', '[email protected]');

but needed this

Route::post('/stripe/webhook', '\Laravel\Cashier\Http\Controllers\[email protected]');

Now all is well.

cklester started a new conversation Cashier Handling Webhooks?

Is Cashier supposed to handle Stripe webhooks out of the box? Do I need to add some customization? The webhook testing at Stripe is getting a 500 from my site, and it's complaining there is no "WebhooksController," but there is. I see it. :D

I'll step back through the Cashier docs, but if anybody has a clue... Thank you!

28 Feb
2 years ago

cklester left a reply on Stripe Customer Cant Be Charged With Active Card

OK, I figured this out...

Jeffrey says to do

document.querySelector('button').addEventListener...

But, for me, 'button' wasn't good enough. It was conflicting with another 'button' on the page, maybe... So, what I did was assign an id of 'btn-stripe' to the actual button that pops up the form, changed the line to

document.querySelector('btn-stripe').addEventListener...

and now it works fine.

DANG! That was easy. :-D

cklester left a reply on Stripe Customer Cant Be Charged With Active Card

The problem is that the preventDefault() is NOT WORKING. It bypasses that prevention, activates the default behavior, then we get the error message... because the form doesn't pop up for us, so there's no way to enter the information on the checkout form, so it submits it. Again, the problem is that the default behavior is occurring, despite our using preventDefault().

cklester left a reply on Stripe - Cannot Charge A Customer That Has No Active Card

I'm getting this too! Need help! Thank you!

26 Feb
2 years ago

cklester left a reply on Filter Database Query By Date And Time Fields

OK, just discovered the "datetime-local" input field type. I suspect it's just what I need!

cklester left a reply on Filter Database Query By Date And Time Fields

Yes, but, the problem is, I have the date and time in two separate fields, so I can't just compare one of the fields. I have to use both. So, how do I combine them in my SQL query to make the comparison?

If I had one datetime field, I could do this:

->where(\Carbon\Carbon::parse('event_date'),'>',\Carbon\Carbon::now())

But I have both an 'event_date' AND 'event_time' field. I'm doing this because it doesn't seem I can do a mass assignment with a datetime HTML form field (there isn't one).

Is there a way to combine two form fields into one database field entry when using forms? That would be very helpful.

cklester started a new conversation Filter Database Query By Date And Time Fields

I have a date field and time field with event information. I need to show all events that are in the future ( > now() ). How can I combine the date and time fields to create a datetime that can be used by Carbon to compare with now()?

I wouldn't mind switching to a datetime field, if that would be easier, but would I still be able to use mass assignment with create and edit forms?

24 Feb
2 years ago

cklester left a reply on How To Pass Date Field To Date Formfield

My database has a DATE field with a value of 2017-02-25. When I bring that to the HTML page, it includes a timestamp. How do I make sure the field is used and displayed only as a date field?

I have this in my model:

    protected $dates = ['created_at', 'updated_at', 'party_date', 'deleted_at'];
    protected $guarded = [];
    protected $casts = [
        'party_date' => 'date',
        ];
23 Feb
2 years ago

cklester left a reply on How To Pass Date Field To Date Formfield

I'm not casting it with a mutator. I'll consider that in the morning. Thank you, guys!

cklester started a new conversation How To Pass Date Field To Date Formfield

I'm trying to set the value attribute of a date input to the current value in the database, but nothing shows up there. I can do the time field just fine. But the date field on the form shows the placeholder, 'mm/dd/yyyy,' instead of the date value I send it. I've even tried a manual entry of a date, but the form field is still blank! I have a date in the record, and I'm trying to allow the user to change it, but I can't populate the form with the current date.

What's the secret?! :D

17 Feb
2 years ago

cklester left a reply on Attach, But Only If Detached

I found a reference to syncWithoutDetaching(). That should come up in searches on the Internet for "attach if detached."

cklester started a new conversation Attach, But Only If Detached

I want to do an attach(), but only if not attached. Isn't there an attachOrNot() function, analogous to firstOrCreate() and firstOrNew()? Maybe an attachOrIgnore()?

cklester left a reply on Understanding How And When Timestamps Get Stamped

Yes, @tykus ! I believe that did it! Thank you!

cklester left a reply on Understanding How And When Timestamps Get Stamped

You're talking about the timestamp of users or books, and not book_user?

cklester started a new conversation Understanding How And When Timestamps Get Stamped

I'm doing this in a seeder:

\App\User::find(1)->books()->attach( \App\Book::where('name','The Spy Who Loved Me')->get() );
\App\User::where('name','Billy')->first()->books()->attach( \App\Book::where('name','Goldfinger')->get() );

And the timestamps are not getting written when that code runs. The records are being created. (I was just testing what worked for attach()ing records...)

Saw this link, but that didn't help. :-/

In the migration of book_user, I include $table->timestamps();.

Anyway, the records are being created just fine, but the timestamps aren't being stamped. So, what do I need to do so that timestamping is automagic?

cklester left a reply on One Route Among Many Does Not Work

Thank you, @Snapey , for the clarification! I probably missed that in my initial studies. Wow!

And thanks, @tykus , for the clue! :D

cklester left a reply on One Route Among Many Does Not Work

Yes... Is that a clue?! :D