Closed mxl closed 5 years ago
@mxl
First make sure that you have configured Tinx properly as per instructions (I found that re() worked better when I installed the config file as detailed in the install instructions)
Have you ensured that you have your composer.json to search the app folder to autoload models in that folder?
Also try exiting tinx and running composer dumpautoload
This will re load the autoload.
Hi @mxl,
I'm unable to replicate your error using the following environment:
sw_vers
)php -v
)php artisan -V
)composer info | grep tinx
)The steps I took to attempt replication were:
laravel new tinx-issue-58 && cd tinx-issue-58
)
composer require --dev ajthinking/tinx
)
Order
model (php artisan make:model Order
)
User
model into the app/Models
directory as per your example, updating the User
model namespace to app/Models
php artisan tinx
)
(new App\Order)->test()
and (new App\Models\User)->test()
statements in Tinx and confirmed both returned BadMethodCallException
error messages
test()
method to both models
re()
)
(new App\Order)->test()
and (new App\Models\User)->test()
statements in Tinx and confirmed both now returned the intended 123
output messages
Wish I could help more, but as I can't replicate, I'll have to close the issue!
This is happening to me as well. Just installed Tinx in Laravel 5.8 re() and reo() throws no error, but i.e. my App\Transaction class is not reloaded. I have to quit the Tinx and start it again to see the cahnges.
Mac OS X 10.14.4 PHP 7.3.3 Laravel Framework 5.8.4 ajthinking/tinx v2.3.1
version: 2.1.9
app/Models/User.php
andapp/Order.php
.php artisan tinx
re()
in tinx shell(new User())->test()
results in123
output(new Order())->test()
results inBadMethodCallException