Questions tagged [tinker]

Tinker is a REPL for the Laravel PHP framework.

136 questions
0
votes
2 answers

Laravel Tinker error with SQLite database

Starting from a fresh project: laravel new new-project cd new-project touch storage/database/database.sqlite Then at .env DB_CONNECTION=sqlite DB_DATABASE=storage/database/database.sqlite DB_FOREIGN_KEYS=true The migration succeed... php artisan…
amimaro
  • 175
  • 3
  • 19
0
votes
1 answer

Why is the HTTP request works fine in Tinker but not in the app in Laravel 7?

I'm trying to upload a file doing a POST request to an API. So when I test it in Tinker it works fine, it takes like 5 seconds to upload the file, but when I test my own endpoint using Postman I get this error: "message": "Maximum execution time of…
0
votes
2 answers

Laravel Tinker on php 7.2.19

Tinker in laravel closes itself everytime when I try to get a result of a command harder than 1+1. Laravel: 5.5.38 php: 7.2.19 enter image description here
0
votes
1 answer

Laravel 7 Error message: 'SQLSTATE[23000]: Integrity constraint violation: 19 NOT NULL constraint failed: profiles.url

UPDATE: PROBLEM SOLVED! I'm refreshing my Laravel skills (using version 7.13.0), following the freecodecamp.org tutorial, here: https://www.youtube.com/watch?v=ImtZ5yENzgE&t=11889s (1:21:49 to 1:22:50). When I get to the task of adding a profile…
Yair Shachar
  • 55
  • 1
  • 11
0
votes
1 answer

How do I create a Client instance on Tinker

I want to add users into the oauth_clients table using Tinker, but I don't know how to create a Client instance on tinker.
johnson dubula
  • 31
  • 1
  • 1
  • 7
0
votes
0 answers

(Artisan)Tinker not allowing me to access the profile table from the back end

I have a User object that has a one-to-many relationship with a Profile object. I require the fields of the profile object in order to dynamically display it's variables on the web page. i.e. How many 'posts', Their 'description' etc. I ran into…
SamJigile
  • 1
  • 1
0
votes
1 answer

How to check Database connection and credentials using laravel tinker

Check database credentials using tinker in a laravel 6.x application What is the command to check Database connection in tinker in a laravel application
Jareer
  • 242
  • 5
  • 24
0
votes
1 answer

Change Laravel Web Tinker Public Files Directory - Prevent 403 Error on Saving

I love this little library - so helpful. However, it places some of its css and js files in a vendor folder inside the public directory of Laravel. I've got a Vendor class and paths in several apps and so, when saving a new Vendor, it redirects 403…
Watercayman
  • 7,970
  • 10
  • 31
  • 49
0
votes
1 answer

Tinker giving exception in Laravel 5.8

Exception: Writing to /home/vishu/.config/psysh is not allowed. at /usr/share/nginx/html/example/vendor/psy/psysh/src/ConfigPaths.php:228 @\mkdir($dir, 0700, true); } if (!\is_dir($dir) || !\is_writable($dir)) { …
ViShU
  • 49
  • 8
0
votes
2 answers

D Library extension not available with this PHP installation

I have installed intervention/image. This is what I got from tinker: C:\Users\USER\p3>composer require intervention/image Using version ^2.5 for intervention/image ./composer.json has been updated Loading composer repositories with package…
0
votes
3 answers

Can't see email configuration on artisan tinker

I have already set my email configuration on .env file but when i check from tinker is shows null value. here is my env…
0
votes
1 answer

issue with tinker and laravel

im trying to insert records in my database using tinker but i have an error : Php warning : a non-numeric value encountered and no records are save. My factory : $factory->define(App\Donne::class, function (Faker\Generator $faker) { return [ …
darkcast
  • 11
  • 2
0
votes
1 answer

populating the database with image tinker/laravel

am trying to populate the database using terminal but am getting the error below when i upload an image PHP Fatal error: Call to undefined function cover_image() in Psy Shell code on line 1 This is what i was inserting in database $event=new…
user12332074
0
votes
0 answers

Writing to /Users/ahmed.d.hamdallah/.config/psysh/psysh_history is not allowed

I have a macbookpro 2017, and i face a problems when use php artisan tinker. Here's a screenshot of what I got: [![ErrorException : Writing to /Users/ahmed.d.hamdallah/.config/psysh/psysh_history is not allowed. at…
0
votes
4 answers

Saving changes in php artisan tinker

I am working on a Laravel project. First, have run a migration and created a Blueprint for the table: php artisan migrate I edited the migration by creating a Schema with the following structure Schema::create('donations', function (Blueprint…
Ewa Szyszka
  • 69
  • 2
  • 10