← prev | next →
2021-01-05 09:01:37
hypernxf 2021-01-05 08:59:38
what’s your comment form url
url??
hypernxf 2021-01-05 09:02:48
Sorry I cant help you.
https://laravel-livewire.com/docs/2.x/rendering-components#route-model-binding
hope this helps
Rendering Components | Livewire –
LivewireA full-stack framework for Laravel that takes the pain out of building dynamic UIs.
ganeshrshinde 2021-01-05 10:10:24
Applying migration on testing envirnment but applied on main database ? anyone help on this or guide on this
ganeshrshinde 2021-01-05 10:11:08
Similar envirnment created with different database & .env file updated also with 2 different credentials
hypernxf 2021-01-05 10:21:54
if you open phpunit.xml
hypernxf 2021-01-05 10:22:15
Scroll down you will see <php>
replace with
<php>
<env name=”APP_ENV” value=”testing”/>
<env name=”DB_CONNECTION” value=”sqlite”/>
<env name=”DB_DATABASE” value=”:memory:”/>
<env name=”BCRYPT_ROUNDS” value=”4″/>
<env name=”CACHE_DRIVER” value=”array”/>
<env name=”SESSION_DRIVER” value=”array”/>
<env name=”QUEUE_DRIVER” value=”sync”/>
<env name=”QUEUE_CONNECTION” value=”sync”/>
<env name=”MAIL_DRIVER” value=”array”/>
<env name=”TELESCOPE_ENABLED” value=”false”/>
</php>
hypernxf 2021-01-05 10:22:28
it will use sqlite as your database instead of your main database
ganeshrshinde 2021-01-05 10:25:34
IF i updated .env to new credential of database then how my main database updated??
ganeshrshinde 2021-01-05 10:26:10
hypernxf 2021-01-05 10:22:15
Scroll down you will see <php>
replace with
<php>
<env name=”APP_ENV” value=”testing”/>
<env name=”DB_CONNECTION” value=”sqlite”/>
<env name=”DB_DATABASE” value=”:memory:”/>
<env name=”BCRYPT_ROUNDS” value=”4″/>
<env name=”CACHE_DRIVER” value=”array”/>
<env name=”SESSION_DRIVER” value=”array”/>
<env name=”QUEUE_DRIVER” value=”sync”/>
<env name=”QUEUE_CONNECTION” value=”sync”/>
<env name=”MAIL_DRIVER” value=”array”/>
<env name=”TELESCOPE_ENABLED” value=”false”/>
</php>

hypernxf 2021-01-05 10:26:40
dont touch your .env
hypernxf 2021-01-05 10:27:02
follow my instruction above.
ganeshrshinde 2021-01-05 10:27:40
My both DB in mysql
hypernxf 2021-01-05 10:28:26
So you want to use a mysql db for your testing?
hypernxf 2021-01-05 10:28:47
It’s not really recommended as data dont have to be persisted when running test. Plus it will always refresh the database
ganeshrshinde 2021-01-05 10:29:02
DB Name: smartwir_switch & insmartwire_switch
hypernxf 2021-01-05 10:29:26
and it will be slow when running test
ganeshrshinde 2021-01-05 10:29:38
applying migration on insmartwire_switch but applied on smartwir_switch
hypernxf 2021-01-05 10:30:47
well if you want to use mysql, you just need to insert your database credentials in phpunit.xml
hypernxf 2021-01-05 10:31:38
using the format like in .env
<env name = “DB_DATABASE” value=”insmartwire_switch”>
…
hypernxf 2021-01-05 10:32:33
that will use your testing database instead of your main
Kamalwebdev 2021-01-05 10:32:39
How can i login with socialite without storing information in database?
ganeshrshinde 2021-01-05 10:34:10
hypernxf 2021-01-05 10:31:38
using the format like in .env
<env name = “DB_DATABASE” value=”insmartwire_switch”>
…
.env file update with new credentials phpunit.xml also need to update you mean?
hypernxf 2021-01-05 10:34:41
if you change .env it update your main environment.
ganeshrshinde 2021-01-05 10:35:08
i seperated envirnment on server via cpanel
hypernxf 2021-01-05 10:36:07
I think I’m misunderstanding your question
hypernxf 2021-01-05 10:36:17
are you talking about a production environment and a development environment?
ganeshrshinde 2021-01-05 10:37:26
Cpanel 1 for production & cpanel2 for testing .env updated with respective credentails of database but when migration command run in cpanel2 my production db affected which i want update in testing db
ganeshrshinde 2021-01-05 10:37:37
hypernxf 2021-01-05 10:36:17
are you talking about a production environment and a development environment?
Yes
ganeshrshinde 2021-01-05 10:38:45
ganeshrshinde 2021-01-05 10:37:26
Cpanel 1 for production & cpanel2 for testing .env updated with respective credentails of database but when migration command run in cpanel2 my production db affected which i want update in testing db
Data cloned & other than .env need to update any other file ??
hypernxf 2021-01-05 10:39:27
ok
hypernxf 2021-01-05 10:39:37
then update.env in cpanel 2
hypernxf 2021-01-05 10:40:00
just .env should be fine
ganeshrshinde 2021-01-05 10:42:43
Updated with proper credentials but when migration command processed but main db updated
ganeshrshinde 2021-01-05 10:42:59
means production db affected
hypernxf 2021-01-05 11:02:24
did you cache your .env data?
← prev | next →