Member Since 10 Months Ago
4,830 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.
@jlrdw, Thanks for the solution. Upvote for the answer. :)
Is there anyone who can help me on this problem?
Started a new Conversation Automatically Connect To Different Database From The Form Input For The AuthServiceProvider
I am trying to build an API using Lumen for my Point of Sale project. I have a login system where user can Select Unit(Database) name and after that the branch will be populated in another select field, then the user can enter their username and password to use the application.
I already got a solution which I don't think is a good idea. That is if there is a get parameter in the request(?dbname=xxxx) it will connect to that database.
Another solution I got from the internet, which is a good idea that is I can dynamically change the database connection name on runtime with the post request parameter or using method parameter.
But the problem is I am using "tymon/jwt-auth" library for the JWT Authentication, and I am thinking to find a logic to implement if I can somehow change the database name in runtime. Is it possible to do that?
In config/database.php file:
'mysql' => [ 'driver' => 'mysql', 'url' => env('DATABASE_URL'), 'host' => env('DB_HOST', '127.0.0.1'), 'port' => env('DB_PORT', '3306'), 'database' => !empty($_GET['dbname']) ? $_GET['dbname'] : env('DB_DATABASE', 'forge'), 'username' => env('DB_USERNAME', 'forge'), 'password' => env('DB_PASSWORD', ''), 'unix_socket' => env('DB_SOCKET', ''), 'charset' => 'utf8mb4', 'collation' => 'utf8mb4_unicode_ci', 'prefix' => '', 'prefix_indexes' => true, 'strict' => true, 'engine' => null, 'options' => extension_loaded('pdo_mysql') ? array_filter([ PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'), ]) : , ],