You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 14, 2019. It is now read-only.
When starting tinx on Laravel 5.7.21 I'm greeted with a message saying:
root@3c1a41a39166:/app# php artisan tinx
Tinx – something awesome is about to happen.
ErrorException : Class 'Arr' not found (View: /app/vendor/ajthinking/tinx/resources/views/includes.blade.php)
at /app/storage/framework/views/be5e1af9a1a729ea1878b73c6383511207e78a62.php:129
125| * For "first" variable, returns "::first()" if class DB table exists, otherwise "new" (if 'tableless_models' set to true).
126| * For "last" variable, returns "::latest()->first()" if class DB table exists, otherwise "new" (if 'tableless_models' set to true).
127| * */
128| Arr::set($GLOBALS, 'tinx.names', <?php echo var_export($names);; ?>);
> 129| $latestColumn = '<?php echo e(Arr::get($config, 'latest_column', 'created_at')); ?>';
130| <?php $__currentLoopData = $names; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $class => $name): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
131| try {
132| $<?php echo $name; ?> = <?php echo $class; ?>::first() ?: app('<?php echo $class; ?>');
133| $<?php echo $name; ?>_ = <?php echo $class; ?>::latest($latestColumn)->first() ?: app('<?php echo $class; ?>');
Exception trace:
1 Illuminate\View\Engines\CompilerEngine::handleViewException(Object(Symfony\Component\Debug\Exception\FatalThrowableError))
/app/vendor/laravel/framework/src/Illuminate/View/Engines/PhpEngine.php:47
2 Illuminate\View\Engines\PhpEngine::evaluatePath("/app/storage/framework/views/be5e1af9a1a729ea1878b73c6383511207e78a62.php", [Object(Illuminate\View\Factory), Object(Illuminate\Foundation\Application)])
/app/vendor/laravel/framework/src/Illuminate/View/Engines/CompilerEngine.php:59
Please use the argument -v to see more details.
root@3c1a41a39166:/app# php artisan --version
Laravel Framework 5.7.21
Adding the namespace to Arr on that line fixes the error. Evaluated code in is executed as if in a new file, so it doens't copy the namespace from the parent script.
The text was updated successfully, but these errors were encountered:
Please note—after updating Tinx (composer update ajthinking/tinx), you'll probably need to clear your cached Laravel views (php artisan view:clear) before you can run Tinx again without issue.
🤓👍
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
When starting tinx on Laravel 5.7.21 I'm greeted with a message saying:
Adding the namespace to Arr on that line fixes the error. Evaluated code in is executed as if in a new file, so it doens't copy the namespace from the parent script.
The text was updated successfully, but these errors were encountered: