100 experience to go until the next level!
In case you were wondering, you earn Laracasts experience when you:
Earned once you have completed your first Laracasts lesson.
Earned once you have earned your first 1000 experience points.
Earned when you have been with Laracasts for 1 year.
Earned when you have been with Laracasts for 2 years.
Earned when you have been with Laracasts for 3 years.
Earned when you have been with Laracasts for 4 years.
Earned when you have been with Laracasts for 5 years.
Earned when at least one Laracasts series has been fully completed.
Earned after your first post on the Laracasts forum.
Earned once 100 Laracasts lessons have been completed.
Earned once you receive your first "Best Reply" award on the Laracasts forum.
Earned if you are a paying Laracasts subscriber.
Earned if you have a lifetime subscription to Laracasts.
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.
Earned once you have achieved 500 forum replies.
Earned once your experience points passes 100,000.
Earned once your experience points hits 10,000.
Earned once 1000 Laracasts lessons have been completed.
Earned once your "Best Reply" award count is 100 or more.
Earned once your experience points passes 1 million.
Earned once your experience points ranks in the top 50 of all Laracasts users.
Started a new Conversation Stripe: It Seems I Always Need `->createAsStripeCustomer()`?
I'm creating a SaaS and it seems that it would work better if I call createAsStripeCustomer()
in User
boot
method right after creating (created
)? Otherwise methods suchs as this fails:
auth()->user()->subscribed('main')
However the documentation says the following, and that confuses me:
Occasionally, you may wish to create a Stripe customer without beginning a subscription. You may accomplish this using the
createAsStripeCustomer
method
So how do you handle it for SaaS? I thought about creating a ´isValidStripeCustomer` method, but it's gonna be a lot of checks or maybe I should override the methods such as
subscribed` or simply make every user a Stripe user?
And also would you create free users in Stripe under a free plan?
Started a new Conversation Npm Run Results In Many Lines: <s> [webpack.Progress]
I have lately had a problem when I run npm run dev
or the other built-in commands, the output doesn't come as a progress bar but a line by line progress. Here's an example:
<s> [webpack.Progress] 70% building 776/776 modules 0 active
<s> [webpack.Progress] 78% after module and chunk tree optimization
<s> [webpack.Progress] 79% basic chunk modules optimization
<s> [webpack.Progress] 80% chunk modules optimization
<s> [webpack.Progress] 80% advanced chunk modules optimization
<s> [webpack.Progress] 81% after chunk modules optimization
Is this a failure in the setup of Laravel or something on my machine and can i fix it?
I'm using Windows 10 and Git Bash with MINGW64
Awarded Best Reply on Translator::trans Does Not Exist
Nevermind. It was a vendor that hasn't been updated to Laravel 6 and the error handler pointing at the wrong file.
Replied to Translator::trans Does Not Exist
Nevermind. It was a vendor that hasn't been updated to Laravel 6 and the error handler pointing at the wrong file.
Started a new Conversation Translator::trans Does Not Exist
When I use __()
I get the following error referering to the old trans()
Method Illuminate\Translation\Translator::trans does not exist. (View: /var/www/html/resources/views/pages/dashboard.blade.php)
What can the problem be? __
must be referering to trans()
somewhere.
I also tried to install laravel/helpers
but with no luck.
Started a new Conversation Passport For A Package
I would like to create a package others can install in their Laravel, which will communicate with my app.
I thought I would do that by using Laravel Passport, but I feel the authorization step will be a problem here?
I know many developers will simply ask you to add secret
and client_id
to .env
. Should I simply use skipsAuthorization
and let my package gather a token and keep it up to date?
Replied to Multiple Databases
I agree that is a better approach, unfortunately the setup has been developed for 1 client and it will require a lot of work and testing to ensure that the database works for multiple clients. It might be good to migrate towards this in the long run, but it's also a time consuming migration unfortauntely.
Started a new Conversation Multiple Databases
How would you handle multiple databases in Laravel?
I want to use the same codebase for several clients, but they will be on different databases. I thought first I could override the env
from Apache, but then I don't see how I can run migrations? So I need to be able to set up different databases for different clients (they can be identified by the domain they access from, as they will be on different subdomains), and it must also work with migrations.
I could add DB_CONNECTION=mysql_client1
, DB_CONNECTION=mysql_client2
and so on, but that would give a lot of repetitive code and some maintenance when clients are created or removed. Could I maybe have an initial database and retrieve the client data from there or how would you solve this?
Replied to How To Create A Pin Like Passsword?
You can specify custom fields to verify your users by, if that's what you mean: https://laravel.com/docs/5.8/authentication#authenticating-users
If you want to "pin auth" them after they log you could create a middleware called something like Verified
or AuthWithPin
or what you would like. So that when a user is authed, but not yet with a pin, this will be triggered. (You need to store the pin status in a session).
Easiest option is of course to include the extra parameter at login.
The reset part is a matter of generating a token, call the column pin_token
and send an email to the user with a token link that will reset the pin.
Replied to Vue - Parse JSON String
The more logically setup would be that every node is a row, not a column. From there you could either have named properties or just iterate, but you should have a schema for the table setup that describes the number of columns and maybe their header.