Questions tagged [tinker]

Tinker is a REPL for the Laravel PHP framework.

136 questions
2
votes
1 answer

Is there a way to gatekeep laravel tinker?

I was wondering if it was possible to extend or replace the php artisan tinker command so it first asks for authentication as a way to gatekeep who can use it. I tried the following:
IGP
  • 14,160
  • 4
  • 26
  • 43
2
votes
1 answer

Laravel Tinker ErrorException with message 'Undefined variable

I have a laravel application deployed on a kubernetes cluster when i try to use laravel tinker im getting below error after hitting enter for every command ErrorException with message 'Undefined variable: status' on my local machine there is no…
Arash
  • 639
  • 2
  • 9
  • 15
2
votes
3 answers

Cannot specify 'title' from product table - php artisan tinker

Using php artisan tinker I'm able to pull a product table that relates to, in this example, the first user in my database >>> App\User::first()->product; => Illuminate\Database\Eloquent\Collection {#2912 all: [ App\product {#2898 …
Overflow
  • 57
  • 7
2
votes
1 answer

Is there a way to catch when I'm using a laravel tinker session to fiddle with the Models in an Observer class?

I have an Observer set up to Listen to a Model's events in order to keep my Controller clean of Logging messages. My implementation is as follows: First, a store method that does just what it's supposed to do. Create and save a new model from valid…
IGP
  • 14,160
  • 4
  • 26
  • 43
2
votes
2 answers

How to update data in the database using artisan Tinker

First,I call artisan tinker using the command below $ php artisan tinker Then, I plan to get all of the model in Admin to update the name as "admin", then I save the update by using command below $admin =…
Ho Wei Kang
  • 101
  • 2
  • 10
2
votes
3 answers

laravel 5.5 : php artisan tinker : ErrorException : Directory not empty

I am using windows. ... In my CMD, was using tinker, myql, serve, etc... and they all went well... Suddenly, when i exit tinker and enter tinker again... this error comes up [ErrorException] …
liongrobert
  • 78
  • 1
  • 7
1
vote
1 answer

How to dispatch a Laravel job using tinker to a specific queue?

Trying to master my Laravel queues. I've got a production Laravel site using Redis queues managed by Horizon. There's one queue called 'default' for basic jobs, and another called 'long-running-queue' with a longer timeout. Some of my longer jobs…
1
vote
0 answers

Laravel HTTP Facade returning 500 while working in Tinker

Tested as described in this Stack post: Not working on Laravel Controller, Working on Tinker The original is a very simple CURL request: curl -H "Authorization: Bearer 1G5bv.m*******" -H "Content-Type: application/json" -X POST…
TDawg
  • 833
  • 2
  • 8
  • 24
1
vote
2 answers

trying to run php artisan tinker returns error "file_exists(): Unable to find the wrapper "hoa" "

I'm trying to open tinker in a Laravel project, but when I run php artisan tinker I get this error: ErrorException file_exists(): Unable to find the wrapper "hoa" - did you forget to enable it when you configured PHP? I can't find everything…
Bubu23
  • 31
  • 4
1
vote
0 answers

cannot run commands in tinkerwell over ssh connection (laravel)

Tinker works just fine when I am ssh'd into my box, but I cannot get it to work in tinkerwell. I'm trying to connect to my local vagrant box with tinkerwell. It is a vagrant box running in windows: ubuntu 20, laravel 5.7, php7.3.33. Tinkerwell 2.25…
chiliNUT
  • 18,989
  • 14
  • 66
  • 106
1
vote
0 answers

Mutex Destroy Failing on RP4 Port

Wed Mar 16, 2022 9:43 pm Hi, I am relatively new to the Raspberry Pi and have been trying to port some Python source code originally compiled for Windows to a Pi 4. I was able to port everything over save for Win32API, I ended up commenting out…
Brandon S
  • 11
  • 2
1
vote
1 answer

Docker Container Define user home folder

I have the following php service in docker-compse.yml version: '3' networks: laravel: driver: bridge services: nginx: image: nginx:stable-alpine restart: unless-stopped ports: - "${WEB_PORT}:80" volumes: -…
gclark18
  • 659
  • 6
  • 23
1
vote
0 answers

Ctrl + Enter not working in laravel-web-tinker Package

I am using the laravel-web-tinker package ob Ubuntu PHP 7.4 but When I press Ctrl + Enter, It is not working, php artisan serve shows "Killed" and stops working. OS: Ubuntu 20.10 Laravel: 6 PHP: 7.4.3
1
vote
3 answers

Laravel: Why is Eloquent displaying hidden fields?

Simply prefixes a # to the field name I am using Laravel Breeze, which by default sets the password and remember_token fields to hidden. class User extends Authenticatable { use HasFactory, Notifiable; protected $fillable = [ …
ryanvb92
  • 311
  • 2
  • 13
1
vote
2 answers

How to generate "make:model -a" with directory for seeders and controller and migrate name?

How to generate "make:model -a" with directory for seeders and controller and migrate name? Laravel Framework 8.44.0 I am generating a model php artisan make:model Blog/MyCategory -a and expect to see the following…
amberlex78
  • 11
  • 3
1 2
3
9 10